The NetBSD Project

CVS log for src/usr.bin/su/su.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / su

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.70 / (download) - annotate - [select for diffs], Thu Apr 12 15:35:07 2012 UTC (13 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-nbase, tls-maxphys-base, tls-maxphys, agc-symver-base, agc-symver, HEAD
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

make this compile again.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Aug 31 16:24:58 2011 UTC (20 months, 2 weeks ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

NULL does not need a cast

Revision 1.68 / (download) - annotate - [select for diffs], Mon Jul 21 14:19:26 2008 UTC (4 years, 9 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.67: +4 -5 lines
Diff to previous 1.67 (colored)

Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Apr 5 15:59:39 2008 UTC (5 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored)

call setprogname(), from Anon Ymous

Revision 1.66 / (download) - annotate - [select for diffs], Wed Oct 17 21:05:39 2007 UTC (5 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Changes since 1.65: +122 -271 lines
Diff to previous 1.65 (colored)

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.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jul 5 20:15:13 2005 UTC (7 years, 10 months ago) by kleink
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, hpcarm-cleanup, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: matt-armv6
Changes since 1.64: +5 -3 lines
Diff to previous 1.64 (colored)

Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.

Revision 1.64 / (download) - annotate - [select for diffs], Mon Jan 10 03:11:50 2005 UTC (8 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.63: +21 -461 lines
Diff to previous 1.63 (colored)

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.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Jan 9 21:32:38 2005 UTC (8 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.62: +439 -162 lines
Diff to previous 1.62 (colored)

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.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jan 8 22:16:23 2005 UTC (8 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.61: +21 -4 lines
Diff to previous 1.61 (colored)

Don't fallback to plain old authentication on "normal" errors such as
authentication failure.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jan 8 18:12:35 2005 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored)

if we are using pam and it succeeded, don't re-initialize kerberos needlessly.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Jan 8 08:45:53 2005 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.59: +23 -10 lines
Diff to previous 1.59 (colored)

- 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.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 7 22:34:20 2005 UTC (8 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.58: +134 -12 lines
Diff to previous 1.58 (colored)

Add PAM support to su

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jan 5 23:23:37 2004 UTC (9 years, 4 months ago) by jmmv
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-0, netbsd-2
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Aug 20 14:11:17 2003 UTC (9 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.56: +11 -11 lines
Diff to previous 1.56 (colored)

Normalize the program's compilation options so they are all of the form SU_
and document them.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Aug 7 11:15:57 2003 UTC (9 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.55: +3 -7 lines
Diff to previous 1.55 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Jun 18 21:02:03 2003 UTC (9 years, 11 months ago) by jrf
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

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.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Apr 27 08:46:26 2003 UTC (10 years ago) by jmmv
Branch: MAIN
Changes since 1.53: +12 -6 lines
Diff to previous 1.53 (colored)

Implement the `-d' option, which behaves as `-l' but does not change the
current directory.  Idea suggested by dsl@ in source-changes.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Apr 25 08:04:14 2003 UTC (10 years ago) by mycroft
Branch: MAIN
Changes since 1.52: +4 -3 lines
Diff to previous 1.52 (colored)

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.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Apr 20 20:13:20 2003 UTC (10 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.51: +4 -2 lines
Diff to previous 1.51 (colored)

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.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Nov 16 15:59:31 2002 UTC (10 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.50: +6 -3 lines
Diff to previous 1.50 (colored)

error handling on strdup failure

Revision 1.50 / (download) - annotate - [select for diffs], Sat Nov 16 13:45:10 2002 UTC (10 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.49: +6 -7 lines
Diff to previous 1.49 (colored)

use strlcpy

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jun 11 06:06:20 2002 UTC (10 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

err/errx/warn/warnx do not need \n at the end

Revision 1.48 / (download) - annotate - [select for diffs], Mon Apr 23 06:52:22 2001 UTC (12 years ago) by simonb
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

Revert to previous, less offensive, error message when a malloc fails.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Feb 19 23:03:52 2001 UTC (12 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.46: +3 -4 lines
Diff to previous 1.46 (colored)

convert to use getprogname()

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jan 10 21:33:13 2001 UTC (12 years, 4 months ago) by sjg
Branch: MAIN
Changes since 1.45: +78 -30 lines
Diff to previous 1.45 (colored)

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.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jan 10 12:30:19 2001 UTC (12 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.44: +9 -9 lines
Diff to previous 1.44 (colored)

- 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

Revision 1.44 / (download) - annotate - [select for diffs], Sat Sep 9 18:13:05 2000 UTC (12 years, 8 months ago) by erh
Branch: MAIN
Changes since 1.43: +13 -12 lines
Diff to previous 1.43 (colored)

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.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Aug 9 02:15:27 2000 UTC (12 years, 9 months ago) by assar
Branch: MAIN
Changes since 1.42: +14 -4 lines
Diff to previous 1.42 (colored)

set the correct owner on the krb5 ccache

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jul 13 08:37:10 2000 UTC (12 years, 10 months ago) by assar
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

fix the krb5 su to ordinary user case, from Mark Davies
<mark@MCS.VUW.AC.NZ>

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jul 10 02:09:15 2000 UTC (12 years, 10 months ago) by assar
Branch: MAIN
Changes since 1.40: +98 -8 lines
Diff to previous 1.40 (colored)

add Kerberos5 support

Revision 1.40 / (download) - annotate - [select for diffs], Mon Jul 10 01:45:24 2000 UTC (12 years, 10 months ago) by assar
Branch: MAIN
Changes since 1.39: +32 -18 lines
Diff to previous 1.39 (colored)

repair, simplify, and improve the Kerberos part

Revision 1.39 / (download) - annotate - [select for diffs], Fri Feb 11 00:30:07 2000 UTC (13 years, 3 months ago) by abs
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored)

Set SU_FROM environment variable. This can be used to determine a 'su -'
shell from a real login shell (but only if you care).

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jan 25 02:19:19 2000 UTC (13 years, 3 months ago) by mjl
Branch: MAIN
Changes since 1.37: +3 -8 lines
Diff to previous 1.37 (colored)

Removed code that would squash root's path when suing to root,
restores old behaviour of su.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jan 14 02:39:14 2000 UTC (13 years, 4 months ago) by mjl
Branch: MAIN
Changes since 1.36: +64 -9 lines
Diff to previous 1.36 (colored)

Implement login_cap capability lookup.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Nov 9 15:06:37 1999 UTC (13 years, 6 months ago) by drochner
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

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.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Aug 29 04:21:55 1999 UTC (13 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize
Changes since 1.34: +7 -6 lines
Diff to previous 1.34 (colored)

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.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 11 23:41:10 1999 UTC (13 years, 10 months ago) by kim
Branch: MAIN
Changes since 1.33: +21 -21 lines
Diff to previous 1.33 (colored)

Allow people in group wheel to use the ROOTAUTH group.
Pick up SUROOTAUTH (presumably from /etc/mk.conf).

Revision 1.33 / (download) - annotate - [select for diffs], Mon Mar 22 03:25:33 1999 UTC (14 years, 2 months ago) by abs
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001
Branch point for: netbsd-1-4
Changes since 1.32: +15 -14 lines
Diff to previous 1.32 (colored)

Looks like some recent changes broke the 'anyone can su if wheel is not present
or empty' rule. Fix.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Mar 15 18:56:12 1999 UTC (14 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.31: +2 -10 lines
Diff to previous 1.31 (colored)

Revert - handling; it is done as part of getopt.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Mar 15 09:30:51 1999 UTC (14 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.30: +3 -21 lines
Diff to previous 1.30 (colored)

Remove Solaris shadow password support... Better to do this in the
compatibility library. Suggested by Matt.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Mar 15 08:05:07 1999 UTC (14 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.29: +71 -16 lines
Diff to previous 1.29 (colored)

- 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.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Feb 20 00:20:59 1999 UTC (14 years, 3 months ago) by scottr
Branch: MAIN
Changes since 1.28: +5 -4 lines
Diff to previous 1.28 (colored)

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.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Dec 19 22:24:18 1998 UTC (14 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.27: +6 -2 lines
Diff to previous 1.27 (colored)

ifdef the pw_change and pw_expire stuff with BSD4_4

Revision 1.27 / (download) - annotate - [select for diffs], Wed Oct 14 00:56:48 1998 UTC (14 years, 7 months ago) by wsanchez
Branch: MAIN
Changes since 1.26: +7 -2 lines
Diff to previous 1.26 (colored)

Add #ifdef SKEY around SKEY-specific code.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Aug 25 20:59:40 1998 UTC (14 years, 8 months ago) by ross
Branch: MAIN
Changes since 1.25: +8 -7 lines
Diff to previous 1.25 (colored)

Add { and } to shut up egcs. Reformat the more questionable code.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jul 26 15:24:34 1998 UTC (14 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (colored)

const poisoning.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jul 6 11:44:49 1998 UTC (14 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.23: +19 -8 lines
Diff to previous 1.23 (colored)

fix error in previous.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jul 6 11:36:14 1998 UTC (14 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.22: +7 -15 lines
Diff to previous 1.22 (colored)

remove some (almost) duplicated (and thankfully harmless) code left from lite2 merge.  KNFnits.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 6 06:55:08 1998 UTC (14 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

- 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

Revision 1.21 / (download) - annotate - [select for diffs], Thu Apr 2 11:13:33 1998 UTC (15 years, 1 month ago) by kleink
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

Need <time.h> for ctime() prototype.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 24 14:44:35 1997 UTC (15 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.19: +2 -4 lines
Diff to previous 1.19 (colored)

Cleanup warnings when -DKERBEROS

Revision 1.19 / (download) - annotate - [select for diffs], Sun Oct 19 23:31:54 1997 UTC (15 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-3-base
Branch point for: netbsd-1-3
Changes since 1.18: +10 -10 lines
Diff to previous 1.18 (colored)

WARNSify, fix .Nm usage, deprecate register, getopt returns -1 not EOF

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jul 2 05:42:13 1997 UTC (15 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.17: +20 -16 lines
Diff to previous 1.17 (colored)

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.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jun 27 17:01:55 1997 UTC (15 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.16: +49 -19 lines
Diff to previous 1.16 (colored)

* 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

Revision 1.16 / (download) - annotate - [select for diffs], Tue Mar 4 00:21:13 1997 UTC (16 years, 2 months ago) by explorer
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

s/strcnpy/strncpy/ typo

Revision 1.15 / (download) - annotate - [select for diffs], Tue Feb 11 08:39:23 1997 UTC (16 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.14: +13 -11 lines
Diff to previous 1.14 (colored)

remove possibly dangerous sprintf and strcpy calls.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 31 22:22:47 1997 UTC (16 years, 3 months ago) by ghudson
Branch: MAIN
Changes since 1.13: +7 -4 lines
Diff to previous 1.13 (colored)

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).

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jan 9 11:43:07 1997 UTC (16 years, 4 months ago) by tls
Branch: MAIN
Changes since 1.12: +39 -59 lines
Diff to previous 1.12 (colored)

Sync to 4.4BSD-Lite2

Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 15 14:35:41 1996 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.11: +16 -50 lines
Diff to previous 1.11 (colored)

- Fix previous commit; shells require -c "command"
- RCSid police.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 12 23:54:39 1996 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.10: +71 -22 lines
Diff to previous 1.10 (colored)

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.

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 24 06:52:23 1994 UTC (19 years ago) by deraadt
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1, netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.9: +15 -1 lines
Diff to previous 1.9 (colored)

add skey support

Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 12 07:06:07 1994 UTC (19 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.8: +7 -7 lines
Diff to previous 1.8 (colored)

fix bin/120: "su -" buglet when empty "shell" field in passwd

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 7 16:05:42 1994 UTC (19 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +20 -10 lines
Diff to previous 1.7 (colored)

Fix bizarre handling of cleanenv, and set the subshells argv[0] according
to standard practice.  Changes from Alan Batie, David Greenman, and myself.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Aug 27 22:30:44 1993 UTC (19 years, 8 months ago) by jtc
Branch: MAIN
Changes since 1.6: +5 -1 lines
Diff to previous 1.6 (colored)

Minor tweaks: including header files to bring prototypes into scope,
explicitly declaring function return values, etc. to make gcc -Wall
shut up.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 1 18:08:12 1993 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

Add RCS identifiers.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jul 28 20:22:57 1993 UTC (19 years, 9 months ago) by jtc
Branch: MAIN
Changes since 1.4: +1 -3 lines
Diff to previous 1.4 (colored)

Back out last change until I can get an official interpretation.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jul 28 17:53:29 1993 UTC (19 years, 9 months ago) by jtc
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

Update LOGNAME as well as USER environment variables to keep POSIX utilities
that only understand LOGNAME happy.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 26 14:42:55 1993 UTC (20 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.2: +0 -4 lines
Diff to previous 1.2 (colored)

changed to use new libcrypt scheme.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Apr 17 01:10:19 1993 UTC (20 years, 1 month ago) by sef
Branch: MAIN
Changes since 1.1: +10 -8 lines
Diff to previous 1.1 (colored)

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" ...

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (20 years, 2 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>