Commit Graph

1648 Commits

Author SHA1 Message Date
thorpej e41b1aa4a2 Use "unsigned char" and "char" instead of "u_int8_t" and "int8_t"
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.
2002-09-15 00:19:22 +00:00
sommerfeld af723a4db0 Use the output blocksize when computing how much room to leave for the
-s option, to suppress unnecessary leading spaces.
2002-09-14 04:25:55 +00:00
thorpej 42321e369a Don't use MAX(); not all systems have it, and this is a host tool. 2002-09-13 18:07:52 +00:00
enami caa54090d6 Add comment about my rev. 1.27 change. 2002-09-04 04:21:54 +00:00
tron 4fc0806163 Ignore EINVAL returned from fsync(2) because it is the expected error code
if we try to use it on a pipe.
2002-09-03 06:17:26 +00:00
enami cef250dab9 Detect the last nfs write error. 2002-09-01 11:33:22 +00:00
itojun c81b949059 allow # in system call name. remove trailing white space.
from provos
2002-08-30 17:09:31 +00:00
itojun b6aefbe19f sync with latest systrace in openbsd tree. improved systrace with chroot. 2002-08-28 03:52:44 +00:00
lukem ed401558f2 Implement MKDYNAMICROOT, which currently defaults to "no", but will
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).
2002-08-27 14:46:11 +00:00
lukem 146a774973 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc). 2002-08-19 09:56:00 +00:00
wiz 33bb527e01 Drop trailing whitespace. 2002-08-13 13:22:35 +00:00
sommerfeld 8f4d948b68 Improve some of the description of optional drive features. 2002-08-13 13:16:24 +00:00
itojun c3ca2a9ab6 calloc() arg mistake. it's (nelem, size). from openbsd 2002-08-12 02:37:26 +00:00
soren 236006d5dc Remove extraneous \n's in {err,warn}{,x} that used to be printfs. 2002-08-08 13:24:12 +00:00
itojun 95c7243aec more effort to make it compile on platforms w/o linux emul 2002-08-02 14:29:34 +00:00
soren e426c0fac8 Following FreeBSD's example, remove the old pre-statfs(2) code for
examining FFS filesystems directly. This also gets rid of df(1)'s
setgid operator bit.
2002-08-02 08:17:12 +00:00
christos 1eb5da90ed don't include utmp.h 2002-08-01 20:05:48 +00:00
wiz 0f88938132 Remove unneeded utmp.h include. 2002-08-01 18:41:34 +00:00
itojun 71a4240254 aenable linux systrace only on platforms that support it.
noted by hannken@eis.cs.tu-bs.de
2002-08-01 08:47:03 +00:00
itojun 2b8709b902 backout previous. mandoc(4) lies. 2002-07-31 00:28:02 +00:00
itojun 822deb809a .Bd -offset does not take numeric arg, but string. 2002-07-31 00:26:56 +00:00
jdolecek bdd538626a re-apply part of rev. 1.4 - Explain why you would use this.
contrary to rev. 1.4, keep 'The options are as follows' sentence, since
this seems to be used more on system manpages
2002-07-30 21:58:25 +00:00
jdolecek e9b2b4b074 re-apply changes in rev. 1.3 - Slight changes to the English. 2002-07-30 21:43:26 +00:00
wiz 93aef72209 Sort sections, Sh -> Ss in one place. 2002-07-30 17:06:58 +00:00
itojun 4f0c9c76b6 sync up with latest openbsd systrace.
- 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.
2002-07-30 16:29:28 +00:00
soren 8f6326d364 A local copy of <sys/tree.h> is unnecessary. 2002-07-30 06:09:56 +00:00
wiz 7b9b4ac6f7 'environment', not 'enviroment' 2002-07-11 10:53:19 +00:00
wiz 98c072db3b Fix a typo in a comment. moritz@jodeit.org via OpenBSD. 2002-07-10 22:22:29 +00:00
bjh21 525b050279 Align default behaviour of chmod, chgrp, chown, and chflags with symlink(7),
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).
2002-07-07 11:44:02 +00:00
atatat 11bb544ec0 Mostly just a rewrite of intercept_run() so the arrangement of "child"
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.
2002-07-03 22:54:38 +00:00
enami fa2d3031e1 The el option is an extention. 2002-07-03 01:27:23 +00:00
lukem e0fcc669c4 Change how "cd .." is handled in next_file() with -M, to ensure that curdir[]
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].
2002-06-28 11:29:45 +00:00
wiz 716daf6160 Sort sections. 2002-06-26 15:29:43 +00:00
gmcgarry 28272e6493 Explain why you would use this. Reword a little and add some history. 2002-06-26 06:50:14 +00:00
kleink 7595143319 Note that -T is to be used with -l; synced with FreeBSD via Michal
Pasternak on current-users.
2002-06-24 20:14:35 +00:00
agc 1e4714b470 Slight changes to the English. 2002-06-20 10:07:42 +00:00
jdolecek fc257046b9 g/c procfs fallback code, it's redundant now that we use sysctl to get
process info
2002-06-19 08:11:55 +00:00
thorpej 2265b1ff78 Fix warnings on Alpha: Cast to intptr_t to extract ints stored in void *'s,
and pull in proper prototypes.
2002-06-18 21:22:45 +00:00
thorpej 44e317ae3d Do the previous slightly differently. 2002-06-18 21:21:17 +00:00
thorpej 2623bb99b9 Add an extra cast to size_t when extracting an int stored in a void *.
(XXX Gross.)
2002-06-18 21:19:59 +00:00
itojun 3196ec98ba need ${.CURDIR} for linux_syscalls.c include 2002-06-18 09:52:04 +00:00
thorpej 4192e0aa5a Fix an include snafu pointed out by Matt Thomas. 2002-06-18 02:55:19 +00:00
thorpej 873bb550a0 Some const poisoning. 2002-06-18 02:49:08 +00:00
thorpej 0e0062e921 * Use CPPFLAGS for preprocessor flags, not CFLAGS.
* 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.
2002-06-18 01:37:12 +00:00
thorpej 5a040ec813 The SYSTR_CLONE ioctl is gone, so don't use it. (The kernel clones
the systrace communication channel as needed.)
2002-06-18 01:25:04 +00:00
wiz b70e67425c No .Pp before .Sh, drop trailing space, sort sections. 2002-06-17 17:06:08 +00:00
wiz c8c3c3fd5f Sort SEE ALSO. 2002-06-17 16:55:05 +00:00
christos d09016d45a Document some missing flags and add systrace(1) 'x' flag. 2002-06-17 16:48:44 +00:00
christos 5039a9e5ee Add userland portion of systrace. 2002-06-17 16:29:07 +00:00
bjh21 4a9e799f0d Rather than (ab)using the standard error message for EFTYPE, print our own
message when "cat -f" is used on a non-regular file.  This is necessary to
make cat(1) portable to systems that don't have EFTYPE (like Linux).
2002-06-11 22:05:07 +00:00