Commit Graph

21 Commits

Author SHA1 Message Date
provos 2268d69749 support for a new kernel message that informs userland that an in-kernel
policy has been freed.  this allows us to enforce the kernel policy size
limit for users while users are still able to execute an arbitary number
of applications;  the protocol change is backwards compatible.
2003-06-03 04:33:44 +00:00
provos c57cb7fe98 escape " and \ to \" and \\; with the help of marius@monkey.org; 2003-06-03 01:20:06 +00:00
wiz 8361a7103e Sync usage with man page. 2003-05-21 06:26:07 +00:00
provos 7685de2195 use LOGIN_NAME_MAX instead of MAXLOGNAME; closes pr/21048 2003-04-09 17:50:08 +00:00
provos a2468a8d04 new "ask" action. creates a new rule that prompts the user for an
action but allows only yes or no answer.  inspired from talking
with dugsong@monkey
2003-03-25 23:17:29 +00:00
provos 488a952788 better -c parsing; from camiel@sentia 2003-03-25 23:04:48 +00:00
provos 4ff1bfdbd5 allow logging for untranslated syscalls; from anil@recoil.org 2002-12-15 19:05:31 +00:00
thorpej 5759456a18 Avoid confict with reserved identifier "log". 2002-12-06 01:43:18 +00:00
provos 4df7def23e missing break; from grange@rt.mipt.ru 2002-10-28 16:50:05 +00:00
provos 61e8c76047 support for privilege elevation.
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.
2002-10-11 21:54:55 +00:00
provos 306becc9b9 add A to usage; noted by nickus@mpi-cbg.de 2002-10-08 14:50:57 +00:00
provos 89afc325c0 predicates are part of the grammar now; in non-root case, predicates are
evaluated only once; in root case, predicates and variable expansion are
dynamic.
2002-10-08 14:49:23 +00:00
itojun ed21532463 "output" is a pointer of size "outlen", so use outlen instead of
sizeof(output)

From: "Vincent Labrecque" <vincent@psyfreaks.ca>
2002-10-08 02:47:59 +00:00
itojun d584f0a0fc support for templates. they allow fast generation of new policies. an
appropriate template can be inserted during initial policy generation.
from provos
2002-09-23 04:35:41 +00:00
itojun 0b2d2fe3d7 daemon should not change the directory. from provos 2002-09-17 04:54:36 +00:00
itojun c1261b4aff periodically save policies that have been modified. from provos
>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.
2002-09-16 04:31:46 +00:00
itojun b6aefbe19f sync with latest systrace in openbsd tree. improved systrace with chroot. 2002-08-28 03:52:44 +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
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
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
christos 5039a9e5ee Add userland portion of systrace. 2002-06-17 16:29:07 +00:00