summaryrefslogtreecommitdiffstats
path: root/usr.bin/login/login.c
Commit message (Collapse)AuthorAgeFilesLines
* Simple fix so the 'LOGIN FAILURE' message send to syslog will includegad2002-03-121-1/+0
| | | | | | | the correct userid, instead of random garbage. This bug does not exist in -stable. Reviewed by: freebsd-audit
* Switch to OpenPAM. Bump library version. Modules are now versioned, sodes2002-03-051-3/+3
| | | | | | | | | applications linked with Linux-PAM will still work. Remove pam_get_pass(); OpenPAM has pam_get_authtok(). Remove pam_prompt(); OpenPAM has pam_{,v}{error,info,prompt}(). Remove pam_set_item(3) man page as OpenPAM has its own. Sponsored by: DARPA, NAI Labs
* Still with asbestos longjohns on, completely PAMify login(1) and removedes2002-01-301-529/+369
| | | | | | code made redundant by various PAM modules (primarily pam_unix(8)). Sponsored by: DARPA, NAI Labs
* Back out rev 1.78, which is incorrect now that the PAM modules have beendes2002-01-291-3/+2
| | | | fixed to accept a NULL PAM_RHOST.
* When running on a local terminal, set PAM_RHOST to the local hostname.des2002-01-211-2/+10
| | | | Sponsored by: DARPA, NAI Labs
* Back out PAM_CRED_ERR additionache2002-01-191-1/+0
|
* Add PAM_CRED_ERR as valid failure caseache2002-01-191-0/+1
|
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-101-5/+6
| | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF.
* Use __FBSDID(). Also do a bit of cosmetic #if and header-ordermarkm2001-12-021-11/+5
| | | | cleaning-up.
* Sort includes.markm2001-12-021-4/+4
|
* Style fixups.markm2001-12-011-25/+26
| | | | | | | Sort function declarations, includes. Make consistent WRT use of _P() macro (ugh!) Inspired by: bde
* WARNS=2 fixes.markm2001-12-011-43/+58
| | | | Reviewed by: bde (a while back)
* o Add support for a 'nocheckmail' capability, which (if true) preventsrwatson2001-11-161-9/+12
| | | | | | | | | the 'You have mail.' check. This is useful for sites that rely on remote mail access, rather than a local mail spool. Due to the behavior of login_getcapbool(), the negated form is required so as to have appropriate results. o This behavior may have to be independently added to sshd due to redundant implementation.
* o Modify NFS rights comment to note that the early credential changesrwatson2001-09-151-1/+7
| | | | | | to test for a home directory don't set up the additional groups, and as such may limit users conservatively. This does not affect the eventual credentials selected.
* Like su(1), make PAM use mandatory. Remove parts of the authenticationmarkm2001-08-301-40/+1
| | | | logic that are handled by PAM. Fix documentation to reflect this.
* Fix some bogus strncpy(3) to strlcpy(3) changes I made in the previousmike2001-08-131-6/+6
| | | | | | | revision. <utmp.h> structures don't leave room for a NUL character. Also fix "UNKNOWN" which should have just been UNKNOWN. Pointed out by: bde
* o Replace occurrences of strncpy(3) with strlcpy(3); most ofmike2001-08-121-23/+47
| | | | | | | | | | | | | the uses of it were wrong anyway. o Always check for NULL returns on strdup(3). o Fix a possible buffer overflow in strcpy(3). o Fix a format string vulnerability. o t->ty_type in stypeof() could be NULL and eventually cause a segmentation fault in setenv(3), so check for that. Eyeballed by: kris Reviewed by: murray MFC after: 3 days
* Fix the environment handling:markm2001-07-281-12/+11
| | | | | | | | However, there's still a bug in login.c because you copy the environment *before* the call to pam_open_session, which won't set the necessary variables set by /usr/ports/security/pam_ssh. Submitted by: Volker Stolz <stolz@hyperion.informatik.rwth-aachen.de>
* Fix the type of the NULL arg to execl()brian2001-07-091-1/+1
| | | | Idea from: Theo de Raadt <deraadt@openbsd.org>
* Remove an accidentaly added extra blank line.eric2001-05-221-1/+0
| | | | Approved by: murray
* Disable SIGHUP while getting the login name.guido2001-05-211-0/+2
| | | | Reviewed by: security-officer
* Missed a few things.obrien2001-05-181-3/+4
|
* In a word -- style(9).obrien2001-05-181-43/+51
|
* Add the "prompt" and "passwd_prompt" fields to /etc/login.conf,obrien2001-05-181-3/+8
| | | | | | which makes lgoin more like getty in its ability to be configured. Submitted by: tlambert (code only)
* Check for the expiration of an account and its password in the propereric2001-05-171-12/+13
| | | | | | | | | order. Reviewed by: -audit (silence) Approved by: murray Obtained from: OpenBSD MFC after: 5 days
* Add full PAM support for account management and sessions.markm2001-03-271-29/+93
| | | | | | | The PAM_FAIL_CHECK and PAM_END macros in su.c came from the util-linux package's PAM patches to the BSD login.c Submitted by: "David J. MacKenzie" <djm@web.us.uu.net>
* Fix login so that it exports environmental variables that are set by PAMnectar2001-02-091-0/+58
| | | | | | | | modules (via pam_putenv). The following variables will never be set in this fashion: SHELL, HOME, LOGNAME, MAIL, CDPATH, IFS, PATH any variable starting with `LD_'
* Call pam_setcred.nectar2001-01-231-0/+4
| | | | Reviewed by: markm, months ago
* Add braces to avoid ambiguity in a nested conditional (silences a gccsheldonh2000-04-261-1/+2
| | | | warning).
* Fix excessive use of parenthesis in previous commit.sheldonh2000-04-251-1/+1
| | | | Requested by: bde
* Do not issue a warning when chflags() fails with EOPNOTSUPP.sheldonh2000-04-131-1/+1
| | | | | PR: 17875 Submitted by: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
* Fix diagnostic printing test condition (was always true)ache2000-02-281-1/+1
| | | | Approved by: jkh
* Added IPv6 name resolving support for utmp logging.shin2000-02-191-15/+42
| | | | Approved by: jkh
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Clear all file flags when taking ownership of devices. Do not ignoreimp1999-08-211-3/+13
| | | | | chown failures in some places, but instead log them like we do all other errors.
* remove uid switching before login_getpwclass, now done inside libutilache1999-04-241-3/+6
| | | | add gid switching before chdir and comment why it needed
* Don't perform the trimdomain() functionality twice,brian1999-04-071-12/+3
| | | | trimdomain() now works as expected.
* Add a compile knob to avoid using PAM code (login will use standard Unixabial1999-01-191-1/+11
| | | | | | | authentication only). This comes handy when you're tight on space. Submitted by: mostly John Baldwin <jobaldwi@vt.edu> Reviewed by: John D. Polstra <jdp@polstra.com>
* Make the timeout handler log any failed logins, to make sure failedeivind1999-01-031-7/+17
| | | | logins get logged.
* ATTENTION: INSTALL "/etc/pam.conf" FROM "src/etc"!!!jdp1998-11-211-106/+145
| | | | | | | | Change login to use PAM for authentication. I kept the built-in passwd/NIS authentication support, to handle cases where the system is missing its "/etc/pam.conf" file. S/Key and KerberosIV authentication methods are removed from the login program, but still available in PAM modules.
* unifdef -DLOGIN_CAP. After almost 2 years, I think we can assumejdp1998-11-111-73/+2
| | | | | | it's here to stay. This code is starting to look almost reasonable again.
* Remove support for LOGIN_CAP_AUTH. It was never enabled, it wasjdp1998-11-111-125/+2
| | | | | | | | | not complete, and it hasn't been touched for 18 months. All the ifdefs obfuscate the code. I discussed the LOGIN_CAP_AUTH support with its author and he agreed that it is a dead end. I am bringing PAM into the tree within the next two weeks. It is much more flexible than LOGIN_CAP_AUTH, and will serve as a superior replacement for it.
* Fix a const-related compiler warning.jdp1998-11-111-2/+3
|
* Use KJH's auth.conf parser to turn on/off Kerberos in userland.markm1998-10-091-2/+9
|
* Remove hardcoded constant in favour of login.conf value.jkoshy1998-08-171-2/+2
| | | | | PR: 6529 Submitted by: Dan Lukes <dan@obluda.cz>
* Backed out rev.1.31. It was a workaround for bugs in rev.1.4 ofbde1998-07-311-5/+1
| | | | | | | | | | | | | | libc/gen/getpass.c. The old behaviour of blocking SIGINT and not changing SIGQUIT was restored in rev.1.5 of getpass.c. The change here completely restores the old behaviour of not supporting killing login with keyboard signals (only) at the password prompt. There is no reason to support this, since login can be exited normally by typing a couple of ^D's. Login certainly shouldn't dump core in response to user input. Previously, SIGQUIT killed login immediately but SIGINT killed it only after the password was entered. PR: 7444
* Fix a couple of little bugs that prevented login.c from compilingjdp1998-07-221-3/+3
| | | | | | | | if LOGIN_CAP_AUTH was defined. This is kind of silly, because LOGIN_CAP_AUTH doesn't work anyway, is not defined currently, probably will never be defined, and IMHO should not be defined. But I'm sure you'll sleep better tonight, knowing that these bugs are gone.
* Trim a domain part for wtmp as same as showed by "netstat -r".amurai1998-06-011-1/+5
| | | | | | | | | | | | | Here is a some example for avoiding a confusion. It asssumes a logged host domain is "spec.co.jp". All example is longer than UT_HOSTNAMELEN value. 1) turbo.tama.spec.co.jp: 192.19.0.2 -> trubo.tama 2) turbo.tama.foo.co.jp : 192.19.0.2 -> 192.19.0.2 3) specgw.spec.co.jp : 202.32.13.1 -> specgw Submitted by: Atsushi Murai <amurai@spec.co.jp>
* *blush*, typo during last minute editing..peter1998-04-301-2/+2
|
* Change euid while reading the user's .login_cap file in case the homedirpeter1998-04-301-2/+8
| | | | | | | | | is on a NFS partion without root read access. Also, flip euid again for the duration of the chdir() to the homedir for the same reason. PR: 5145 Submitted by: Joel.Faedi@esial.u-nancy.fr Also tested by: A Joseph Koshy <koshy@india.hp.com>
OpenPOWER on IntegriCloud