Hi folks,
I'm unfamiliar with the ins and outs of the login_cap system. Could
someone who is versed in it please take a look at this PR (text included)
and let me know whether or not the suggested patch is correct.
Thanks,
N
----- Forwarded message from [EMAIL PROTECTED] -----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: docs/12377: doc patch for login_cap.
>Number: 12377
>Category: docs
>Synopsis: differences of a NULL login class need amplification
>Originator: Adrian Filipi-Martin
>Release: FreeBSD 3.2-RELEASE i386
>Environment:
stock 3.2 installation.
>Description:
The fact that the root account has a different default
login class is not well documented. It is documented, but
only in passing in a paragraph low in the login_cap(3)
manpage and in the login_cap.h header. The fact that the
NULL login class has different interpretations depending
upon the context of the capability lookup should be noted
clearly or the behavior of the look up should be modified
to make it more intuitive. The fact that the NULL class
has two default values begs the question, "is there really
a default class?"
>How-To-Repeat:
N/A
>Fix:
A quick fix is to apply the following doc patch. A better fix is to
make all accounts with NULL login classes default to the "default"
class and explicitly set root's class to 'root' in master.passwd.
This would be an application of the "principle of least surprise".
*** login.conf.orig Thu Jun 24 10:24:22 1999
--- login.conf Thu Jun 24 10:25:22 1999
***************
*** 60,65 ****
--- 60,66 ----
#
# Root can always login
#
+ # N.B. This is the default class for the root account, not 'default'.
root:\
:ignorenologin:\
:tc=default:
--- login_cap.3.orig Thu Jun 24 10:27:45 1999
+++ login_cap.3 Thu Jun 24 10:32:53 1999
@@ -139,14 +139,15 @@
.Fn login_getclass
or
.Fn login_getuserclass .
-If the referenced user has no login class specified in
+If the referenced user is not root and has no login class specified in
.Pa /etc/master.passwd ,
the class name is NULL or an empty string, or if the class
specified does not exist in the database, each of these
functions will search for a record with an id of "default",
with that name returned in the
.Ar lc_class
-field.
+field. If the user is root, then record with an id of "root" will
+be returned instead of "default".
.Pp
The
.Ar lc_cap
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-doc" in the body of the message
----- End forwarded message -----
--
[intentional self-reference] can be easily accommodated using a blessed,
non-self-referential dummy head-node whose own object destructor severs
the links.
-- Tom Christiansen in <[EMAIL PROTECTED]>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message