summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Move pppgetpass.8 to EXTRA_DIST (#412)HEADmasterMike Gilbert2023-05-011-2/+2
| | | | | automake does not seem to include noinst_*_MANS in the dist tarball. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Merge pull request #417 from enaess/fixesPaul Mackerras2023-05-013-5/+12
|\ | | | | Fixes for #411 and #413
| * Closes #411, Fixing up parsing in radiusclient.confEivind Naess2023-04-231-4/+8
| | | | | | | | | | | | Adding curly braces to fix the code. Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
| * Add configure check to see if we have struct sockaddr_llEivind Naess2023-04-232-1/+4
| | | | | | | | | | | | Fixes issue #411. Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
* | Update version to 2.5.1-devPaul Mackerras2023-05-011-1/+1
|/ | | | Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Further updates to README for 2.5.0 releaseppp-2.5.0Paul Mackerras2023-03-182-291/+305
| | | | | | History from the 2.4.x series is moved to Changes-2.4. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* pppd/tty.c: Use unsigned constants for ACCM calculationsPaul Mackerras2023-03-181-3/+3
| | | | | | | Use unsigned constants to avoid integer overflows when shifting, and because xmit_accm[] is an array of unsigned values. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* radius: Fix list traversal in rc_avpair_insertPaul Mackerras2023-03-181-1/+1
| | | | | | | | | | | | In rc_avpair_insert, if the list element "p" is non-NULL but not actually in the list "a", we can end up with this_node being NULL and being dereferenced. By changing the while test to this_node->next we avoid having this_node being NULL; the loop will terminate when this_node == p or this_node->next == NULL, which is what we want. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* chat: Fix loop condition to avoid possible 1-byte buffer overrunPaul Mackerras2023-03-181-1/+1
| | | | Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* pppdump: Remove compression functions from local copy of zlibPaul Mackerras2023-03-182-2684/+1
| | | | | | | | They aren't used (pppdump only needs decompression), and removing the unused code avoids getting reports from automated tools about possible errors in the unused code. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* CI: add automatic tests, enable ASAN build&test (#399)Ilya Shipitsin2023-03-181-2/+35
| | | | | | * CI: add automatic tests, enable ASAN build&test Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
* Merge pull request #409 from enaess/conf-fixesPaul Mackerras2023-03-183-7/+12
|\ | | | | Additional fixes for various configure options (less frequently used) that broke
| * Compiling with --enable-mslanman is brokenEivind Næss2023-03-171-5/+6
| | | | | | | | | | | | Correcting the call to DesEncrypt() where needed. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * Additional fixes for broken buildEivind Næss2023-03-172-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes the build when - ./configure is run with --disable-plugins - ./configure is run with --disable-peap --disable-eaptls --disable-microsoft-extensions The latter disables the MPPE encryption too, but <pppd/crypto.h> is still needed. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | Fix compilation without ipv6cp support (#408)Eivind Næss2023-03-181-0/+2
| | | | | | | | | | | | | | You can't reference variables that aren't included in the compile. Add #ifdef PPP_WITH_IPV6CP in the get_notifier_by_type function. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | Add a --with-system-ca-path <path-to-ca-directory> option to configure (#406)Eivind Næss2023-03-183-0/+34
| | | | | | | | | | Allow distributions to specify a default CA path. Fix for github issue #405. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | Merge pull request #404 from enaess/stdboolPaul Mackerras2023-03-1819-17/+162
|\ \ | | | | | | Removes autotools include guards for stdbool.h and friends
| * | Adding 'extern "C" {' and '}' declarations to exported header filesEivind Næss2023-03-1719-3/+162
| | | | | | | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * | Should not require third party project to define HAVE_HEADER_HEivind Næss2023-03-171-14/+0
| |/ | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | radius plugin: add fclose operation to fix file pointer not closed after use ↵Bmo2023-03-182-0/+8
|/ | | | | | | (#401) Signed-off-by: Wei Xing <skyxwwalker@gmail.com> Co-authored-by: Wei Xing <skyxwwalker@gmail.com>
* Fixing a few more memory leaks in chat.cRobert Bartel2023-03-171-2/+8
| | | | | | | | Running Valgrind memcheck tool on chat.c while communicating with a modem found additional memory leaks. These fixes plumb those. Signed-off-by: Robert Bartel <r.bartel@gmx.net> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Fixing buffer overflow issue in chat.cRobert Bartel2023-03-171-3/+5
| | | | | | | | | | | | There were two issues here, the report_buffer is too small to hold the value, and accessing the memory outside its bounds. The following fixes was made: - Expand the size of report_buffer to 4096 from 256, this is to account for handling of really long GSM USSD report strings - Make sure to not to access memory outside the bounds of the buffer Signed-off-by: Robert Bartel <r.bartel@gmx.net> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Fix several issues uncovered by Coverity (#397)Eivind Næss2023-03-1711-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix for coverity issue 436265, we should cap copy to size of destination buffer Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fix for coverity issue 436262, llv6_ntoa() returns a pointer to a buffer that can be up to 64 bytes long; likely not a problem, but this will quiet coverity Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fix for coverity issue 436251, not freeing path in the normal flow of the code Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue #436258, Digest maybe uninitialized in some paths of this code Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fix for coverity issue 436254, forgot to free 's' before returning from the function? Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue #436251, memory leak in put_string() function Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue 436215, should copy at most sizeof(devname) bytes Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue #436203, if no authentication (or no accounting) server was found, we still need to free the allocated local instance Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue #436171, use of uninitialized variable Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Use of signed vs unsigned variable in printf for MD4Update Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue #436182, fixing possible buffer overrun in handling of PW_CLASS attribute Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Fixing coverity issue #436156 Signed-off-by: Eivind Næss <eivnaes@yahoo.com> * Compile errors Signed-off-by: Eivind Næss <eivnaes@yahoo.com> [paulus@ozlabs.org - Squashed to avoid breaking bisection] Signed-off-by: Eivind Næss <eivnaes@yahoo.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Merge pull request #386 from enaess/ppp-releasePaul Mackerras2023-03-109-17/+542
|\ | | | | Few more changes before 2.5.0 release
| * Disable building the plugins with static libraries (.a) filesEivind Næss2023-01-301-0/+1
| | | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * Adding copyright text to a few more header files.Eivind Næss2023-01-234-2/+86
| | | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * Add LICENSE.* for GPLv2 and BSD licenses covered by this projectEivind Næss2023-01-232-0/+365
| | | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * Initial update of README for the 2.5.0 release. Additional review + ↵Eivind Næss2023-01-231-0/+31
| | | | | | | | | | | | additions by Paul Mackerras Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * Update of PLUGINS documentationEivind Næss2023-01-231-15/+59
| | | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | pppd: Should check name, not ifname in ppp_set_ifname (#396)Eivind Næss2023-03-101-1/+1
| | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | Fix out-of-bounds accesses to ZPasswordHash arrays (#395)Eivind Næss2023-03-063-12/+12
|/ | | | | | | | | | | | * Add 'const' parameter to input arguments in crypto_ms.* * Round ZPasswordHash buffers up to 24 bytes, as the DES MakeKey() function accesses ZPasswordHash[21] Closes github issue #392 [paulus@ozlabs.org - tidied up headline and commit message] Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* Header file reorganization and cleaning up the public API for pppd version ↵Eivind Næss2023-01-2179-1591/+2651
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update DFS's legal name and email address to correct values. (#381)Dianne Skoll2023-01-123-3/+3
| | | Signed-off-by: Dianne Skoll <dianne@skoll.ca>
* fix typo (#384)lilinjie2023-01-121-1/+1
| | | Signed-off-by: lilinjie <lilinjie@uniontech.com>
* Merge pull request #378 from jkroonza/radius-admin-resetPaul Mackerras2022-12-311-1/+4
|\ | | | | radius: distinguish between User-Request and Admin-Reset.
| * radius: distinguish between User-Request and Admin-Reset.Jaco Kroon2022-12-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For the purposes of our definition: User-Request - remote side hanging up. Admin-Reset - local side hanging up. Reasoning is that typically radius will be used to authentication dial-in users, so if the pppd gets killed locally, that's not the User (client) requesting hangup, but rather the local administrator (be that a manual kill, or as a result of a CoA/Disconnect). Signed-off-by: Jaco Kroon <jaco@uls.co.za>
* | pppd: Fix spurious LCP echo failures with lcp-echo-adaptive optionPaul Mackerras2022-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | If the lcp-echo-adaptive option is specified, it means that seeing received traffic on the link is considered to be an indication that the link is working. Hence, this resets the count of missing LCP echo-replies to 0 when traffic is seen. Without this, occasional echo failures interspersed with link traffic can accumulate and end up causing a disconnection even when the link is working correctly. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* | chat: Improve signal handlingPaul Mackerras2022-11-261-48/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the way that signals are handled in chat. First, signal handlers should not be calling functions which are not async-signal-safe; doing so incurs the possibility of deadlock. Thus we can't call fatal() in signal handlers; instead we set 'fatalsig', which functions both as a flag and as an indication of which signal occurred, and check that at various points (basically after any operation which might block) using the new function checksigs(). Secondly, using sigaction rather than signal() means that we can control whether calls such as read() get restarted after a signal, and whether the signal disposition gets reset when the signal is delivered. That simplifies sigalrm(); we no longer need to re-register the handler, and we don't need the kludge of setting stdin to non-blocking mode in order to get the read() in get_char() to return. This also removes a #ifdef ultrix since ultrix is no longer supported. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* | Merge pull request #370 from Chocobo1/systemdPaul Mackerras2022-10-082-3/+7
|\ \ | | | | | | | | | | | | | | | | | | Fix libsystemd detection Merged despite bogus signoff in the commits being merged, since the changes are trivial. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
| * | Add `enable-systemd` flag to CIChocobo12022-09-251-2/+6
| | | | | | | | | | | | | | | | | | And update package indexes, otherwise apt-get might not find the package. Signed-off-by: Chocobo1 <Chocobo1@users.noreply.github.com>
| * | Fix libsystemd detectionChocobo12022-09-201-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Use uppercase for `prefix` parameter `SYSTEMD_CFLAGS` is used elsewhere so `prefix` cannot be lowercase. https://autotools.info/pkgconfig/pkg_check_modules.html 2. The module name should be `libsystemd` Previously it will result in the following compile error when building pppd/auth.c: > /usr/bin/ld: pppd-auth.o: undefined reference to symbol 'sd_notify@@LIBSYSTEMD_209' > /usr/bin/ld: /usr/lib/libsystemd.so.0: error adding symbols: DSO missing from command line This is due to missing `-lsystemd-daemon` flag which is provided by `libsystemd-daemon-devel` package on Debian or `systemd-libs` on ArchLinux. And the proper .pc file in the package is `libsystemd` not `systemd`. https://stackoverflow.com/a/38303241 Signed-off-by: Chocobo1 <Chocobo1@users.noreply.github.com>
* | Merge pull request #366 from pali/rtnetlink-registerPaul Mackerras2022-09-091-1/+8
|\ \ | | | | | | pppd: Retry registering interface when on rtnetlink -EBUSY error
| * | pppd: Retry registering interface when on rtnetlink -EBUSY errorPali Rohár2022-08-191-1/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | Due to workaround in kernel module ppp_generic.ko in function ppp_nl_newlink(), kernel may return -EBUSY error to prevent possible mutex deadlock. In this case userspace needs to retry its request. Proper way would be to fix kernel module to order requests and mutex locking, so prevent deadlock in kernel and so never return this error to userspace. Until it happens we need retry code in userspace. Signed-off-by: Pali Rohár <pali@kernel.org>
* | Merge pull request #365 from enaess/ppp-optionsPaul Mackerras2022-09-093-20/+95
|\ \ | | | | | | Add option to show all options (show-options)
| * | Add option to show all options (show-options), and fixing up the version ↵Eivind Næss2022-08-183-20/+95
| | | | | | | | | | | | | | | | | | text to include copyright and package name from autotools. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* | | Merge pull request #362 from enaess/ppp-cryptoPaul Mackerras2022-09-0929-730/+2828
|\ \ \ | |_|/ |/| | Create an new API that allows us to abstract the use of the standard crypto functions
| * | Adding back DesEncrypt/DesDecrypt functions as they are a special ↵Eivind Næss2022-08-198-361/+574
| | | | | | | | | | | | | | | | | | incarnation DES w.r.t. RFC2759 Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * | Fixing up the srp compilation to work without SHA1Init() and DesEncrypt()Eivind Næss2022-08-154-48/+77
| | | | | | | | | | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * | Reduce the clutter by defining the MD4/MD5/SHA digest lengths in one place. ↵Eivind Næss2022-08-1513-178/+279
| | | | | | | | | | | | | | | | | | Avoid using these variables in function descriptors. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
| * | Create a new API to abstract the crypto functions used by pppd.Eivind Næss2022-08-1219-671/+2426
| |/ | | | | | | | | | | | | | | | | | | This re-introduces the missing DES encryption functions copied from Openssl 3.0 project. Incorporates a new API for performing MD4/MD5/SHA and encryption using DES-ECB mode. Unit tests are included for respective digest/encryption functions using this new API. With this change, you can pass configure --without-openssl to use the internally provided functions. If you do have openssl, then it will default to use these functions. This also provides a framework to allow other vendors to provide crypto. This closes #333, partially addresses #242 (except the pkcs11 engine support). Word has it that openssl is working on support for this, and the libp11 / opensc project are inclined not to support this. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>