| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Submitted by: pluknet
Approved by: kib (mentor)
X-MFC-With: r240645
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
| |
mntbuf can poit to memory allocated by getmntinfo(3) which can't be freed
PR: bin/171634
Approved by: cperciva (implicit)
|
|
|
|
|
|
|
|
|
| |
This reduces code duplication and code size.
/usr/bin/printf is not affected.
Side effect: different error messages when certain builtins are passed
invalid options.
|
|
|
|
|
|
|
|
|
| |
help tools understand that we're not leaking it.
PR: bin/171634
Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
|
| |
combination.
MFC after: 2 weeks
|
| |
|
|
|
|
|
| |
Using nextopt() avoids depending on the BSD-specific optreset feature in
getopt() and reduces code size (both source and binary).
|
|
|
|
| |
Obtained from: NetBSD
|
|
|
|
|
| |
PR: docs/168962
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# setfacl -m u:trasz:rwx x
# setfacl -m u:root:rwx x
# getfacl x
# file: x
# owner: root
# group: wheel
user::rw-
user:root:rwx
user:trasz:rwx
group::r--
mask::rwx
other::r--
# setfacl -m u:root:rwx x
setfacl: x: acl_calc_mask() failed: Invalid argument
setfacl: x: failed to set ACL mask
For NFSv4 ACLs, this sort of situation would result in duplicated
entries.
MFC after: 1 month
|
|
|
|
|
|
|
|
| |
PR submitter suggested adding it to acl(3) instead, but I don't think
pointing ordinary users at section 3 is a good idea.
PR: docs/162380
MFC after: 1 month
|
|
|
|
|
|
|
| |
on assert.
PR: bin/165807
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
|
|
|
| |
should be "s", not "S".
PR: docs/162380
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:
int gettimeofday(struct timeval *restrict tp, void *restrict tzp);
Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.
While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
|
|
|
|
|
|
|
|
|
| |
symbolic link to a directory for the target as a symbolic link instead of
a directory. This makes it possible to atomically update a symbolic
link using rename().
Reviewed by: gj
MFC after: 2 weeks
|
|
|
|
| |
PR: bin/171174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When waiting for child processes using "wait" or if "set -T" is in effect, a
signal interrupts the wait. Make sure there is no window where the signal
handler may be invoked (setting a flag) just before going to sleep.
There is a similar race condition in the shell language, but scripts can
avoid it by exiting from the trap handler or enforcing synchronization using
a fifo.
If SIGCHLD is not trapped, a signal handler must be installed for it. Only
install this handler for the duration of the wait to avoid triggering
unexpected [EINTR] errors elsewhere.
Note that for some reason only SIGINT and SIGQUIT interrupt a "wait"
command. This remains the case.
|
|
|
|
| |
rather than retrying wait3 if they happen.
|
| |
|
|
|
|
|
|
|
| |
This uses wait3's WCONTINUED flag.
There is no message for this. The change is visible in "jobs" or if the job
stops again.
|
|
|
|
|
| |
PR: bin/159746
Submitted by: Alex K.
|
| |
|
|
|
|
| |
This reduces code size a little and should fix a scan-build warning.
|
|
|
|
| |
Spotted by: scan-build (uqs)
|
|
|
|
|
| |
Otherwise, a signal arriving at exactly the right moment might not be
processed until another signal arrived.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Examples:
export x=~
now expands the tilde
local y=$1
is now safe, even if $1 contains IFS characters or metacharacters.
For a word to "look like an assignment", it must start with a name followed
by an equals sign, none of which may be quoted.
The special treatment applies when the first word (potentially after
"command") is "export", "readonly" or "local". There may be quoting
characters but no expansions. If "local" is overridden with a function there
is no special treatment ("export" and "readonly" cannot be overridden with a
function).
If things like
local arr=(1 2 3)
are ever allowed in the future, they cannot call a "local" function. This
would either be a run-time error or it would call the builtin.
This matches Austin Group bug #351, planned for the next issue of POSIX.1.
PR: bin/166771
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On recent versions of NetBSD's libedit, el_gets
now sets el_len to -1 on error so we can
distinguish between a NULL string and an error.
This fixes sh from exiting with newer versions
of libedit now allowing EINTR to return.
Obtained from: NetBSD
Reviewed by: jilles
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
| |
directory entry then use the struct stat from that instead of doing
it again, and skip the rm_overwrite() call if fts_read() indicated
that the entry couldn't be a regular file.
Obtained from: OpenBSD
MFC after: 1 week
|
|
|
|
|
|
|
| |
that the file we have opened is the one we expected. Also open in
non-blocking mode to avoid a potential hang with FIFOs.
Obtained from: NetBSD via OpenBSD
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Avoid a cd back into ${.CURDIR} to run mkbuiltins when we know make
will first cd into ${.OBJDIR}. Keep the cwd to what make sets it to.
2. Don't tell mkbuiltins where to write to (= ${.OBJDIR}), but where to
get sources from (= ${.CURDIR}). This to compensate for point 1.
This fixes a problem with bmake's mk files that optimize ${.OBJDIR} to
expand to "." after changing cwd, not taking into account that the
target is pretty much undoing that and not getting the full path to the
object tree anymore.
|
|
|
|
|
| |
Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
from PR version.
PR: 168255
Submitted by: Andy Kosela
Approved by: gjb
MFC after: 3 days
|
|
|
|
| |
Reported by: tinderbox
|
|
|
|
|
|
|
| |
(and thus needs to depend on libtermcap). Embedded systems may not
want or need colors.
Obtained from: Juniper Networks, Inc.
|
|
|
|
|
|
|
| |
ability to encrypt/decrypt files. Embedded systems can typically have
OpenSSL, but not for ed(1) to use it.
Obtained from: Juniper Networks, Inc.
|
| |
|
|
|
|
| |
The read builtin no longer does things with termios.
|
| |
|
|
|
|
|
|
| |
Reminded by: Garrett Cooper
MFC after: 3 days
X-MFC-with: r235297
|
|
|
|
|
|
|
|
|
|
|
| |
scripts the way sysctl(8) is. The -N option, like in sysctl(8),
displays only the kenv names, not their values. The -v option prints an
individual kenv variable name with its value as name="value". This is
the inverse of sysctl(8)'s -n flag, since the default behaviour of
kenv(1) is already like sysctl(8) -n.
Submitted by: Garrett Cooper < yanegomi AT gmail DOT com >
MFC after: 1 week
|
|
|
|
|
|
|
| |
quotation. Also make sure we have the same amount of columns in each row as
the number of columns we specify in the head arguments.
Reviewed by: brueffer
|
|
|
|
|
| |
Reported by: Kristof Provost
MFC after: 1 week
|
|
|
|
|
| |
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
outer if condition)
Reviewed by: se
Approved by: cperciva
|