aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDavid Nugent <davidn@FreeBSD.org>1997-01-22 02:45:16 +0000
committerDavid Nugent <davidn@FreeBSD.org>1997-01-22 02:45:16 +0000
commit5217f56ec6c3a10d444c057fbb88d3e75155ca5d (patch)
treeafd1062422bfa4646f3bacc4578277d0d68e83c3 /usr.bin
parente82d554503ffde431327c835c602666d09590ff2 (diff)
downloadsrc-5217f56ec6c3a10d444c057fbb88d3e75155ca5d.tar.gz
src-5217f56ec6c3a10d444c057fbb88d3e75155ca5d.zip
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).
Notes
Notes: svn path=/head/; revision=21942
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/login/login.111
-rw-r--r--usr.bin/login/login.c5
2 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/login/login.1 b/usr.bin/login/login.1
index cbf57d16032a..c16d1a9041da 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 ab9e00fe7370..a02a86d51ee6 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')