Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2000 18:17:26 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/su su.c
Message-ID:  <Pine.NEB.3.96L.1001130181532.97425D-100000@fledge.watson.org>
In-Reply-To: <200011302314.eAUNEtP18095@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

In fact, the last point in this commit message is not quite on target --
later in handling of enabling support for the environment being set on su
-l and related flags, LOGIN_SETPATH is handled as desired.

The end impact for the base system of this change should be that the su
behavior is identical to the way it was previously, but the code is
extensible in a different manner, supporting new user context features.
If you notice changes in su behavior, please let me know ASAP.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert@fledge.watson.org      NAI Labs, Safeport Network Services

On Thu, 30 Nov 2000, Robert Watson wrote:

> rwatson     2000/11/30 15:14:55 PST
> 
>   Modified files:
>     usr.bin/su           su.c 
>   Log:
>   o Make comment match reality, synch code with comment.
>   o In practice: the comment indicates that all but umask and
>     environmental variables of the users login class are applied when su
>     occurs, unless -m is used to specify a class.  This was incorrect;
>     in practice, the uid, gids, resources, and priority were set, and
>     then resources and priority were selectively removed.  This meant
>     that some aspects of the user context were not set, including handling
>     of login events (wtmp, utmp), as well as the path specified in
>     login.conf.
>   o I changed it so that the behavior is the same, but instead,
>     LOGIN_SETALL is used, and appropriate flags are removed, including
>     the LOGIN_SETLOGIN and LOGIN_SETPATH entries that were implicitly
>     not present before.  I also updated the comment to reflect
>     reality, selecting reality as the "correct" behavior.
>   o This has the practical benefit that as new LOGIN_SET* flags are
>     introduced, they are supported by su unless specifically disabled.
>     For example, of a LOGIN_SETLABEL flag is introduced to support
>     MAC labels determined by the user's login class, then su no longer
>     has to be modified.
>   o It might be desirable to have su use LOGIN_SETPATH depending on
>     its command line parameters, as it might or might not be
>     considered part of the "environment".
>   
>   Obtained from:	TrustedBSD Project
>   
>   Revision  Changes    Path
>   1.35      +11 -3     src/usr.bin/su/su.c
> 
> 
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1001130181532.97425D-100000>