Home | History | Annotate | only in /src/usr.bin/su
History log of /src/usr.bin/su
RevisionDateAuthorComments
 1.51 25-Feb-2018  mrg add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk. use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.
 1.50 24-Apr-2011  elric We no longer need -I/usr/include/krb5.
 1.49 06-Apr-2008  lukem Be consistent about making USE_PAM!=no be exclusive to USE_SKEY!=no.
 1.48 27-Oct-2007  christos - move grutil code to newgrp.
- enable user:group and :group code.
 1.47 17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.46 28-May-2007  tls branches: 1.46.4;
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.45 13-Jul-2006  christos remove PAM_DEBUG
 1.44 20-Mar-2006  christos Goodbye KerberosIV
 1.43 15-Dec-2005  christos Use LOGIN_CAP even in the pam case.
 1.42 04-Mar-2005  he branches: 1.42.2;
Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications. The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
 1.41 13-Jan-2005  thorpej Test USE_PAM, not MKPAM.
 1.40 12-Jan-2005  christos undo accidental commit with MKPAM=yes
 1.39 12-Jan-2005  christos :x
 1.38 10-Jan-2005  christos LOGIN_CAP is mandatory for PAM.
 1.37 10-Jan-2005  christos Restore su.c to version 1.58, plus minor prototyping. Split pam
into su_pam.c, and turn it off by default in the Makefile until it
is tested and actually works. The current pam version does not set ruid
properly anymore.
 1.36 08-Jan-2005  lukem add DPADD
 1.35 07-Jan-2005  manu Add PAM support to su
 1.34 11-Dec-2003  dyoung Fix the checkflist for builds without Kerberos 4 (MKKERBEROS4=no)
and without Kerberos 4 & 5 (MKKERBEROS=no). Previously checkflist
complained of missing files.

* move kerberos- and kerberos 4-only files into new flists,
distrib/sets/lists/*/krb.*

* make the flist generators grok MKKERBEROS{,4} variables

* fix Makefiles which treat MKKERBEROS=no as MKKERBEROS5=no.
9 out of 10 experts agree that it is ludicrous to build w/
KERBEROS4 and w/o KERBEROS5.

* fix header files, also, which treat MKKERBEROS=no as MKKERBEROS5=no.

* omit some Kerberos-only subdirectories from the build as
MKKERBEROS{,4} indicate

(I acknowledge the sentiment that flists are the wrong way to go,
and that the makefiles should produce the metalog directly. That
sounds to me like the right way to go, but I am not prepared to do
revamp all the makefiles. While my approach is expedient, it fits
painlessly within the current build architecture until we are
delivered from flist purgatory, and it does not postpone our
delivery. Fair enough?)
 1.33 23-Aug-2003  lha libkrb depends on libdes, patch in private mail from
Harold Gutch logix at foobar franken de
 1.32 20-Aug-2003  christos Normalize the program's compilation options so they are all of the form SU_
and document them.
 1.31 24-Jul-2003  tron Backout previous and revert su(1) to dynamic linking instead.
 1.30 24-Jul-2003  tron Link with "libdes" if Kerberos IV support is enabled.
 1.29 23-Jul-2003  itojun split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
 1.28 23-Oct-2002  itojun add DPADD.
 1.27 22-Mar-2002  thorpej Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)

* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.

As discussed on tech-toolchain.
 1.26 11-Jan-2001  sjg SU_INDIRECT_GROUP should not be on by default.
 1.25 10-Jan-2001  sjg If SU_INDIRECT_GROUP is defined (it is by default), then su will
consider that SUGROUP and ROOTAUTH group contain the names of
users and groups. If user is not found in the list check_ingroup()
recurses on each member until either user is found or end of chain
is reached.

The above allows su's use of the wheel group to be extended to a large
number of users without necessarily putting them in group wheel, and
in a way that will work over NIS that simply extending the line length
limit in getgrent.c cannot.
 1.24 18-Oct-2000  simonb Remove INSTALLFLAGS=-fschg, as per change to usr.bin/ssh/ssh/Makefile.
 1.23 03-Aug-2000  assar remove -lvers, it's not used
 1.22 03-Aug-2000  assar update build infrastructure for heimdal 0.3a
 1.21 23-Jul-2000  mycroft Fix library order.
 1.20 10-Jul-2000  assar add Kerberos5 support
 1.19 23-Jun-2000  thorpej Add MK... variables to enable/disable various aspects of building
crypto support into the system. See share/mk/bsd.README for more
a full description.
 1.18 20-Jun-2000  thorpej branches: 1.18.2;
Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
 1.17 14-Jan-2000  mjl branches: 1.17.2;
Implement login_cap capability lookup.
 1.16 20-Jul-1999  mrg optionally include CRYPTOPATH Makefile.frag files.
 1.15 12-Jul-1999  thorpej Use bsd.crypto.mk.
 1.14 11-Jul-1999  kim Allow people in group wheel to use the ROOTAUTH group.
Pick up SUROOTAUTH (presumably from /etc/mk.conf).
 1.13 18-Feb-1999  scottr branches: 1.13.2;
Remove the crypto-related bits until such time as we have a fully-
integrated source tree. Export-controlled versions of these are now
built during the domestic build process.
 1.12 12-Oct-1997  mycroft Minor changes.
 1.11 12-Oct-1997  mycroft Make this compile without SKEY.
 1.10 02-Jul-1997  lukem As per discussion with mrg, back out parts of previous change.

The appropriate entry in /etc/group as returned by getgrnam() is
used to determine if 'su root' may be permitted, rather than
checking if membership exists in the result of getgroups().

The following changes were made regarding the behaviour of the special
group for 'su root'
* allow for definition of SUGROUP (defaults to "wheel") to override group name.
* use getgrnam(SUGROUP) instead of getgrgid(0).
* only scan getgrnam(SUGROUP)->gr_mem when checking for group membership.
* be more specific as to why 'su root' failed

NOTE: If a user's primary group is SUGROUP, and they're not a member
of SUGROUP in /etc/group, they will not be able to su.
 1.9 09-Jan-1997  tls RCS ID police
 1.8 09-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.7 12-Oct-1996  christos Fix PR/2837: su [login [args]] had the wrong usage and did not work properly. Build the correct argument list and add -c for the shells.
Fix PR/2839: su will not build with Kerberos.

- Also:
-Don't coredump when $TERM is not set.
-Add prototypes, remove local old style declarations of system
functions.
-Recognize shells that contain "csh" as being csh alike.
-Don't build with SKEY unconditionally. Obey bsd.own.mk.
 1.6 24-May-1994  deraadt add skey support
 1.5 07-Oct-1993  cgd always use libcrypt
 1.4 30-Jul-1993  mycroft Add RCS identifiers.
 1.3 26-Apr-1993  cgd changed to use new libcrypt scheme.
 1.2 22-Mar-1993  cgd added support for using real crypt
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 10-Dec-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.2.1 08-Jan-2000  he Pull up revision 1.14 (requested by kim):
Allow the make variable SUROOTAUTH to be set to a group where the
members can use their own password to authenticate to su to root.
By default this is not set, retaining the traditional behaviour.
 1.17.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.18.2.3 18-Oct-2000  tv Pull up 1.24 [simonb]:
Remove INSTALLFLAGS=-fschg.
 1.18.2.2 24-Jun-2000  thorpej Update from trunk:
Add MK... variables to enable/disable various aspects of building
crypto support into the system. See share/mk/bsd.README for more
a full description.
 1.18.2.1 20-Jun-2000  thorpej file Makefile was added on branch netbsd-1-5 on 2000-06-24 06:59:36 +0000
 1.42.2.1 16-Dec-2005  tron Pull up following revision(s) (requested by hubertf in ticket #1061):
usr.bin/su/Makefile: revision 1.43
Use LOGIN_CAP even in the pam case.
 1.46.4.1 06-Nov-2007  matt sync with HEAD
 1.4 27-Oct-2007  christos - move grutil code to newgrp.
- enable user:group and :group code.
 1.3 27-Oct-2007  christos From Anon Ymous:

- Fix a memory leak in newgrp(). (Noted by ginsbach@.)

- If the new and old groups are the same, addgrp() does nothing so
exit early. (Noted by ginsbach@.)

- In newgrp(), if the new group isn't found in the in-core, check the
group membership list anyway as the in-core list may be full or
/etc/groups may have been edited since login. (Requested by
ginsbach@.)

- Deal with a full in-core group[] array in addgid() rather than
silently ignoring it and ending up with a group[] array that is
inconsistent with the current group.

- More explicit error handling in addgroup().
 1.2 18-Oct-2007  christos Put the proper license on this file, using the newgrp.c one.
 1.1 17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.3 27-Oct-2007  christos - move grutil code to newgrp.
- enable user:group and :group code.
 1.2 18-Oct-2007  christos Make the license match to grutil.c
 1.1 17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.55 24-Mar-2023  kre PR misc/57287 from Nan Xiao

While it has always been assumed that everyone "just knew" that a simple
"su' meant "su root" perhaps the man page really should make that explicit.

Do that (using slightly different wording than suggested in the PR).
 1.54 01-Sep-2019  wiz Remove superfluous Ns.
 1.53 01-Sep-2019  sevan su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf
 1.52 18-May-2017  abhinav branches: 1.52.10; 1.52.12;
Correct the man page reference
 1.51 19-Sep-2014  wiz branches: 1.51.6;
Sort sections. From Henning Petersen in PR 49222.
 1.50 21-Nov-2012  pgoyette Note that 'su -l' does not update utmp and related databases.
 1.49 18-May-2009  wiz branches: 1.49.6; 1.49.12;
Sort options.
 1.48 27-Oct-2007  christos bump date.
 1.47 27-Oct-2007  christos uncomment the group handling documentation.
 1.46 17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.45 15-Dec-2005  hubertf branches: 1.45.12;
Give a general description what this command does before going into
all the details.
 1.44 05-Jul-2005  kleink Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.43 19-Jun-2005  wiz Use groff macros instead of troff ones.
 1.42 19-Jun-2005  wiz Drop trailing whitespace.
 1.41 05-Apr-2005  christos Update with pam descriptions.
XXX: needs more work.
1. code needs to be added in pam_group.so to handle indirect groups and
documented.
2. the indirect group description outside before the customization section
does not work with pam, but could be made to work once [1] is implemented.
 1.40 28-Feb-2005  christos branches: 1.40.2;
Fix unmatched .El warning.
 1.39 01-Feb-2005  christos Add commented out notes on how we support the special compilation options
under pam.
 1.38 27-Apr-2004  kleink Remove a leftover line apparently from rev. 1.17; also from Juha Hyttinen
in PR bin/25347.
 1.37 27-Apr-2004  cjep Fix typo (SU_INDIRECT_GROOP -> SU_INDIRECT_GROUP). PR#25347 from
Juha Hyttinen.
 1.36 17-Sep-2003  atatat branches: 1.36.2;
Hey, wiz! Doesn't this need a comma?
 1.35 23-Aug-2003  wiz Comma and Pp police. Bump date for last.
 1.34 20-Aug-2003  christos Normalize the program's compilation options so they are all of the form SU_
and document them.
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.32 27-Apr-2003  wiz Drop trailing space.
 1.31 27-Apr-2003  jmmv Implement the `-d' option, which behaves as `-l' but does not change the
current directory. Idea suggested by dsl@ in source-changes.
 1.30 24-Apr-2003  wiz Bump date for last.
 1.29 20-Apr-2003  christos PR/5803: Gregg A. Woods: su doesn't support it's "-f" option for sh and/or ksh
fixed by unsetenv("ENV") when -f is set and the shell is not csh.
 1.28 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.27 21-Feb-2003  jmmv Add missing dot to the `-' option. Ok'ed by wiz.
 1.26 19-Jan-2003  jmmv Add EXIT STATUS section.
 1.25 13-Oct-2002  wiz New sentence, new line; drop trailing whitespace.
 1.24 05-Oct-2002  hubertf Make example clearer, that the -c _after_ the login is passed to the shell.
Addresses PR 18538 by reed@reedmedia.net
 1.23 08-Dec-2001  wiz Sort sections, sort SEE ALSO, use .Pp instead of empty lines.
 1.22 04-Apr-2001  wiz kerberos(1) -> (8). Sort SEE ALSO.
 1.21 08-Mar-2001  fair Correct the HISTORY section, per PR 11192 and Robert Elz.
 1.20 10-Jan-2001  sjg If SU_INDIRECT_GROUP is defined (it is by default), then su will
consider that SUGROUP and ROOTAUTH group contain the names of
users and groups. If user is not found in the list check_ingroup()
recurses on each member until either user is found or end of chain
is reached.

The above allows su's use of the wheel group to be extended to a large
number of users without necessarily putting them in group wheel, and
in a way that will work over NIS that simply extending the line length
limit in getgrent.c cannot.
 1.19 10-May-2000  jdolecek branches: 1.19.4;
Add some examples of usage. Modelled after what is in Solaris manpage,
though no text has been actually copied from there (for legal reasons).
 1.18 11-Feb-2000  abs Set SU_FROM environment variable. This can be used to determine a 'su -'
shell from a real login shell (but only if you care).
 1.17 14-Jan-2000  mjl Implement login_cap capability lookup.
 1.16 27-Sep-1999  mjl Mention "-" is the same as "-l". Closes PR/8499 by Matthew Aldous.
 1.15 02-May-1999  kleink branches: 1.15.2;
Bring $PATH information in sync with _PATH_DEFPATH.
 1.14 19-Oct-1997  lukem branches: 1.14.4;
WARNSify, fix .Nm usage, deprecate register, getopt returns -1 not EOF
 1.13 02-Jul-1997  lukem As per discussion with mrg, back out parts of previous change.

The appropriate entry in /etc/group as returned by getgrnam() is
used to determine if 'su root' may be permitted, rather than
checking if membership exists in the result of getgroups().

The following changes were made regarding the behaviour of the special
group for 'su root'
* allow for definition of SUGROUP (defaults to "wheel") to override group name.
* use getgrnam(SUGROUP) instead of getgrgid(0).
* only scan getgrnam(SUGROUP)->gr_mem when checking for group membership.
* be more specific as to why 'su root' failed

NOTE: If a user's primary group is SUGROUP, and they're not a member
of SUGROUP in /etc/group, they will not be able to su.
 1.12 27-Jun-1997  lukem * Notify of impending password or account expiry (check against
_PASSWORD_WARNDAYS from <pwd.h>). For non-root users, enforce expiry when
it happens. From Simon Gerraty <sjg@zen.void.oz.au> in [bin/935].
* Check for group 0 in process's current group membership (as returned by
getgroups(2)), instead of just looking at the entry for wheel in /etc/group.
Based on code by Dan Caresone <dan@oink.geek.com.au> in [bin/792], and
also solves [bin/2466].
* Clean up to pass -Wall
 1.11 08-Mar-1997  mouse alternate -> alternative, per PR 2643
 1.10 31-Jan-1997  ghudson Document the recent change in group wheel semantics. Also, it wasn't
previously documented that anyone could su to root if group 0 didn't
exist.
 1.9 20-Jan-1997  cjs Add list of bugs: relies only on /etc/group for group membership,
sets policy in code.
 1.8 09-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.7 05-Sep-1994  mycroft Document usage of additional arguments after login name, as suggested by
Peter da Silva (slightly edited).
 1.6 24-May-1994  deraadt add skey support
 1.5 11-Jan-1994  jtc Fix spelling errors.
 1.4 01-Aug-1993  mycroft Add RCS indentifiers.
 1.3 28-Jul-1993  jtc Back out last change until I can get an official interpretation.
 1.2 28-Jul-1993  jtc Update LOGNAME as well as USER environment variables to keep POSIX utilities
that only understand LOGNAME happy.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 10-Dec-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.14.4.2 18-Feb-2000  he Pull up revision 1.18 (requested by abs):
Have su set SU_FROM environment variable, and use to avoid
incorrect 'use su' warning in root's .login.
 1.14.4.1 08-Jan-2000  he Pull up revisions 1.15-1.16 (requested by kim):
Apply two minor corrections, one fixes PR#8499.
 1.15.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.4.1 26-Apr-2001  he Pull up revision 1.22 (requested by wiz):
Correct kerberos reference to kerberos(8). Sort SEE ALSO section.
 1.36.2.2 18-Jul-2005  riz Pull up revision 1.44 via patch (requested by kleink in ticket #2070):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.36.2.1 29-Apr-2004  jmc branches: 1.36.2.1.2;
Pullup rev 1.37-1.38 (requested by cjep in ticket #210)

Fix typo's
 1.36.2.1.2.1 18-Jul-2005  riz Pull up revision 1.44 via patch (requested by kleink in ticket #2070):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.40.2.2 29-Dec-2005  riz Pull up following revision(s) (requested by hubertf in ticket #1060):
usr.bin/su/su.1: revision 1.45 via patch
Give a general description what this command does before going into
all the details.
 1.40.2.1 09-Jul-2005  tron Pull up revision 1.44 via patch (requested by kleink in ticket #551):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.45.12.1 06-Nov-2007  matt sync with HEAD
 1.49.12.1 25-Feb-2013  tls resync with head
 1.49.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.51.6.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.52.12.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.52.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.75 24-Mar-2023  kre After a ':' (as in login:group or just :group) insist that there
actually be a group name (of some form, don't care what) present.
 1.74 30-Oct-2021  nia su(1): use reallocarr instead of malloc(x * y)
 1.73 17-Oct-2021  nia su: Use consttime_memequal instead of strcmp.

This only affects the non-PAM case.
 1.72 16-Jun-2015  christos fix some error handling.
 1.71 16-Mar-2014  dholland Fix gcc48 build. No obvious reason why nobody else has hit this...
 1.70 12-Apr-2012  christos branches: 1.70.2;
make this compile again.
 1.69 31-Aug-2011  plunky branches: 1.69.2; 1.69.4;
NULL does not need a cast
 1.68 21-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.67 05-Apr-2008  christos branches: 1.67.4;
call setprogname(), from Anon Ymous
 1.66 17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.65 05-Jul-2005  kleink branches: 1.65.12;
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.64 10-Jan-2005  christos branches: 1.64.2;
Restore su.c to version 1.58, plus minor prototyping. Split pam
into su_pam.c, and turn it off by default in the Makefile until it
is tested and actually works. The current pam version does not set ruid
properly anymore.
 1.63 09-Jan-2005  manu Rewrite PAMification of su.
- don't try to fallback to plain old authentication. It could lead to unix
authentication to be used while the administrator wanted to forbid it.
Moreover, a broken PAM setup can be fixed by just rebooting in single user.
- In order to make the code more readable, make two main(), with and aithout
PAM.
- Outstanding issues that seem impossible to fix:
The -K flag die with PAM.
-c cause PAM credentials to be ignored.
 1.62 08-Jan-2005  manu Don't fallback to plain old authentication on "normal" errors such as
authentication failure.
 1.61 08-Jan-2005  christos if we are using pam and it succeeded, don't re-initialize kerberos needlessly.
 1.60 08-Jan-2005  christos - avoid calling pam_end twice if pam failed in fatal
- make fatal proper macros
- fix typos in comments
- fix logical error initializing pam
XXX: Seems to work now, but the whole process is awkward.
Asking for an ssh passphrase and using this to do unix authentication is wrong.
Falling back to the old style auth is awkward. We should really provide a
pam_rootauth module if we want to support that.
 1.59 07-Jan-2005  manu Add PAM support to su
 1.58 05-Jan-2004  jmmv branches: 1.58.2; 1.58.4;
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.57 20-Aug-2003  christos Normalize the program's compilation options so they are all of the form SU_
and document them.
 1.56 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.55 18-Jun-2003  jrf This addresses PR21693. Under certain conditions, su -m will fail because
the pointer to /etc/shells is pointing to the second entry. This change
resets the pointer before looping through the file again. FreeBSD does
this as well. Commit approved by christos and thanks to Geoff Adams for
catching and reporting it.
 1.54 27-Apr-2003  jmmv Implement the `-d' option, which behaves as `-l' but does not change the
current directory. Idea suggested by dsl@ in source-changes.
 1.53 25-Apr-2003  mycroft Only unset ENV if -f was used, AS THE CHANGE WAS DOCUMENTED.
I'm not convinced this is a good idea at all, but at least this fixed my usage.
 1.52 20-Apr-2003  christos PR/5803: Gregg A. Woods: su doesn't support it's "-f" option for sh and/or ksh
fixed by unsetenv("ENV") when -f is set and the shell is not csh.
 1.51 16-Nov-2002  itojun error handling on strdup failure
 1.50 16-Nov-2002  itojun use strlcpy
 1.49 11-Jun-2002  itojun err/errx/warn/warnx do not need \n at the end
 1.48 23-Apr-2001  simonb Revert to previous, less offensive, error message when a malloc fails.
 1.47 19-Feb-2001  cgd convert to use getprogname()
 1.46 10-Jan-2001  sjg If SU_INDIRECT_GROUP is defined (it is by default), then su will
consider that SUGROUP and ROOTAUTH group contain the names of
users and groups. If user is not found in the list check_ingroup()
recurses on each member until either user is found or end of chain
is reached.

The above allows su's use of the wheel group to be extended to a large
number of users without necessarily putting them in group wheel, and
in a way that will work over NIS that simply extending the line length
limit in getgrent.c cannot.
 1.45 10-Jan-2001  lukem - don't use LOG_CONS
- by default log to LOG_AUTH (so no need to specify LOG_AUTH at each syslog())
- log all unsuccessful attempts (for whatever reason) to LOG_WARNING
- log all successful attempts to LOG_NOTICE
 1.44 09-Sep-2000  erh Switch to the user we're su-ing to sooner. This allows su to actually access the user's home directory in cases where root can't. (i.e. root=nobody NFS mounts). Also, avoid inadvertently raising the priority.
 1.43 09-Aug-2000  assar set the correct owner on the krb5 ccache
 1.42 13-Jul-2000  assar fix the krb5 su to ordinary user case, from Mark Davies
<mark@MCS.VUW.AC.NZ>
 1.41 10-Jul-2000  assar add Kerberos5 support
 1.40 10-Jul-2000  assar repair, simplify, and improve the Kerberos part
 1.39 11-Feb-2000  abs branches: 1.39.4;
Set SU_FROM environment variable. This can be used to determine a 'su -'
shell from a real login shell (but only if you care).
 1.38 25-Jan-2000  mjl Removed code that would squash root's path when suing to root,
restores old behaviour of su.
 1.37 14-Jan-2000  mjl Implement login_cap capability lookup.
 1.36 09-Nov-1999  drochner Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
 1.35 29-Aug-1999  christos branches: 1.35.4;
Amazing how this worked for so long. setenv(3) expects environ(7) to be
a malloc'ed pointer and it tries to realloc(3) it if it had to grow it
before. su(1) gave it a pointer from the stack which caused realloc to
core dump.
 1.34 11-Jul-1999  kim Allow people in group wheel to use the ROOTAUTH group.
Pick up SUROOTAUTH (presumably from /etc/mk.conf).
 1.33 22-Mar-1999  abs branches: 1.33.2;
Looks like some recent changes broke the 'anyone can su if wheel is not present
or empty' rule. Fix.
 1.32 15-Mar-1999  christos Revert - handling; it is done as part of getopt.
 1.31 15-Mar-1999  christos Remove Solaris shadow password support... Better to do this in the
compatibility library. Suggested by Matt.
 1.30 15-Mar-1999  christos - Add support for Solaris style shadow password files
- Enable su - option if BSD4_4 is not defined
- Add compile time option ROOTAUTH (not enabled), where people belonging
to the ROOTAUTH group can su to root by supplying their own password.
 1.29 20-Feb-1999  scottr Don't warn about being in a user's ACL if Kerberos appears to be
unconfigured. We determine this the same way that passwd(1) does.
 1.28 19-Dec-1998  christos ifdef the pw_change and pw_expire stuff with BSD4_4
 1.27 14-Oct-1998  wsanchez Add #ifdef SKEY around SKEY-specific code.
 1.26 25-Aug-1998  ross Add { and } to shut up egcs. Reformat the more questionable code.
 1.25 26-Jul-1998  mycroft const poisoning.
 1.24 06-Jul-1998  mrg fix error in previous.
 1.23 06-Jul-1998  mrg remove some (almost) duplicated (and thankfully harmless) code left from lite2 merge. KNFnits.
 1.22 06-Jul-1998  mrg - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
 1.21 02-Apr-1998  kleink Need <time.h> for ctime() prototype.
 1.20 24-Oct-1997  christos Cleanup warnings when -DKERBEROS
 1.19 19-Oct-1997  lukem branches: 1.19.2;
WARNSify, fix .Nm usage, deprecate register, getopt returns -1 not EOF
 1.18 02-Jul-1997  lukem As per discussion with mrg, back out parts of previous change.

The appropriate entry in /etc/group as returned by getgrnam() is
used to determine if 'su root' may be permitted, rather than
checking if membership exists in the result of getgroups().

The following changes were made regarding the behaviour of the special
group for 'su root'
* allow for definition of SUGROUP (defaults to "wheel") to override group name.
* use getgrnam(SUGROUP) instead of getgrgid(0).
* only scan getgrnam(SUGROUP)->gr_mem when checking for group membership.
* be more specific as to why 'su root' failed

NOTE: If a user's primary group is SUGROUP, and they're not a member
of SUGROUP in /etc/group, they will not be able to su.
 1.17 27-Jun-1997  lukem * Notify of impending password or account expiry (check against
_PASSWORD_WARNDAYS from <pwd.h>). For non-root users, enforce expiry when
it happens. From Simon Gerraty <sjg@zen.void.oz.au> in [bin/935].
* Check for group 0 in process's current group membership (as returned by
getgroups(2)), instead of just looking at the entry for wheel in /etc/group.
Based on code by Dan Caresone <dan@oink.geek.com.au> in [bin/792], and
also solves [bin/2466].
* Clean up to pass -Wall
 1.16 04-Mar-1997  explorer s/strcnpy/strncpy/ typo
 1.15 11-Feb-1997  mrg remove possibly dangerous sprintf and strcpy calls.
 1.14 31-Jan-1997  ghudson As discussed on tech-userlevel, allow anyone to su if group wheel has
no members (if you have just "root" as a member, which is the shipped
default, then no one can su, as before).
 1.13 09-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.12 15-Oct-1996  christos - Fix previous commit; shells require -c "command"
- RCSid police.
 1.11 12-Oct-1996  christos Fix PR/2837: su [login [args]] had the wrong usage and did not work properly. Build the correct argument list and add -c for the shells.
Fix PR/2839: su will not build with Kerberos.

- Also:
-Don't coredump when $TERM is not set.
-Add prototypes, remove local old style declarations of system
functions.
-Recognize shells that contain "csh" as being csh alike.
-Don't build with SKEY unconditionally. Obey bsd.own.mk.
 1.10 24-May-1994  deraadt add skey support
 1.9 12-Feb-1994  cgd fix bin/120: "su -" buglet when empty "shell" field in passwd
 1.8 07-Jan-1994  mycroft Fix bizarre handling of cleanenv, and set the subshells argv[0] according
to standard practice. Changes from Alan Batie, David Greenman, and myself.
 1.7 27-Aug-1993  jtc Minor tweaks: including header files to bring prototypes into scope,
explicitly declaring function return values, etc. to make gcc -Wall
shut up.
 1.6 01-Aug-1993  mycroft Add RCS identifiers.
 1.5 28-Jul-1993  jtc Back out last change until I can get an official interpretation.
 1.4 28-Jul-1993  jtc Update LOGNAME as well as USER environment variables to keep POSIX utilities
that only understand LOGNAME happy.
 1.3 26-Apr-1993  cgd changed to use new libcrypt scheme.
 1.2 17-Apr-1993  sef Allow 'su foo -c command'. MAY BE BUGGY! (So sayeth Keith Bostic.)
I have noticed no problems yet, however. Since Keith never did it
"properly" ...
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 10-Dec-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.19.2.1 24-Oct-1997  mellon Pull rev 1.20 up from trunk
 1.33.2.3 18-Feb-2000  he Pull up revision 1.39 (requested by abs):
Have su set SU_FROM environment variable, and use to avoid
incorrect 'use su' warning in root's .login.
 1.33.2.2 08-Jan-2000  he Pull up revision 1.34 (requested by kim):
Allow the make variable SUROOTAUTH to be set to a group where the
members can use their own password to authenticate to su to root.
By default this is not set, retaining the traditional behaviour.
 1.33.2.1 29-Aug-1999  he Pull up revision 1.35:
Fix memory corruption problem. (christos)
 1.35.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.39.4.2 10-Sep-2000  erh Pull up revision 1.44:
Switch to user earlier so home directories on root=nobody NFS mount work.
Avoid inadvertently raising the prority when we want to lower it.
 1.39.4.1 09-Aug-2000  assar merge 1.39->1.43

approved by thorpej
 1.58.4.1 18-Jul-2005  riz Pull up revision 1.65 (requested by kleink in ticket #2070):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.58.2.1 18-Jul-2005  riz Pull up revision 1.65 (requested by kleink in ticket #2070):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.64.2.1 09-Jul-2005  tron Pull up revision 1.65 (requested by kleink in ticket #551):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.65.12.1 06-Nov-2007  matt sync with HEAD
 1.67.4.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.69.4.1 07-May-2012  riz Pull up following revision(s) (requested by christos in ticket #213):
usr.bin/su/su.c: revision 1.70
make this compile again.
 1.69.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.69.2.1 17-Apr-2012  yamt sync with head
 1.70.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25 07-Sep-2025  andvar Fix various typos, mainly in comments.
 1.24 24-Mar-2023  kre After a ':' (as in login:group or just :group) insist that there
actually be a group name (of some form, don't care what) present.
 1.23 27-Nov-2021  rillig usr.bin: remove unnecessary CONSTCOND, lint no longer needs it

Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especially in
statement-like macros.
 1.22 10-Sep-2021  rillig usr.bin: remove unnecessary lint comment CONSTCOND

Since 2021-01-31, lint no longer warns about 'do ... while (0)'.

No functional change.
 1.21 26-Feb-2018  htodd Fix typo in comment.
 1.20 09-Aug-2015  shm branches: 1.20.8;
Do not use pamh after pam_end. It's cosmetic change since pam_strerror
ignores that parameter.
 1.19 29-Jun-2013  mlelstv Change to home directory only after setting the full user context
to avoid issues with NFS or other user-mapped mounts that don't
give root the privilege to chdir there.
 1.18 20-Jun-2013  christos - don't re-use the va list twice, leads to coredumps.
- introduce and use a "safe" version of pam_strerror(3) that does not return
NULL
 1.17 15-Mar-2012  joerg branches: 1.17.2;
Add __printflike attribution to use vprintf and friends with an argument
as format string.
 1.16 02-Oct-2010  tron branches: 1.16.6;
Don't free memory that was succesfully passed to putenv(3) which takes
ownership of the memory.
 1.15 21-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.14 05-Apr-2008  christos branches: 1.14.4;
call setprogname(), from Anon Ymous
 1.13 17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.12 14-May-2006  mlelstv branches: 1.12.12;
restore elevated priority before launching command in
user context. Fixes PR 33479.
 1.11 15-Dec-2005  christos PR/32307: Jason V. Miller: su fails to set umask correctly when using pam
and simulating a full login (-, -d, -l)
 1.10 05-Jul-2005  kleink Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.9 19-Apr-2005  christos check for pwd != NULL
 1.8 02-Apr-2005  he Put declaration of pwbuf[] back before any code, so this compiles with
older versions of gcc again.
 1.7 30-Mar-2005  christos - Use the getpw*_r methods.
- KNF.
 1.6 23-Mar-2005  christos Deal with signals and process groups (from FreeBSD)
Fixes issues with kill -STOP $$ in the su'd shell, and setting up signals
for the child process properly.
 1.5 25-Feb-2005  christos branches: 1.5.2;
Don't wait for any process, just our child. pam sessions can fork other
processes (such as the ssh pam agent handler) and the wrong process ends
up reaped, wreaking havoc.
 1.4 18-Jan-2005  manu Remove unneeded \ at the end of line, style
 1.3 12-Jan-2005  christos Always print pam error in messages
 1.2 10-Jan-2005  christos - make LOGIN_CAP mandatory
- eliminate global pamh
- use setusercontext() properly (ideas borrowed from FreeBSD)
- remove stray debugging.

This now works.
 1.1 10-Jan-2005  christos Restore su.c to version 1.58, plus minor prototyping. Split pam
into su_pam.c, and turn it off by default in the Makefile until it
is tested and actually works. The current pam version does not set ruid
properly anymore.
 1.5.2.7 26-May-2006  ghen Pull up following revision(s) (requested by mlelstv in ticket #1343):
usr.bin/su/su_pam.c: revision 1.12
restore elevated priority before launching command in
user context. Fixes PR 33479.
 1.5.2.6 16-Dec-2005  tron Pull up following revision(s) (requested by hubertf in ticket #1061):
usr.bin/su/su_pam.c: revision 1.11
PR/32307: Jason V. Miller: su fails to set umask correctly when using pam
and simulating a full login (-, -d, -l)
 1.5.2.5 09-Jul-2005  tron Pull up revision 1.10 (requested by kleink in ticket #551):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.5.2.4 06-Jul-2005  tron Pull up revision 1.9 (requested by lukem in ticket #530):
check for pwd != NULL
 1.5.2.3 06-Jul-2005  tron Pull up revision 1.8 (requested by lukem in ticket #530):
Put declaration of pwbuf[] back before any code, so this compiles with
older versions of gcc again.
 1.5.2.2 06-Jul-2005  tron Pull up revision 1.7 (requested by lukem in ticket #530):
- Use the getpw*_r methods.
- KNF.
 1.5.2.1 27-Mar-2005  tron Pull up revision 1.6 (requested by christos in ticket #65):
Deal with signals and process groups (from FreeBSD)
Fixes issues with kill -STOP $$ in the su'd shell, and setting up signals
for the child process properly.
 1.12.12.1 06-Nov-2007  matt sync with HEAD
 1.14.4.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.16.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.6.1 17-Apr-2012  yamt sync with head
 1.17.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 23-Jun-2013  tls resync from head
 1.20.8.2 26-Feb-2018  htodd Undo last commit - wrong tree.
 1.20.8.1 25-Feb-2018  htodd Fix typo in comment.
 1.1 17-Oct-2007  christos branches: 1.1.2;
From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.1.2.2 06-Nov-2007  matt sync with HEAD
 1.1.2.1 17-Oct-2007  matt file suutil.c was added on branch matt-armv6 on 2007-11-06 23:36:17 +0000
 1.1 17-Oct-2007  christos branches: 1.1.2;
From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.1.2.2 06-Nov-2007  matt sync with HEAD
 1.1.2.1 17-Oct-2007  matt file suutil.h was added on branch matt-armv6 on 2007-11-06 23:36:17 +0000

RSS XML Feed