mtree(8) specfile), compare the "post write/copy" mtime against the
actual "pre write/copy" mtime instead of the mtime from the specfile.
This prevents warnings such as:
pax: File ./foo was modified during copy to archive
if the file's mtime in the file system is different to what's in the specfile.
(The resultant file will still get the specfile mtime ...)
Accidentally left eval = 1 when I was adding the extension which caused the rm command to return a 1 when it successfully removed a directory. Thanks to tron for catching it.
- sprinkle some fflush() to print filenames correctly.
- print a \n to stdout to fix formatting.
- English, consistently use "Cannot" in error messages.
some whitespace cleanup.
side. Sometimes it was compared to int, which was -1 on EOF, and on
unsigned char machines UPEOF was (unsigned char)-1. This worked
by chance because isalpha((unsigned char)-1) returns false usually,
but it does not when the locale is invalid!
0. Revert previous change for PR/18689. We always want to exit with
an error if we could not determine the archive format. Instead,
treat empty files specially. On list/extract we turn into no/op.
On append, we turn into archive.
code did not properly deal with the fact that the replacement patterns built
by the -X code were on the stack, happily saving pointers into last weeks'
stack into the REPLACE structures.
Now, the replacement string is strdup'ed so it doesn't matter where the
original expression came from or it's lifetime.
just try to create it and interpret any error appropriately.
this fixes a problem where multiple "mkdir -p" processes can race,
with the loser returning a spurious error.
- ansification
- format of output of jobs command (etc)
- job identiers %+, %- etc
- $? and $(...)
- correct quoting of output of set, export -p and readonly -p
- differentiation between nornal and 'posix special' builtins
- correct behaviour (posix) for errors on builtins and special builtins
- builtin printf and kill
- set -o debug (if compiled with DEBUG)
- cd src obj (as ksh - too useful to do without)
- unset -e name, remove non-readonly variable from export list.
(so I could unset -e PS1 before running the test shell...)
While a hard link to a symbolic link is not ruled out by POSIX-2001,
the ln(1) utility (sans -s) is to perform equivalent to the link(2)
function on its operands, which includes the resolution of symbolic
links in source_file arguments.
> The wrong process is aborting when variable assignment fails
> in the vfork path. So the following command fails to execute
> the second echo (shown here with the correct output).
>
> $ (readonly r; r= /bin/echo a; echo b)
> r: is read only
> b
>
> fix: defer the mklocal() to the child shell.
> Also 'jobs' fails in a non-interactive shell.
> In showjobs(), the code that puts the process back into its
> own process group should only be run if the shell is actually
> doing job control - eg if 'mflag' is set.
$ /fred # non existant command
$ ^C # stops working
He says:
Ok the extra INTOFF is the one in exverror().
In almost all cases this doesn't matter because the longjmp()s
all end up in main() and the FORCEINTON call sorts it out
for the next command.
(There are a significant number of INTON/OFF mismatches through
the error paths...)
In any case the above failure can be 'fixed' by changing 2 (I think
they are both needed) INTON calls to FORCEINTON within evalcommand.
The following patch seems to work:
We should really look in the code and fix the INTON->INTOFF pairs.
and /usr/bin/cpio (/bin/cpio). The pathname of tar(1) is hard-coded
into things like binary packages, and thus must be kept around
for backward compatibility.
extract. We now generate GNU tar archives by default ("ustar ^@" instead of
"ustar^@00"). GNU extensions can be disabled with --strict.
XXX: long symlinks untested.
- correct -C processing
- add ability to read filenames and flags from a file
- don't print dangerous escape sequences to the terminal
- use strlcpy/strncpy properly.
- handle tmpfile creation better.
- improve documentation of options.
- handle stdout/stderr list selection correctly.
- kill gzip when we get interrupted.
- simplify gzip setup.
- add more flags to programs.
additional changes:
- librmt processing.
- set POSIXLY_CORRECT in options parsing.
- prevent more string overruns.
- support -T
we don't turn the switch on to replace tar and cpio yet.
with privilege elevation no suid or sgid binaries are necessary any
longer. Applications can be executed completely unprivileged. Systrace
raises the privileges for a single system call depending on the
configured policy.
Idea from discussions with Perry Metzger, Dug Song and Marcus Watts.
Approved by christos and thorpej.
effects, and add double to it, so that it aligns doubles correctly too. This
is just a workaround to fix the sparc64 problem where ALIGN() is now defined
in some include file to be 16 instead of 8. Thanks to martin for debugging this.
the non-vfork case. Having said that, it would be nice if pipelines of
simple commands were vforked too. Right now they are not.
Explain that setpgid() might fail because we are doing it both in the
parent and the child case, because we don't know which one will come
first.
Suspending a pipeline prints %1 Suspended n times where n is the number
of processes, but that was there before. It is easy to fix, but I'll
leave the code alone for now.
Propagate isroot, throughout the eval process and maintain it properly.
Fixes sleep 10 | cat^C not exiting because sleep and cat ended up in
their own process groups, because wasroot was always true in the children.
Plus my changes:
- walking process group fix in foregrounding a job.
- reset of process group in parent shell if interrupted before the wait.
- move INTON lower in the dowait so that the job structure is
consistent.
- error check all setpgid(), tcsetpgrp() calls.
- eliminate unneeded strpgid() call.
- check that we don't belong in the process group before we try to
set it.
race conditions -- now we always synchronously wait for the job to finish.
In evalcommand(), add the same INTOFF/INTON locking as evalpipe(), to prevent
leaving internal state inconsistent, and also to insure that we synchronously
wait for the job.
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
too. The code in display() could possibly be a bit smarter about this
requirement...
Fixes the problem in PR bin/18321 from David Laight and PR bin/18436
from FUKAUMI Naoki.
>here is a diff that will cause systrace to periodically save policies
>that have been modified. Useful if you run systrace on an xterm and
>kill it accidently. Or other applications like opera that are long
>running and can cause weird crashes.
for TARGET_CHAR when building mksyntax. This isn't perfect, but
it lets the host tool work on non-BSD systems without completely
redoing how sh is built.
be changed in the future to "yes".
If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).
If MKDYNAMICROOT == "yes", the following changes occur:
in <bsd.own.mk>:
SHLIBDIR?= /lib
SHLINKDIR?= /lib
in various Makefiles, the following entry is DISABLED.
LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).
- avoid race conditions by having seqno in ioctl
- better uid/gid tracking
- "replace" policy to replace args
- less diffs, as many of local changes were fed back to openbsd already
due to the 1st item, it was impossible for us to provide backward-compatibility
(new kernel + old bin/systrace won't work). upgrade both.
IEEE 1003.1-2001 (where applicable) and other systems, by follwoing symlinks
on the command line and changing their targets' modes/ownership/flags, rather
than ignoring them.
This fixes PR standards/563 (at last).
process and "parent" process is more conducive to policy generation.
Previously, tracing of a given program worked something like this:
fork()
if (child)
execprogram()
else
dotracing()
That means that if you "systrace -a named", named would fork and
background itself, but you would never get your prompt back because
systrace didn't exit. Now it works like this:
fork()
if (interactive)
if (child)
execprogram()
else
dotracing()
else
if (parent)
execprogram()
else
fork()
if (parent)
exit(0)
setsid()
dotracing()
This makes it *much* easier to do automated policy generation for
tasks run from rc.d. Or, for that matter, makes it much easier to use
systrace with tasks run from rc.d.
isn't addressed with a negative offset when back at the top of the tree.
This caused pax -M on sparc64 to generate corrupt tar files.
Problem found by Tim Goodwin <tjg@star.le.ac.uk> in [bin/17412].
* Don't -I/sys -- that breaks cross-building. Instead, use relative
pathnames in netbsd-syscalls.c, similar to what kdump does.
* No need to explicitly CLEANFILES the generated lex/yacc results.
* No need to link against libl and liby.
causes cat(1) to use fcntl(2) to set an exclusive advisory lock on stdout.
While being useful in its own right, this will shortly be used to
guarantee orderly writing to METALOG in the case of unprivileged builds
with NBUILDJOBS > 1.
- Put a space after the C language keyword ``switch''.
- Put an empty line if a function doesn't have local variable.
- Use do { } while (/*CONSTCOND*/ 0) instead of { } to protect a multi
statement macro
that they're 64-bit, and grab them out of memory appropriately. Otherwise,
big-endian systems get the wrong end of the 64-bit value and lose.
Keywords affected: inblk, majflt, minflt, msgrcv, msgsnd, nivcsw, nsigs,
nswap, nvcsw, and oublk.
point to a tty.
Unfortunately the shell assumed that it could do all process group
handling ioctls to fd=2, but this is not correct. Jobs that redirected
fd=2 would be unable to perform the ioctls and silently fail since
the error reporting channel is fd=2... Instead open /dev/tty set
it to close on exec, and use that instead (like all other shells
do). We don't handle the case where the OS does not provide FD_CLOEXEC
or FIOCLEX, because I am lazy.
While I am there:
- Simplify the code by defining functions for tc{g,s}pgrp when OLD_TTY_DRIVER
is defined.
- make sure that 'sh &' works by stopping itself. Don't kill the shell's
process group, kill the shell itself.
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.
commit where pipeline commands didn't inherit the correct process group.
Reviewed by Christos.
Change a trace format string arg to use %p instead of %x and a long cast.
type as we get the data passed from the kernel. This avoids (missing)
sign extension bugs on LP64 systems and partly takes care of PR 15677.
We now print this values as negative seconds - still wrong, but that
probably is due to the simple way this values are acumulated in the
scheduler, causing negative times when ntpd steps time backwards.