summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/server.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't even look at af_family if accept() returns sa->sa_len == 0brian2001-02-131-0/+4
|
* Only remove socket files with ``set server open''.brian2001-01-291-3/+4
| | | | | | | Only show the mask in ``show bundle'' when it's been specified. Complain about unexpected arguments after ``set server {none,open,closed}'' Log re-open failures as warnings rather than phase messages. Fix some markup for the ``set server'' man page description.
* Allow ``set server closed'' to close the diagnostic socket.brian2001-01-261-39/+111
| | | | | | | | | Allow ``set server open'' to re-open the diagnostic socket. Handle SIGUSR1 by re-opening the diagnostic socket When receiving SIGUSR2 (and in ``set server none''), don't forget the socket details so that ``set server open'' and SIGUSR1 open it again. Don't create the diagnostic socket as uid 0 ! It's far to dangerous.
* Various whitespace changes.brian2000-10-301-1/+2
| | | | Make some functions static.
* Don't use the umask to chmod local domain server sockets, usebrian2000-05-311-1/+1
| | | | the mask
* Correct UN_SIZE definitionbrian2000-03-141-1/+1
| | | | Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
* To avoid namespace polution in NetBSD:brian2000-03-141-4/+4
| | | | ``struct descriptor'' -> ``struct fdescriptor''
* Back out the bogus #ifdef __NetBSD__ #include <signal.h> lines.brian1999-09-211-3/+0
| | | | | | | The original report was due to a mis-installation of the NetBS header files :-/ Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
* NetBSD has moved ``extern int errno;'' to signal.h :-/brian1999-09-201-0/+3
| | | | Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Don't destroy the old server socket another ``set server''brian1999-03-081-5/+11
| | | | call fails.
* Correctly drop existing connections when reopening the diagnosticbrian1999-03-071-2/+2
| | | | socket.
* PR: 7469brian1998-08-021-2/+6
| | | | | | Be careful that the current or next prompt in the list that we're iterating through doesn't get changed by descriptor_Read().
* Remove redundant includesbrian1998-06-271-19/+1
|
* o If we come out of select() with only write descriptors thatbrian1998-06-241-2/+3
| | | | | | | | | | | end up writing zero bytes, sleep for 1/10 of a second so that we don't end up using up too much cpu. This should only ever happen on systems that wrongly report a descriptor as writable despite the tty buffer being full. Discussed with: Jeff Evarts o Do an initial run-time check to see if select() alters the passed timeval. This knowledge isn't yet used, but will be soon.
* Change some log levels. ALERTs are only logged whenbrian1998-06-161-2/+2
| | | | | | something that can't happen happens or when everyone needs to know. ERRORs are only logged when something unexpected happens.
* o Move our prompt descriptor list outside of the bundle.brian1998-05-231-46/+71
| | | | | | | | | | | | | | | | | | | | It's now dealt with by the `server' object. This simplifies things as we only have one list of prompt descriptors and the log_ routines check prompt::logactive to determine whether it should be used for output. o Include the MP socket UpdateSet() result in bundle::UpdateSet(). o Don't select on the tun device unless we're in NETWORK phase or AUTO mode. o Stop the idle timer when we go to DEAD phase. We may have transferred a link and not had a chance to kill it. o Don't fail when trying to unlink our transferred datalink from our descriptor lists just before the transfer. o Add our link descriptor to the write set if we got a short write the last time (physical::out is set). o Log the connection source address when a connection is closed. o Remove descriptor::next field. Descriptor lists are not required any more.
* MFMP: Make ppp multilink capable.brian1998-05-211-62/+166
| | | | See the file README.changes, and re-read the man page.
* MFMP: LogWARN rather than LogERROR when we can't createbrian1998-02-181-5/+5
| | | | our diagnostic socket.
* Remove unused #includes.brian1998-01-211-2/+1
| | | | | | Make various bits static. Remove unused variables. Submitted by: eivind
* Cosmetic (style):brian1997-12-241-3/+3
| | | | | | | sizeof(var) -> sizeof var sizeof type -> sizeof(type) Suggested by: J Wunsch <j@uriah.heep.sax.de>
* Add (BSD) copyright headers.brian1997-12-211-2/+26
|
* Zero struct sockaddr_??s before filling them in.brian1997-12-211-1/+3
| | | | Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Abstract the CCP layer a level.brian1997-12-031-2/+1
| | | | Add DEFLATE support.
* Fix prototypes.brian1997-11-221-3/+2
| | | | | | | | | | | | | | Remove extraneous decls. Add ``const'' to several places. Allow ``make NOALIAS=1'' to remove IP aliasing. Merge with OpenBSD - only the Makefiles vary. We can now survive a compile with -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts (although the Makefile just contains -Wall).
* Finish the security improvements:brian1997-11-111-3/+3
| | | | | | | | | | | | | | | | | | | o Add "allow" command: "allow users a b c" gives access to users a, b and c. "allow modes auto" gives those users access to auto mode only. "allow users *" and "allow modes *" are accepted. No users and all modes are allowed by default. UID 0 can do anything. o Set the current label with the "load" and "dial" commands so that the call to ppp.linkdown makes sense. o Up the verison number. o Don't OR MODE_AUTO for -background and -ddial. o Don't OR MODE_INTER when we get a diagnostic connection. o Allow up to 40 args per line (was 20). o "set ifaddr" only changes the interface in AUTO mode (with other modes, it happens after IPCP negotiation). o Sort command descriptions in the man page. o Support -dedicated mode where we just talk ppp forever (no login etc).
* Don't create a diagnostic socket by default.brian1997-11-091-5/+8
| | | | | | Allow a password spec on the "set server" command line. Use SIGUSR2 to close the diagnostic socket. Some man page corrections.
* Increase chat script sizes to 512brian1997-11-091-2/+2
| | | | Requested by: Michael Reifenberger <root@totum.plaut.de>
* Introduce ID0 logging.brian1997-11-091-6/+7
| | | | | | | | Stay as the invoking uid as much as possible. Execution as a normal user is still forbidden for now, so these changes are pretty ineffective. The next commit will implement the modifications suggested on -hackers a number of days ago.
* Cosmetic (no functional changes):brian1997-10-261-19/+15
| | | | | | | | | | | | | | | o Add missing $Id$s o Move extern decls from .c -> .h files o Staticize o Remove #includes from .h files o style(9)ify includes o bcopy -> memcpy bzero -> memset bcmp -> memcmp index -> strchr rindex -> strrchr o Move timeout.h -> timer.h (making it consistent w/ timer.c) o Add -Wmissing-prototypes
* Correct ppp authentication defaults in interactivebrian1997-09-091-0/+12
| | | | | | | | | mode. We don't want to be forced to type a password here :-( Pointed out by: mouth@ibm.net (John Kelly) While I'm there, don't allow a "set server" in interactive mode.
* Install as group ``network''brian1997-09-041-7/+18
| | | | | | | | | | | Insist that uid == 0 for client ppp Disallow client sockets if no password is specified Don't exit on failure to open client socket for listening Allow specification of null local password Use reasonable size (smaller) ``vector''s in auth.c Fix "passwd ..." usage message Insist on "all" as arg to "quit" (if any) Drop client socket connection before Cleanup() when "quit all"
* Make the code format more in line with style(9).brian1997-08-251-63/+62
| | | | | Update loadalias to use the new libalias api. Update to version 1.1.
* Allow specification of a umask for local socketbrian1997-06-301-1/+5
| | | | creation in "set server" command.
* Add "set server" to control the server socket.brian1997-06-251-0/+120
Catch SIGUSR1 to re-init listening socket. Document signal behaviour. Add missing '\n's to LogPrintf(LogWARN,...) Main() returns int not void. AF_LOCAL ideal suggested a long time ago by: joerg
OpenPOWER on IntegriCloud