summaryrefslogtreecommitdiff
path: root/pppd/upap.c
Commit message (Collapse)AuthorAgeFilesLines
* Header file reorganization and cleaning up the public API for pppd version ↵Eivind Næss2023-01-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.5.0 (#379) This commit does several things, being a squash-and-merge of a series of changes; squashed in order not to break bisection. * Clean up pppd.h, moving declarations that should only be accessed by pppd code (not by users of pppd) to a new pppd-private.h. Also, other parts of pppd.h were moved to multilink.h, chap.h, eap.h, eui64.h, and a new options.h. * Provide an API for access to data that is needed by plugins (in no particular order): - ifname - ifunit - remote_name - remote_number - peer_authname - status (now called "code" internally) - phase - doing_multilink - multilink_master - idle_time_limit - link_connect_time - max_connect_time - link_stats - ipparam - hostname - got_sigterm - got_sigusr2 - got_sighup - session_number - maxoctets - maxoctets_dir - debug - persist - devnam - modem - peer_authname - sync_serial * Update the version number to 2.5.0. * Detect availability of stddef.h and stdarg.h. * Rename some headers: - pppcrypt.c/h to crypto_ms.c/h - ppp-crypto.c/h to crypto.c/h - ppp-crypto-priv.h to crypto-priv.h - chap-new.c/h to chap.c/h * Remove chap-md5.h, crypto-priv.h, eap-tls.h, etc. from the list of header files to be installed. * Provide typedefs for the hook functions. * Provide a typedef for the "phase" variable. * Provide a typedef for the link statistics array. * Remove the option_t typedef. * Rename the following functions by adding a "ppp_" prefix (with the intention that these are a "public" API for use by plugins): - option_error - add_options - int_option, - options_from_file - script_setenv - bad_ip_adrs, - netif_get/set_mtu (renamed to ppp_get/set_mtu) - get_time - timeout - untimeout - safe_fork - sys_close - set_session_number - update_link_stats (renamed to ppp_get_link_stats) - add_notifier (renamed to ppp_add_notify) - remove_notifier (renamed to ppp_del_notify) - generic_[dis]establish_ppp (to ppp_generic_[dis]establish) * Rename ppp_devnam to ppp_devname. * Rename ppp_available() to ppp_check_kernel_support(). * Use unsigned char instead of u_char, unsigned short instead of u_short, uint32_t instead of u_int32_t. * Add const to some declarations * Update comments * Change the interface for notifiers to use an enum to identify which notifier is to be modified. * Provide an API for getting the path to a file, with an enum to identify different types of file. * Link plugins with the -DPLUGIN flag [paulus@ozlabs.org - wrote commit message] Signed-off-by: Eivind Næss <eivnaes@yahoo.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Use autoconf/automake to configure and make pppEivind Næss2021-07-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change brings in autoconf/automake scripts to configure the ppp project. Current change doesn't eliminate the previous build system, but the new script autogen.sh will overwrite configure, and generate the basic Makefile.in and Makefile files. Features can now be enabled by command line: * Microsoft Extensions, - MSCHAP - MPPE - MS LAN Manager support * IPXCP protocol * CBCP protocol * PAM support * EAP-TLS support * EAP-SRP support * Max session lifetime by byte count * Plugins * Packet activity filter support * Multilink * IPv6 support Control linkage with * OpenSSL (-lssl -lcrypto) * systemd (-lsystemd) * libatm (-latm) * libsrp (-lsrp) * pam (-lpam) Also, the configure script is made sensitive to features of OpenSSL. Like the presence or absence of DES, SHA, MD4 and MD5 crypto support. In the cases where either of these are missing, the support will be directly compiled into pppd and plugins. In addition, package maintainers can now control the installation paths with standard --prefix=, or --localstatedir=, or --sysconfdir= to configure. On top of that, they can now control the following directories: * runtime directory w/--with-runtime-dir * logfile directory w/--with-logfile-dir * plugin directory w/--with-plugin-dir In the case where automake isn't the right solution, namely: SunOS kernel module build, the original Makefile infrastructure is preserved and reused. Care was taken to only cosmetically touchup the source files in this change. This means: * Insert HAVE_CONFIG_H and include config.h in all .c files. * Change HAS_SHADOW to HAVE_SHADOW_H * Change HAVE_LOGWTMP to HAVE_UTMP_H * Introduce HAVE_CRYPT_H into the source code where appropriate * Added ifdef MPPE where appropriate * USE_SRP required a few changes as it didn't compile * Touchup some compile warning in pppstats directory on SunOS Introduced a new pppdconf.h file that exports the appropriate defines to a module that wants to provide a module that pppd can dynamically load. This will define/undef features like MPPE, CHAPMS such that the project doesn't have to guess what features pppd is compiled with. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* Convert to ANSI CPaul Mackerras2020-12-291-64/+29
| | | | | | | | | | | | | | | This gets rid of the __P and __V macros that were used so that the code was in theory compilable by a K&R C compiler, and converts the function definitions to ANSI C style. In fact there were already quite a few function definitions in the ANSI C style, so it would not have been compilable by a K&R C compiler in fact. The Solaris and BSD kernel code modules have had __P removed but the function definitions have not been converted. There are some other minor changes here to remove warnings. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* pppd: Remove unused rcsid variablesKurt Van Dijck2019-10-021-1/+0
| | | | | Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Log a message when we succeed or fail in authenticating ourselvesPaul Mackerras2005-07-131-2/+1
| | | | | | | to the peer. The message in the success case is printed in auth_withpeer_success, but the message in the failure case is printed by the caller of auth_withpeer_fail (since there are many possible reasons for failure).
* Update copyrights. The new CMU copyright notice is from CMU and nowPaul Mackerras2002-12-041-14/+37
| | | | | | | | | explicitly allows modifications. I have an acknowledgement from ANU that the work I have done on pppd belongs to me and not to ANU, so I have changed the ANU copyright notices to reflect this. I have emails from Pedro Roque Marques, Tommi Komulainen and Eric Rosenquist giving me permission to change their copyright notices to be similar to the CMU notice.
* Log calling number failed authorization at warn instead of error, to beFrank Cusack2002-10-121-2/+2
| | | | | consistent with chap/pap failed authentication log level. (And it doesn't merit "error".)
* - more authentication logging uniformityFrank Cusack2002-10-121-7/+18
| | | | | | | | | . remove duplicate logging from auth.c, now in upap.c . auth success logs at info, auth fail at warn, auth with_peer fail at error - add remote number checks after authentication in case a plugin modifies authorization info - log remote number on successful/no auth - streamline null termination of remote name for logging
* Make authentication success/failure messages uniform.Frank Cusack2002-10-111-2/+11
|
* First large MPPE patch from Frank Cusack.David F. Skoll2002-04-021-3/+3
|
* New options system with priorities for option values, with optionsPaul Mackerras2001-03-081-6/+8
| | | | | | grouped into groups where necessary, so the command line overrides the per-tty options file, plus the ability to print out the set of options currently in effect. Some options moved from lcp.c to tty.c.
* make hide_password the defaultPaul Mackerras1999-11-201-2/+4
|
* get rid of a few compile warningsPaul Mackerras1999-11-151-4/+4
|
* Add plugin support plus an initial selection of hooks.Paul Mackerras1999-09-111-2/+5
| | | | | | | | Add the allow-ip option as a better way of specifying what IP addresses an unauthenticated peer may use. Translate unprintable chars in PAP user/password into visible form. Clean up the processing of extra options in the secrets files. Add ktune/noktune options to enable/disable changing kernel settings.
* fix for junky peers from James CarlsonPaul Mackerras1999-08-241-23/+23
|
* Fix the rcsid's for non-ansi compilersPaul Mackerras1999-08-131-3/+3
|
* kill warningPaul Mackerras1999-08-121-1/+1
|
* don't print null received message, %.0[svq] prints nothingPaul Mackerras1999-06-241-13/+17
|
* fix bugletsPaul Mackerras1999-04-281-2/+2
|
* add data_name to struct protentPaul Mackerras1999-03-161-1/+2
| | | | call lcp_lowerdown when connection terminates
* syslog -> notice/error/etc.Paul Mackerras1999-03-161-26/+15
| | | | | use slprintf instead of sprintf trimmed debug
* added hide-password optionPaul Mackerras1999-03-021-4/+11
|
* Update to new pppd with new option parsing stuffPaul Mackerras1998-11-071-1/+15
|
* caddr_t -> void *Paul Mackerras1997-04-301-11/+11
|
* moved protos here from upap.h; zero out passwordsPaul Mackerras1996-07-011-13/+37
|
* change upap to pap in debug messagesPaul Mackerras1996-05-261-16/+16
|
* add null entries for check_options and demand_conf in protentPaul Mackerras1996-01-011-2/+2
|
* extend protocol tablePaul Mackerras1995-12-181-2/+6
|
* Give up waiting for a PAP auth-req from the peer after 30 seconds.Paul Mackerras1995-06-121-4/+33
|
* N_PPP ->NUM_PPPPaul Mackerras1994-10-241-2/+2
|
* some extra includes (string.h and stdlib.h)Paul Mackerras1994-10-221-1/+2
|
* use ppp_defs.h instead of ppp.h, args.h; change some namesPaul Mackerras1994-09-211-21/+20
|
* added stuff to print packets in readable formPaul Mackerras1994-04-111-2/+79
|
* Initial revisionPaul Mackerras1993-11-111-0/+484