summaryrefslogtreecommitdiffstats
path: root/libexec/rlogind/rlogind.c
Commit message (Collapse)AuthorAgeFilesLines
* Add blacklist support to rlogindlidl2016-06-051-3/+21
| | | | | | | Reviewed by: rpaulo Approved by: rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6593
* rlogin(1): Replace select(2) with poll(2).pfg2016-02-261-43/+23
| | | | Obtanied from: NetBSD (CVS Rev. 1.27 - 1.28)
* Remove the 3rd clause ("advertising clause") of the BSD license asbrueffer2014-02-171-5/+1
| | | | | | | permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp MFC after: 1 week
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-031-3/+4
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Add __unusedcharnier2010-12-201-1/+1
|
* Add a new libc function: cfmakesane(3).ed2010-11-021-4/+5
| | | | | | | | | | | I've noticed various terminal emulators that need to obtain a sane default termios structure use very complex `hacks'. Even though POSIX doesn't provide any functionality for this, extend our termios API with cfmakesane(3), which is similar to the commonly supported cfmakeraw(3), except that it fills the termios structure with sane defaults. Change all code in our base system to use this function, instead of depending on <sys/ttydefaults.h> to provide TTYDEF_*.
* Remove `dead code' from rlogind.ed2010-01-131-12/+1
| | | | | | | - It shouldn't call logwtmp(). Applications like login(1) already make sure both login and logout entries are written to the storage. - There's no need to restore permissions on the pseudo-terminal, since it should be garbage collected by the kernel.
* NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 definesume2005-05-131-6/+1
| | | | | NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now.
* Spell SHUT_RDWR as SHUT_RDWR not 2 as the how argument to shutdown(2).jmallett2005-05-111-1/+1
|
* Fix most cases where the address of an int is passed to a function expecting astefanf2005-02-141-2/+4
| | | | socklen_t * argument.
* Removed Kerberos remnants.ru2005-02-091-40/+5
|
* Fix a sign/unsigned comparison.obrien2003-05-041-5/+5
|
* Use <paths.h> rather than "pathnames.h", and fix a couple of whitespace nits.des2002-05-081-3/+10
| | | | Sponsored by: DARPA, NAI Labs
* o __P removalimp2002-02-071-39/+22
| | | | | o register removal o use new style prototypes and function definitions
* Handle snprintf() returning < -1.brian2001-08-201-1/+1
|
* Handle snprintf() returning -1.brian2001-08-201-0/+2
| | | | MFC after: 2 weeks
* Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. Thesheldonh2001-07-261-1/+1
| | | | | | | definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms>
* MFS: Silence compilation warnings.ru2000-12-071-1/+1
|
* Removed broken PAM support from rshd(8) and rlogind(8). rshd doesru2000-10-121-24/+0
| | | | | | | not allocate a pty(4) so it is not suitable at all for interactive PAM modules. rlogind calls login(1) which is already PAM enabled. Approved by: markm
* Make it compile without -DNO_PAM again.ru2000-10-061-0/+4
|
* sprintf() -> snprintf() paranoia.kris2000-08-041-2/+2
|
* Make compilable without -DINET6.ume2000-07-281-6/+2
| | | | | | | With shut up unused variable warnings. PR: bin/20225 Submitted by: Paul Herman <pherman@frenchfries.net>
* sync iruserok() extension API with other BSDsshin2000-02-011-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of rcmd related function is need to be updated to support IPv6. Some of them are already updated as standard document. But there is also several de-facto functions and they are not listed in standard documents. They are, iruserok() (used by rlogind, rshd) ruserok() (used by kerberos, etc) KAME package updated those functions in original way. iruserok_af() ruserok_af() But recently there was discussion on IETF IPng mailing list about how to sync those API, and it is decided, -Those function is not standard and not documented. -But let BSDs sync their API as de-facto. And after some discussion, it is announced that -add update to iruserok() as iruserok_sa() -no ruserok() API change(it is only updated internaly) So I sync those API before 4.0 is released. The changes are, -prototype changes -ruserok() internal update (use iruserok_sa() inside) -removal of ruserok_af() -change iruserok_af() as static functioin, and also prefix the name with __. -add iruserok_sa() (Just call __iruserok_af() inside) -adding flag AI_ALL to getipnodebyaddr() called from __icheckhost(). This is necessary to support IPv4 communication via AF_INET6 socket could be correctly authenticated via iruserok_sa() -irusreok_af() call is replaced to iruserok_sa() call in rlogind, and rshd. Approved by: jkh
* several tcp apps IPv6 updateshin2000-01-251-17/+68
| | | | | | | | | | | | -inetd -rshd -rlogind -telnetd -rsh -rlogin Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Fix for new Kerberos4. Make a fist cut at PAM-ising while I'm here.markm1999-09-191-135/+27
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Ufff. cflags -> chflags. I could have sworn this change has been inimp1999-08-211-3/+3
| | | | | | my last three successful make buildworlds... Noticed by: phk
* Remove all flags from devices before we try to assert ownership andimp1999-08-211-1/+3
| | | | | | | set permissions. Bug not fixed: We silently ignore failures of chflags, chmod and chown.
* More egcs warning fixes:imp1999-04-251-3/+4
| | | | | | | | | | o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int (and also remove a useless register modifier). Reviewed by: obrien and chuckr
* Ensure that things returned by gethostname() andbrian1999-04-071-3/+3
| | | | | | | | | | friends are terminated and allow for a maximum host name length of MAXHOSTNAMELEN - 1. Put parenthesis around sizeof args. Make some variables static. Fix telnetd -u (broken by my last commit) Prompted by: bde
* Use realhostname() rather than various combinations ofbrian1999-04-061-27/+2
| | | | | | gethostbyaddr() & gethostbyname(). Remove brokeness in ftpd for hosts of MAXHOSTNAMELEN length.
* As previously threatened, clean up the rshd -a option and make it defaultpeter1998-12-161-47/+21
| | | | | | | | | | | | | | | | on rshd and rlogind. However, note that: 1: rshd used to drop a connection with -a if the hostname != ip address. This is unneeded, because iruserok() does it's own checking. It was also wrong if .rhosts had an explicit IP address in it, connections would be dropped from that host solely because the DNS was mismatched even though it was explicitly intended to work by IP address. 2: rlogind and rshd check the hostname mappings by default now because that is what goes into the utmp/wtmp and logs. If the hostname != ip address, then it uses the IP address for logging/utmp/wtmp purposes. There isn't much point logging ficticious hostnames. 3: rshd -a is now accepted (but ignored) for compatability. If you really want to make life miserable for people with bad reverse DNS, use tcpd in paranoid mode (which is questionable anyway, given DNS ttl tweaking).
* Sort #includes. Add rcsid. Add man page section in .Xrefs.charnier1997-11-251-5/+7
|
* Changes for the new KTH Kerberos.markm1997-09-281-8/+16
| | | | Also make -Wall a bit quieter.
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
* Fix various buffer overflows that may or may not be exploitable.imp1997-03-241-5/+7
| | | | | | | Fixes PR 2588 Reviewed by: Dan Cross? Submitted by: Julian Assange
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Some patches for source routed packets from OpenBSD.imp1997-02-091-14/+14
| | | | | | | | | | | | | | | Rev 1.16 deraadt: do not warn about valid options; invalid options correctly quit Rev 1.15 deraadt: need not clear options since bad ones cause exit; provos@ws1.physnet.uni-hamburg.de Rev 1.14 deraadt: IPOPT_LSRR/IPOPT_SSRR must exit() due to tcp sequencing; pointed out by provos@wserver.physnet.uni-hamburg.de. also another 1-char buffer overflow. Reviewed by: Peter Wemm Obtained from: OpenSBD
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* add forgotten $Id$wosch1996-09-221-0/+2
|
* Fix some compilation warnings.pst1996-09-211-1/+1
|
* #include <kerberosIV/des.h> -> #include <des.h>markm1996-02-111-1/+1
|
* Rename des_set_key -> des_set_key_krb. (libdes conflict)markm1996-02-031-1/+1
|
* Fix typo.nate1995-12-021-1/+1
|
* It is not necessary to check if a '-' is in lusername., Checking ifguido1995-12-011-1/+1
| | | | | lusername starts with a '-' is enough. Otherwise, no users with a '-' in there name can use rlogin.
* Stop rlogind from bogusly ignoring an explicit .rhosts file for root.peter1995-11-201-3/+2
| | | | It still correctly ignores hosts.equiv. This is now consistant with rshd.
* Added a -D option to set the TCP_NODELAY socket option. This improvesdg1995-10-151-4/+13
| | | | responsiveness at the expense of some additional network traffic.
* Kerberos can now deal with multi-homed clients.gibbs1995-10-051-1/+1
| | | | | | | | | | | | | | Kerberos obtains a network address for the local host from the routing tables and uses it consistently for all Kerberos transactions. This ensures that packets only leave the *authenticated* interface. Clients who open and use their own sockets for encrypted or authenticated correspondance to kerberos services should bind their sockets to the same address as that used by kerberos. krb_get_local_addr() and krb_bind_local_addr() allow clients to obtain the local address or bind a socket to the local address used by Kerberos respectively. Reviewed by: Mark Murray <markm>, Garrett Wollman <wollman> Obtained from: concept by Dieter Dworkin Muller <dworkin@village.org>
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* Plug security hole that was already fixed in 1.1. It preventsguido1994-08-151-0/+5
| | | | | | | | user from specifying their hostname when rlogin()-ing in (using rlogin -f-h<host>) Reviewed by: Submitted by:
OpenPOWER on IntegriCloud