Commit Graph

89 Commits

Author SHA1 Message Date
Adi Masputra
d1eaa65014 This is main.c from ppp-2.3.11.tar.gz distribution to fix compilation errors. 2000-01-18 19:49:52 +00:00
Paul Mackerras
76218f4f41 infrastructure for callback
add list of protocol names
connect_delay option
1999-12-23 01:28:27 +00:00
Paul Mackerras
3943299d6e create log file safely, don't create world-writable files 1999-11-15 03:55:37 +00:00
Paul Mackerras
07de73a331 Add plugin support plus an initial selection of hooks.
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.
1999-09-11 12:09:00 +00:00
Paul Mackerras
a6b37e9337 fix buglet 1999-08-24 05:59:15 +00:00
Paul Mackerras
2e53641535 Rest of IPV6 merge which got lost somehow, plus some minor fixes. 1999-08-24 05:31:12 +00:00
Paul Mackerras
a3630de20e Fix the rcsid's for non-ansi compilers 1999-08-13 06:46:23 +00:00
Paul Mackerras
eec3836d78 add linkname option 1999-08-13 01:57:37 +00:00
Paul Mackerras
ee0fba791a add maxfail option to control the max # of failed attempts 1999-08-12 04:17:07 +00:00
Paul Mackerras
a4efaa63e6 allow options in secrets files
only disable holdoff if link terminated by idle timer
open all network protos on callback
add init and logfile options
document various options
1999-07-21 00:24:32 +00:00
Paul Mackerras
10d17d19d3 set env vars with link stats 1999-05-13 00:35:23 +00:00
Paul Mackerras
8592783058 exit with an appropriate value to indicate what happened
look in included options files for device name before
processing options.ttyname file
don't send log output to the serial port
cope with user specifying a symlink to the device on stdin
add logfd and nologfd options
insist that the device is a character device
1999-05-12 06:19:49 +00:00
Paul Mackerras
0c7a998d25 fix buglets 1999-04-28 02:45:44 +00:00
Paul Mackerras
529cd066e0 fix pid handling 1999-04-16 11:35:06 +00:00
Paul Mackerras
8821c36a77 add debugging messages about waiting for children at exit 1999-04-12 06:44:42 +00:00
Paul Mackerras
e8be982dbc Move some stuff (printing, logging, [un]locking) into utils.c.
Unified the locking code, added relock().
Revert strlcpy to strncpy when filling in utmp structs.
Fixed some bugs in DNS addr option handling.
Set PPPLOGNAME with login name of user.
Moved daemon() logic into detach().
Fix bug where errno was clobbered by seteuid().
Use pty in sys-linux.c when making a ppp unit.
1999-04-12 06:24:53 +00:00
Paul Mackerras
f941c11e2e remove another ansi-C-ism 1999-04-01 07:19:59 +00:00
Paul Mackerras
52e781b87d small changes suggested by Seth Chaiklin 1999-04-01 07:08:49 +00:00
Paul Mackerras
2822dcefdd remove unneeded (harmful) closes in device_script
run disconnector on some errors
1999-03-31 12:30:01 +00:00
Paul Mackerras
768532f702 add reopen_log(), call it after using PAM stuff 1999-03-31 05:39:43 +00:00
Paul Mackerras
465758ae80 set the SPEED variable later so it is valid 1999-03-30 06:01:24 +00:00
Paul Mackerras
7bf6751db9 Fix the behaviour of device_script when in/out are < 2.
Only call reap_kids if we have seen a SIGCHLD.
1999-03-30 04:22:57 +00:00
Paul Mackerras
7673a24dfc Add timestamp at beginning of each section of record file.
Open device as root if it is the default device.
1999-03-25 01:30:32 +00:00
Paul Mackerras
f409b9f7b0 should read the tty options file now. 1999-03-24 05:05:25 +00:00
Paul Mackerras
408e882428 Allow record option with pty option.
Open record file in charshunt.
Be more careful about closing things.
Ignore SIGHUP in charshunt.
1999-03-23 01:23:46 +00:00
Paul Mackerras
5ba9d88b94 Add pty, notty and record options.
Fix stats - problem was differing stats structures between
linux and other platforms.
Fix for removing proxy arp entry on linux.
IPX patches.
1999-03-22 05:55:40 +00:00
Paul Mackerras
ab7cff041f remove a couple of ansi-C-isms.
loop_frame is needed by some sys-*.c.
print connect time and bytes transferred on close;
added get_ppp_stats to sys-*.c.
1999-03-19 04:23:54 +00:00
Paul Mackerras
d3a41a77db added log_to_fd to specify which fd log output should go to.
device_script now connects script's stderr to log_to_fd.
made some more functions static.
got rid of quit().
changed order of args to strlcpy/strlcat.
do get_input before checking kill_link.
1999-03-19 01:26:41 +00:00
Paul Mackerras
1e7bc3ea35 add data_name to struct protent
call lcp_lowerdown when connection terminates
1999-03-16 22:54:43 +00:00
Paul Mackerras
e0b13abaf1 don't print debug msgs to stderr unless debug is set 1999-03-16 03:14:50 +00:00
Paul Mackerras
00d6a7e0e3 add %P and %B formats, fixed %I
change to using add_fd, remove_fd
and eliminate wait_loop_output, wait_time
change sprintf -> slprintf
don't set euid = user's UID on reopening the device because
we have changed the permissions by then
write log messages to stderr if not detached and not using
default device
1999-03-16 02:50:15 +00:00
Paul Mackerras
1fae28ce79 use strlcpy, strlcat, slprintf everywhere
add privgroup option
don't allow devname, connector etc. set in privileged place
to be overridden by non-privileged user
use error, warn, etc. functions instead of syslog
fix problem where signals were blocked for too long
1999-03-12 06:07:24 +00:00
Paul Mackerras
baef0b4051 minor changes so it compiles with pre-ansi compiler;
move hangup_modem back into main.c
1999-03-08 05:34:46 +00:00
Paul Mackerras
a00baab063 leave the real user ID as the user's now 1999-03-06 11:28:11 +00:00
Paul Mackerras
8a68ed35b0 open the device as the user unless the device name came from a
privileged source
1999-03-02 05:59:22 +00:00
Paul Mackerras
ef6f6d6245 limit printing of excess data in log to 32 bytes 1999-03-02 05:36:42 +00:00
Paul Mackerras
61ebd9732d minor fixes, update man page 1999-02-26 10:38:52 +00:00
Paul Mackerras
c134aa17fc use fchmod rather than chmod to restore device permissions 1999-01-19 23:59:39 +00:00
Paul Mackerras
bfa20ccde2 Update to new pppd with new option parsing stuff 1998-11-07 06:59:32 +00:00
Paul Mackerras
55f9a71c29 Change UID to ORIG_UID because bash defines UID. 1998-09-13 23:38:49 +00:00
Paul Mackerras
a730390166 Trap recursive bad_signal calls; idea from Richard Hipp. 1998-05-05 05:24:17 +00:00
Paul Mackerras
a0b38f1d1c Make packet printing stuff use vfmtmsg 1998-04-28 23:37:30 +00:00
Paul Mackerras
7097785dc7 rewrite the pid file when using updetach 1998-03-30 06:25:34 +00:00
Paul Mackerras
8d95b4cae8 Added updetach option. 1998-03-26 04:46:08 +00:00
Paul Mackerras
ed8ac3e1ef Pass useful info to scripts in environment variables. 1998-03-25 01:28:14 +00:00
Paul Mackerras
ed6e1e3e4a don't need IFNAMSIZ now 1998-02-04 01:40:59 +00:00
Paul Mackerras
4f5d76ea5e set CLOCAL before running connector.
exit(1) on failure.
1997-11-27 06:09:20 +00:00
Paul Mackerras
8770e3b90e don't set CLOCAL when running connector 1997-07-14 03:53:25 +00:00
Paul Mackerras
9678d8e116 open the device a second time to wait for carrier if modem && !connector 1997-04-30 05:54:52 +00:00
Paul Mackerras
01548ef15e connect time stuff gone to auth.c,
don't die on EINTR from opening tty,
ignore NCP packets during authentication,
fix recursive signal problem in kill_my_pg
1997-03-04 03:41:17 +00:00