| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
"-c" option
with login class not defined in login.conf(5) would silently fail, resulting in using
the default login class.
|
|
|
|
|
|
| |
must be defined in login.conf.
MFC after: 1 month
|
|
|
|
|
| |
It seems su does build without warnings, but it requires a small fix to
libbsm headers, which I have not committed to SVN yet.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
the '-c' argument is passed to the shell, not to su(1), which would
indicate the login class.
'su -m <user> -c <command>'
Submitted by: Warren Block <wblock@wonkity.com> (followup to 157078)
MFC after: 5 days
|
|
|
|
| |
MFC after: 5 days
|
|
|
|
|
|
|
|
| |
within a shell as <user>.
PR: 157078
Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 5 days
|
|
|
|
|
|
| |
Requested by: nork
Reviewed by: Takeharu KATO <takeharu1219__at__ybb.ne.jp>, nork
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $FreeBSD$ to a few files to keep svn happy.
Discussed with: imp, rwatson
|
|
|
|
| |
Also add some missing $FreeBSD$ to keep svn happy.
|
|
|
|
| |
needed.
|
|
|
|
| |
Tested with: make universe
|
|
|
|
|
|
|
| |
value. This bug went un-noticed for so long because EPERM == 1
MFC after: 1 week
Spotted by: sson, rwatson
|
|
|
|
|
|
|
|
| |
as the ``man'' user does not have a valid shell by default.
PR: docs/121713
Approved by: trhodes
MFC after: 3 days
|
|
|
|
|
| |
that the way char * and void * pointers may not be stored in the
same way.
|
|
|
|
|
|
| |
statement has never executed as expected, fix it.
MFC after: 3 days
|
|
|
|
| |
Approved by: re (hrs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.
Convert all calls to POSIX from historic BSD API:
- unsetenv returns an int.
- putenv takes a char * instead of const char *.
- putenv no longer makes a copy of the input string.
- errno is set appropriately for POSIX. Exceptions involve bad environ
variable and internal initialization code. These both set errno to
EFAULT.
Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit. A few I re-wrote to use setenv()
instead of putenv().
New regression module for tools/regression/environ to test these
functions. It also can be used to test the performance.
Bump __FreeBSD_version to 700050 due to API change.
PR: kern/99826
Approved by: wes
Approved by: re (kensmith)
|
|
|
|
|
|
|
|
|
| |
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.
Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
|
|
|
|
| |
don't free memory after putenv()
|
|
|
|
|
|
| |
proper place.
Pointed out by: rwatson
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
system that don't have audit framefork compiled into kernel or ia32 binary
on amd64 system will result in SIGSYS. There is one place in su.c itself
where it tries to check for errno != ENOSYS, but it has been a nop since su
does not catch SIGSYS anyway. There are few other places in libbsm,
where attempt to invoke audit syscal would result in SIGSYS if no audit
support is present in the kernel, so that the only reliable method for
now is to disable SIGSYS completely in the case when BSM is compiled in.
In the long run, both direct invocation of audit-related syscalls and
libbsm should be made more intellegent to handle the case when BSM is not
compiled into the kernel gracefully.
MFC after: 3 days
(provided re@ approval)
|
| |
|
|
|
|
|
|
| |
when root doesn't have the permission to enter target user's home directory.
If set, PAM environment variable HOME will be used in chdir(2) instead of
pwd->pw_dir, this allows pam_chroot module to continue to function.
|
|
|
|
|
| |
Requested by: novel
Discussed with: brueffer, simon
|
|
|
|
|
|
|
|
|
|
|
|
| |
successful and failed su attempts will be recorded using the AUE_su
event type (login or lo class) if auditing is present in the system.
Currently, the records will have a header, subject, text (with the
actual diagnostics), a return and trailer token.
See audit_submit(3) for more information.
Reviewed by: rwatson
Obtained from: TrustedBSD Project
|
|
|
|
|
|
|
|
|
|
| |
default, and how to change it.
PR: docs/70616
Submitted by: Jilles Tjoelker <jilles at stack dot nl>
Reviewed by: ru@
Approved by: ceri@
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ 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.
|
|
|
|
|
|
|
| |
$ su
# kill -STOP $$
Pointed out by: David Xu <davidxu@freebsd.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
to PRECIOUSLIB from bsd.lib.mk. The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.
Reviewed by: oliver
|
|
|
|
| |
Noticed by: ru
|
|
|
|
|
|
| |
Submitted by: Jilles Tjoelker <jilles@stack.nl> (original version)
PR: docs/70616 (part of)
MFC after: 1 week
|
| |
|
| |
|
|
|
|
| |
use /bin/sh. Fix this.
|
| |
|
|
|
|
| |
Fixed the grammar nit.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
exits, otherwise shell will be confused and does not set foreground
group correctly for next su command. This sounds like a bug in sh.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
PR: docs/55613
Submitted by: gshapiro@freebsd.org
Approved by: blackend (mentor)
|
| |
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
| |
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
|