summaryrefslogtreecommitdiff
path: root/pppdump
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* pppdump: Avoid out-of-range access to packet bufferPaul Mackerras2022-08-041-1/+6
| | | | | | | | | | | | | | This fixes a potential vulnerability where data is written to spkt.buf and rpkt.buf without a check on the array index. To fix this, we check the array index (pkt->cnt) before storing the byte or incrementing the count. This also means we no longer have a potential signed integer overflow on the increment of pkt->cnt. Fortunately, pppdump is not used in the normal process of setting up a PPP connection, is not installed setuid-root, and is not invoked automatically in any scenario that I am aware of. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* The use of <net/ppp_defs.h> isn't guranteed to exist on Linux (e.g. uclibc, ↵Eivind Næss2022-07-154-3/+7
| | | | | | | | buildroot, others) The one provided by glibc simply includes <linux/ppp_defs.h>. This include is still needed on SunOS Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* For Linux, use the Linux / Glibc based defines instead of included headersEivind Næss2022-07-154-11/+15
| | | | | | | | | | | | | | | | | | | | | | This is to ensure compatibility with the OS you are compiling against and that headers are maintained in upstream projects. - Moved PPP_EAP and PPP_ECP into respective header files in lieu of not currently existing in the linux/ppp_defs.h - Unchained the top-level ${topsrc_dir}/include, this folder is included for prosterity and may continue to exist on github, but in the future eliminated from distribution - Bogus upstream file in glibc for <net/if_ppp.h>, its content should be replaced with a simple include to <linux/ppp-ioctl.h>. The lack of an appropriate ifreq structure with ppp_stats or ppp_comp_stats, implementet that inline (and tested). - Updated instances where PPP_FCS() macro would expand the fcstab, while PPP_GOODFCS and PPP_INITFCS is provided in <linux/ppp_defs.h>, the latter is tied to a lookup table. It's used in two places, so add the PPP_FCS macro where applicable. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* Remove obsolete Makefile(s) and configure scriptsEivind Næss2021-07-202-47/+0
| | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* Incorporating review feedback from David Seifert.Eivind Næss2021-07-201-4/+1
| | | | Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
* Use autoconf/automake to configure and make pppEivind Næss2021-07-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add pkgconfig support to PPP project (#270)Eivind Næss2021-04-241-1/+2
| | | | | | | | | | | | | | | | | | | This adds pppd.pc into $(INSTROOT)/$(LIBDIR)/pkgconfig. On some distributions this would be /lib/pkgconfig, or /usr/lib/pkgconfig, but other distributions may consider specifying --libdir=/usr/lib/x86_x64-linux-gnu/ and the pkgconfig directory would be under that. Allowing --libdir to be specified at configure time fixes #223, providing pkgconfig support fixes #19 and allows third party packages pickup the plugin directory. Manually cherry picking parts of two commits by @lkundrak from: https://github.com/NetworkManager/ppp/tree/lr/pkgconfig Mainly, the difference between the original commit is not to replace DESTDIR with "prefix". Leave DESTDIR alone, and add needed pkgconfig (pppd.pc.in) as a part of the linux distribution (previously in pppd/plugin directory). This fixes GitHub issues: #19 #47 and #223 Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
* Add cross-compilation support on LinuxPaul Mackerras2021-01-011-2/+5
| | | | | | | | | | | | | | | This adds three new command-line options to the configure script: --cross_compile=<prefix> (default "") --cc=<compiler> (default cc) --cflags=<compile flags> (default -g -O2 -pipe) These get propagated to the Makefiles in the subdirectories. The cross-compile prefix is prepended to the CC value, so for example if you do "./configure --cross_compile=powerpc64le-linux-" then everything gets compiled and linked using powerpc64le-linux-cc. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Allow overriding the optimization level with CFLAGS (#197)Samuel Thibault2020-12-311-1/+2
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: Marco d'Itri <md@linux.it>
* Revert "pppdump: support building with the system zlib (#189)"Paul Mackerras2020-12-311-26/+2
| | | | | | | | | | | | | | | | | | This reverts commit c98cc28f128dffc456488c74b600640057da6994 because of compile errors in pppdump: cc -o pppdump pppdump.o deflate.o bsd-comp.o -lz /usr/bin/ld: deflate.o: in function `z_incomp': deflate.c:(.text+0x99): undefined reference to `inflateIncomp' /usr/bin/ld: deflate.o: in function `z_decomp_alloc': deflate.c:(.text+0x355): undefined reference to `inflateInit2' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:38: pppdump] Error 1 The copy of zlib here is not the same as the standard upstream zlib; this version has some extra functions added. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* pppdump: support building with the system zlib (#189)Samuel Thibault2020-12-311-2/+26
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: Marco d'Itri <md@linux.it>
* Do not strip installed binaries (#186)Samuel Thibault2020-12-311-1/+1
| | | | | | This should be done by the packaging system, to be able to separate out debugging symbols into separate packages. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Convert to ANSI CPaul Mackerras2020-12-293-91/+52
| | | | | | | | | | | | | | | 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>
* Added missing options to manual pages. (#149)Jaroslav Škarvada2020-05-251-0/+5
| | | | | | In Fedora we did man page scan and identified missing options. This is an attempt to add them to the manual pages. Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* pppdump: Eliminate printf format warning by using %zdPaul Mackerras2019-10-021-1/+1
| | | | Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
* Honor LDFLAGSJaroslav Škarvada2018-05-281-1/+1
| | | | | | | | | | This makes the makefiles include $(LDFLAGS) as a parameter when linking executables. Distros use this as a way of applying linker flags across all the executables they build. [paulus@ozlabs.org - supplied the patch description] Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* pppdump: Eliminate some compiler warningsPaul Mackerras2013-02-032-8/+8
| | | | | | | | gcc lacks the -fyes-actually-I-do-know-the-C-operator-precedence-rules option, so add some parentheses to shut it up. Also remove some unused variables. Signed-off-by: Paul Mackerras <paulus@samba.org>
* pppdump: Fix printfs with insufficient argumentsPaul Mackerras2011-03-051-2/+2
| | | | | Reported-by: Dan Wallis <mrdanwallis@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Remove files that don't go into releasesPaul Mackerras2008-07-272-42/+0
| | | | | | | This mainly removes files specific to platforms that we no longer support, and removes a few other outdated files. Signed-off-by: Paul Mackerras <paulus@samba.org>
* Get the repository a bit closer to what will be releasedPaul Mackerras2008-07-272-2/+1
| | | | | | | * Remove .cvsignore files and create .gitignore files where needed * Add files that were in the last release but not in CVS Signed-off-by: Paul Mackerras <paulus@samba.org>
* Add $(INSTDIR) to installation paths in Linux makefiles.Paul Mackerras2006-06-041-1/+1
| | | | | | | | | | | | | | | | Patch from Robert Vogelgesang. This patch re-introduces the possibility for package maintainers to install into a different filesystem tree. This is done by adding $(INSTROOT) at various places; the package maintainers can then issue a make install INSTROOT=/some/where/else when they package pppd for their distribution. In previous versions of the ppp package this was possible using the variable DESTDIR, but this variable is now used for a different purpose and cannot be changed via additional parameters of the make command.
* Correctly escape or unescape hypens in the man pages.Paul Mackerras2004-11-131-14/+14
| | | | | Without this patch "-" is rendered as the endash in unicode consoles and then bad things happen. From Marco d'Itri.
* Put man pages in /usr/share/man under Linux.Paul Mackerras2004-10-311-1/+1
|
* Add --prefix and --sysconfdir options to configure, and putPaul Mackerras2004-10-291-2/+6
| | | | | @DESTDIR@ and @SYSCONF@ tags in various Makefile.linux files. These tags get expanded by configure.
* Fixed compilation failure on Solaris due to new CHAP (missing chap-md5.oJames Carlson2004-01-173-2/+17
| | | | | | | | | | in makefile). Updated ppp_mod so that it will work with Solaris 10 and beyond (identify entry point is now obsolete). Fixed warnings in chat, bsd-comp, deflate, vjcompress, chap-new, sys-solaris, tty, pppdump, ppp_comp.
* More copyright updates. The new CMU copyright notice is from CMU andPaul Mackerras2002-12-063-49/+85
| | | | | | now 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.
* Added ability to detect and use either gcc or Sun WorkShop C compilerJames Carlson2002-09-071-2/+2
| | | | | | | on Solaris. Added support for Solaris 10. Quieted down warning in ppp_comp.c due to bad preprocessor usage. Quieted WorkShop warnings in options.c (casting of void * to function) and pppd.h (constant too large). Tested in 32 and 64 bit modes with gcc and WorkShop.
* change to bsd-style licencePaul Mackerras2001-03-121-4/+8
|
* 1) Created a subdirectory called 'solaris'. Currently it contains a replicaAdi Masputra2000-04-181-2/+2
| | | | | | | | | | | | of the 'svr4' directory. However, over time, files in this directory will contain the same code as the kernel-portion of pppd in future releases of Solaris, hence they most probably will change in contents and/or sub-structure. 2) Changed the 'configure' script to not create symbolic link Makefiles when the OS is SunOS 4.x. Under 'SunOS' category, only SunOS 5.x (or Solaris 2.x) is currently enabled. 3) Changed the rest of the utilities + pppd daemon Makefile.sol2 to point to the solaris/Makedefs instead of the one in svr4 directory.
* Clean up the rest of objects during make clean.Adi Masputra1999-09-221-2/+2
|
* add -a option to print absolute times (instead of relative)Paul Mackerras1999-08-241-29/+50
|
* use $(INSTALL) not installPaul Mackerras1999-08-121-2/+4
|
* updatePaul Mackerras1999-05-121-0/+1
|
* use memset not bzeroPaul Mackerras1999-04-162-4/+4
|
* add man page for pppdump and add it to the list of thingsPaul Mackerras1999-04-015-0/+128
| | | | to be installed on linux, sol2, svr4, sunos4
* make it compile under sunosPaul Mackerras1999-04-014-12/+10
|
* print timestamp at beginning of each sectionPaul Mackerras1999-03-251-14/+42
|
* need these tooPaul Mackerras1999-03-242-0/+13
|
* check in pppdump sourcesPaul Mackerras1999-03-236-0/+6940