From d7dcd048aad284f9f61f9b6bb9a095ac55fe7650 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Wed, 14 Jul 1999 22:36:10 +0000 Subject: [PATCH] Be a little clearer about login_getpwclass(3), and its penchant for looking up a record called "root". PR: docs/12377 Submitted by: Adrian Filipi-Martin --- etc/login.conf | 4 +++- lib/libutil/login_cap.3 | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/etc/login.conf b/etc/login.conf index 16ecd4751a3c..af09156b65d6 100644 --- a/etc/login.conf +++ b/etc/login.conf @@ -9,7 +9,7 @@ # This file controls resource limits, accounting limits and # default user environment settings. # -# $Id: login.conf,v 1.30 1999/04/30 18:19:29 hoek Exp $ +# $Id: login.conf,v 1.31 1999/05/28 11:07:16 jkh Exp $ # # Default settings effectively disable resource limits, see the @@ -60,6 +60,8 @@ dialer:\ # # Root can always login # +# N.B. login_getpwclass(3) will use this entry for the root account, +# in preference to 'default'. root:\ :ignorenologin:\ :tc=default: diff --git a/lib/libutil/login_cap.3 b/lib/libutil/login_cap.3 index 348768897c9f..31b0928d43d9 100644 --- a/lib/libutil/login_cap.3 +++ b/lib/libutil/login_cap.3 @@ -17,7 +17,7 @@ .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" -.\" $Id: login_cap.3,v 1.9 1998/06/06 05:50:42 jkoshy Exp $ +.\" $Id: login_cap.3,v 1.10 1999/02/12 02:12:06 alex Exp $ .\" .Dd December 27, 1996 .Os FreeBSD @@ -147,6 +147,11 @@ functions will search for a record with an id of "default", with that name returned in the .Ar lc_class field. +In addition, if the referenced user has a UID of 0 (normally, +"root", although the user name is not considered) then +.Fn login_getpwclass +will search for a record with an id of "root" before it searches +for the record with the id of "default". .Pp The .Ar lc_cap @@ -231,6 +236,7 @@ and .Fn login_getclass restricts loookup only to the system login class database in .Pa /etc/login.conf . +As explained earlier, .Fn login_getpwclass only differs from .Fn login_getclass