diff options
author | davidn <davidn@FreeBSD.org> | 1997-01-22 02:45:16 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 1997-01-22 02:45:16 +0000 |
commit | a4e4337b4dc4916ca4ea80c491ac07d908a0e065 (patch) | |
tree | afd1062422bfa4646f3bacc4578277d0d68e83c3 /usr.bin | |
parent | 71e4601fc6c0f29a521c5a608087cb622ff639e6 (diff) | |
download | FreeBSD-src-a4e4337b4dc4916ca4ea80c491ac07d908a0e065.zip FreeBSD-src-a4e4337b4dc4916ca4ea80c491ac07d908a0e065.tar.gz |
Fix handling of empty shell field in passwd file (use /bin/sh); problem
was caused by introduction of login classes. Closes PR bin/2550.
Added references to login.conf to manpage, crossreference to login.conf(5).
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/login/login.1 | 11 | ||||
-rw-r--r-- | usr.bin/login/login.c | 5 |
2 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/login/login.1 b/usr.bin/login/login.1 index cbf57d1..c16d1a9 100644 --- a/usr.bin/login/login.1 +++ b/usr.bin/login/login.1 @@ -95,6 +95,8 @@ exists, .Nm login checks to see if the user and host pair are specifically allowed or denied access. +Login access may also be controlled via the login class, which provides +allow and deny records based on time, tty and remote host name. .Pp If the file .Pa /etc/fbtab @@ -124,6 +126,12 @@ Login enters information into the environment (see specifying the user's home directory (HOME), command interpreter (SHELL), search path (PATH), terminal type (TERM) and user name (both LOGNAME and USER). +Other environment variables may be set due to entries in the login +class capabilities database, for the login class assigned in the +user's system passwd record. +The login class also controls the maximum and current process resource +limits granted to a login, process priorities and many other aspects of +a user's login environment. .Pp The standard shells, .Xr csh 1 @@ -136,6 +144,8 @@ utility. .Bl -tag -width /var/mail/userXXX -compact .It Pa /etc/fbtab changes device protections +.It Pa /etc/login.conf +login class capabilities database .It Pa /etc/motd message-of-the-day .It Pa /etc/nologin @@ -158,6 +168,7 @@ makes login quieter .Xr getpass 3 , .Xr fbtab 5 , .Xr login.access 5 , +.Xr login.conf 5 , .Xr utmp 5 , .Xr environ 7 , .Xr nologin 8 diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index ab9e00f..a02a86d 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -658,8 +658,11 @@ main(argc, argv) (void)setuid(rootlogin ? 0 : pwd->pw_uid); #endif - if (*pwd->pw_shell == '\0') + if (*pwd->pw_shell == '\0') { pwd->pw_shell = _PATH_BSHELL; + if (*shell == '\0') /* Not overridden */ + strcpy(shell, pwd->pw_shell); + } (void)setenv("SHELL", pwd->pw_shell, 1); (void)setenv("HOME", pwd->pw_dir, 1); if (term[0] != '\0') |