History log of /freebsd/usr.bin/su/su.c (Results 126 – 150 of 204)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0
# cd17a1f7 03-Jan-2006 Brian Somers <brian@FreeBSD.org>

Fix the other su bug reintroduced two commits ago, namely

$ su
% kill -STOP $$

where su is executing (t)csh. csh's job handling is a little more
special than that of (a)sh, bash and even z

Fix the other su bug reintroduced two commits ago, namely

$ su
% kill -STOP $$

where su is executing (t)csh. csh's job handling is a little more
special than that of (a)sh, bash and even zsh and blows up a little
more spectacularly. This modification restores the original mucking
about with the tty pgrp, but is careful to only do it when su (or
su's child) is the foreground process.

While I'm here, fix a STDERR_FILENO spelling as suggested by bde.

show more ...


# d039c62b 02-Jan-2006 Brian Somers <brian@FreeBSD.org>

Handle the case (that I just broke) where the following hangs:

$ su
# kill -STOP $$

Pointed out by: David Xu <davidxu@freebsd.org>


# d43e192e 02-Jan-2006 Brian Somers <brian@FreeBSD.org>

Remove broken code that mucks about with tcsetpgrp() -- even if
su isn't the foreground process. Hopefully this won't break PAM,
but I couldn't find any useful information about ache's theory
that i

Remove broken code that mucks about with tcsetpgrp() -- even if
su isn't the foreground process. Hopefully this won't break PAM,
but I couldn't find any useful information about ache's theory
that it will.

Specifically, this change fixes the following:

# sh
# echo $$
# su - root -c id &
# echo $$

The PID output changes as su seems to be kill -STOP'ing itself
and catching the parent shell in the process. This is especially
bad if you add a ``su - user -c command &'' to an rc script!

Sponsored by: Sophos/Activestate
Not objected to by: des

show more ...


Revision tags: release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0
# c8fbd1ec 17-Jan-2005 Robert Watson <rwatson@FreeBSD.org>

If su(1) is run without an effective uid of 0, generate an error to
the user indicating that su is not running setuid, which may help
suggest to the user that it should be setuid, or should not be
ru

If su(1) is run without an effective uid of 0, generate an error to
the user indicating that su is not running setuid, which may help
suggest to the user that it should be setuid, or should not be
running from a file system mounted nosuid.

Suggsted by: Ivan Voras <ivoras at fer dot hr>
MFC after: 2 weeks

show more ...


Revision tags: release/5.3.0_cvs, release/5.3.0
# b90e6008 15-Jun-2004 Mark Murray <markm@FreeBSD.org>

Oops. My last commit included a bug that would make "su -m" always
use /bin/sh. Fix this.


# 953cb3ec 13-Jun-2004 Mark Murray <markm@FreeBSD.org>

Paranoia, WARNS fixes and lint.


Revision tags: release/4.10.0_cvs, release/4.10.0
# d6d62d8d 04-Apr-2004 Philippe Charnier <charnier@FreeBSD.org>

Add FBSDID. Do not dot terminate errx(3) string.


Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0
# 60f4b54d 06-Jan-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

When root tries to su to a non-existent user, pam_authenticate() will
normally succeed (because root can su to anyone), but pam_acct_mgmt()
will most likely fail, causing su to log a confusing "pam_a

When root tries to su to a non-existent user, pam_authenticate() will
normally succeed (because root can su to anyone), but pam_acct_mgmt()
will most likely fail, causing su to log a confusing "pam_acct_mgmt:
error in service module" message. To avoid this, call getpwnam()
before pam_acct_mgmt().

Sponsored by: registrar.no

show more ...


# 7430623f 04-Nov-2003 David Xu <davidxu@FreeBSD.org>

Be sure to restore foreground group to parent su before parent su
exits, otherwise shell will be confused and does not set foreground
group correctly for next su command. This sounds like a bug in sh.


# bcf123b3 04-Nov-2003 David Xu <davidxu@FreeBSD.org>

It seems when su executes in a shell scripts, there is a timing race,
sometimes, su will receive a SIGTTOU when parent su tries to set child
su's process group as foreground group, and su will be sto

It seems when su executes in a shell scripts, there is a timing race,
sometimes, su will receive a SIGTTOU when parent su tries to set child
su's process group as foreground group, and su will be stopped unexpectly,
ignoring SIGTTOU fixes the problem.

Noticed by: fjoe

show more ...


Revision tags: release/4.9.0_cvs, release/4.9.0
# f6a43a2b 19-Oct-2003 Olivier Houchard <cognet@FreeBSD.org>

Fix broken su -m behaviour :
chshell must return 0 if the shell is not a standard shell, or else it is
possible to use an account without a valid shell.

Reviewed by: des


Revision tags: release/5.1.0_cvs, release/5.1.0
# 60b28daa 08-Apr-2003 Dag-Erling Smørgrav <des@FreeBSD.org>

PAM-related improvements:

- if operating "as them" (su -l), use pam_{open,close}_session()
- allow PAM to override $HOME (pam_chroot needs this)
- chdir early, because later on we may be chrooted

PAM-related improvements:

- if operating "as them" (su -l), use pam_{open,close}_session()
- allow PAM to override $HOME (pam_chroot needs this)
- chdir early, because later on we may be chrooted and chdir will fail

Also use pid_t instead of int where applicable.

show more ...


Revision tags: release/4.8.0_cvs, release/4.8.0
# a75fd4bf 27-Mar-2003 David Xu <davidxu@FreeBSD.org>

Put child process in a different process group, ensure that the broadcast
signal never affects su directly, some shells changes its pgrp at running
or suspended time, so a broadcast SIGTSTP from chil

Put child process in a different process group, ensure that the broadcast
signal never affects su directly, some shells changes its pgrp at running
or suspended time, so a broadcast SIGTSTP from child will mess up su's job
control.

Discussed with: bde

show more ...


# 7a179eb4 11-Mar-2003 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix style bugs in the previous commit (which weren't in bde's patch)


# 658d3a6b 11-Mar-2003 David Xu <davidxu@FreeBSD.org>

Reset SIGTSTP handler to default both for parent and child process.

Submitted by: bde


# e9da86cb 11-Mar-2003 David Xu <davidxu@FreeBSD.org>

Fix long standing job control bug. SIGTSTP shouldn't be ignored.
Special instructions tested:
suspend
stop $$


# 84c03427 06-Feb-2003 Dag-Erling Smørgrav <des@FreeBSD.org>

Pass the correct, verified username to PAM instead of getlogin().


Revision tags: release/5.0.0_cvs, release/5.0.0
# 1494905b 23-Oct-2002 Robert Watson <rwatson@FreeBSD.org>

Add a new '-s' option to su(1): if the flag is present, attempt to
also set the user's MAC label as part of the user credential setup
by setting setusercontext(3)'s SETMAC flag. By default, change o

Add a new '-s' option to su(1): if the flag is present, attempt to
also set the user's MAC label as part of the user credential setup
by setting setusercontext(3)'s SETMAC flag. By default, change only
traditional process properties.

Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

show more ...


# ed5fc39f 18-Oct-2002 Mark Murray <markm@FreeBSD.org>

When a user gets refused because the password is wrong, use the
older "BAD SU" syslog message that folks prefer. There is quite
a bit more tweaking that can be done with other similar messages.

Aske

When a user gets refused because the password is wrong, use the
older "BAD SU" syslog message that folks prefer. There is quite
a bit more tweaking that can be done with other similar messages.

Asked for by: tjr

show more ...


# 505b2816 18-Oct-2002 Tim J. Robbins <tjr@FreeBSD.org>

Style: use sa_handler instead of __sigaction_u.__sa_handler.


# 81af0b57 14-Oct-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Remove an unused variable.


Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2
# 3e2322fc 12-Aug-2002 Andrey A. Chernov <ache@FreeBSD.org>

Fix typing error in prev. commit


# 09d932cf 12-Aug-2002 Andrey A. Chernov <ache@FreeBSD.org>

Fix style bug in prev. commit


# 54c93e4f 12-Aug-2002 Andrey A. Chernov <ache@FreeBSD.org>

Fix su job control (recently introduced for PAM cleanup purposes) to not
kill login shell on either "suspend/fg" or "stop $$/fg" for tcsh. Since
this bug occurse on -stable too, it is not kernel thre

Fix su job control (recently introduced for PAM cleanup purposes) to not
kill login shell on either "suspend/fg" or "stop $$/fg" for tcsh. Since
this bug occurse on -stable too, it is not kernel threads bug.

Submitted by: David Xu <bsddiy@yahoo.com>

show more ...


# 04a0be1f 07-Aug-2002 Andrey A. Chernov <ache@FreeBSD.org>

Back out workaround of fixing "suspend/fg" by price of breaking "stop $$/fg".

This is real kernel bug (threads) and don't attempt to mask it by
workarounds to increase chances to fix it in the kerne

Back out workaround of fixing "suspend/fg" by price of breaking "stop $$/fg".

This is real kernel bug (threads) and don't attempt to mask it by
workarounds to increase chances to fix it in the kernel.

show more ...


123456789