OpenBSD CVS

CVS log for src/sys/dev/Attic/systrace.c


[BACK] Up to [local] / src / sys / dev

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.79, Mon Apr 25 20:00:33 2016 UTC (8 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.78: +1 -1 lines
FILE REMOVED

boom goes the dynamite

Revision 1.78 / (download) - annotate - [select for diffs], Tue Mar 1 16:43:08 2016 UTC (8 years, 3 months ago) by naddy
Branch: MAIN
Changes since 1.77: +33 -2 lines
Diff to previous 1.77 (colored)

Copy the stackgap_init() and stackgap_alloc() functions from
compat/common/compat_util.c to dev/systrace.c, the one place they
are used, and remove the remaining kernel references to compat/*.
ok visa@

Revision 1.77 / (download) - annotate - [select for diffs], Tue Sep 8 11:58:58 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

sizes for free(); ok semarie

Revision 1.76 / (download) - annotate - [select for diffs], Thu Aug 27 06:16:41 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.75: +6 -5 lines
Diff to previous 1.75 (colored)

simple sizes for free()

Revision 1.75 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:46 2015 UTC (9 years, 2 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.74: +1 -2 lines
Diff to previous 1.74 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 10 22:03:11 2015 UTC (9 years, 3 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Another uiomovei(,sizeof,) -> uiomove

Revision 1.73 / (download) - annotate - [select for diffs], Tue Feb 10 21:56:09 2015 UTC (9 years, 3 months ago) by miod
Branch: MAIN
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

First step towards making uiomove() take a size_t size argument:
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jan 19 18:37:19 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

use SYMLOOP_MAX rather than MAXSYMLINKS

Revision 1.71 / (download) - annotate - [select for diffs], Sun Jul 13 23:10:23 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.70: +2 -3 lines
Diff to previous 1.70 (colored)

Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishian
ok tedu

Revision 1.70 / (download) - annotate - [select for diffs], Sat Jul 12 18:48:51 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.69: +9 -9 lines
Diff to previous 1.69 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.69 / (download) - annotate - [select for diffs], Tue Jun 17 03:49:03 2014 UTC (9 years, 11 months ago) by guenther
Branch: MAIN
Changes since 1.68: +51 -29 lines
Diff to previous 1.68 (colored)

Revise previous: if a user calls STRIOCGETCWD two or more times in a row
without an intervening STRIOCRESCWD, release the current values instead
of the saved values, so as to effectively emulate a STRIOCRESCWD.

While here, make sure the fdc->fd_[cr]dir members are updated before
vrele()ing their old values, so that they can't be caught as dangling refs.

ok matthew@

Revision 1.68 / (download) - annotate - [select for diffs], Sun Jun 15 20:22:12 2014 UTC (9 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.67: +7 -1 lines
Diff to previous 1.67 (colored)

Fix vnode leak in systrace(4).

If a user calls STRIOCGETCWD two or more times in a row without an
intervening STRIOCRESCWD, then the references held on fst->fd_{c,r}dir
would leak.

ok miod

Revision 1.67 / (download) - annotate - [select for diffs], Fri Apr 18 11:51:17 2014 UTC (10 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.66: +48 -86 lines
Diff to previous 1.66 (colored)

Have each thread keeps its own (counted!) reference to the process's ucreds
to avoid possible use-after-free references when swapping ids in threaded
processes.  "Do I have the right creds?" checks are always made with the
threads creds.

Inspired by FreeBSD and NetBSD
"right time" deraadt@

Revision 1.66 / (download) - annotate - [select for diffs], Sun Mar 30 21:54:48 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.65: +31 -31 lines
Diff to previous 1.65 (colored)

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.

ok matthew@

Revision 1.65 / (download) - annotate - [select for diffs], Thu Mar 27 04:38:40 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

Check for PS_SUGID/PS_SUGIDEXEC against the correct set of flags

ok deraadt@

Revision 1.64 / (download) - annotate - [select for diffs], Wed Mar 26 05:23:42 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.63: +13 -12 lines
Diff to previous 1.63 (colored)

Move p_emul and p_sigcode from proc to process.
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer.  Permit generating of NAMI and
CSW records inside ktrace(2) itself.

ok deraadt@ millert@

Revision 1.63 / (download) - annotate - [select for diffs], Sun Apr 22 05:43:14 2012 UTC (12 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

Add struct proc * argument to FRELE() and FILE_SET_MATURE() in
anticipation of further changes to closef().  No binary change.

ok krw@ miod@ deraadt@

Revision 1.62 / (download) - annotate - [select for diffs], Mon Feb 20 22:23:39 2012 UTC (12 years, 3 months ago) by guenther
Branch: MAIN
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored)

First steps for making ptrace work with rthreads:
 - move the P_TRACED and P_INEXEC flags, and p_oppid, p_ptmask, and
   p_ptstat member from struct proc to struct process
 - sort the PT_* requests into those that take a PID vs those that
   can also take a TID
 - stub in PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT

ok kettenis@

Revision 1.61 / (download) - annotate - [select for diffs], Wed Feb 15 04:26:27 2012 UTC (12 years, 3 months ago) by guenther
Branch: MAIN
Changes since 1.60: +3 -1 lines
Diff to previous 1.60 (colored)

Hold struct filedesc's fd_lock when writing to the fd_ofiles, fd_ofileflags,
or fd_{lo,hi}maps members, or when doing a read for a write.  Fixes hangs
when an rthreaded processes sleeps while copying the fd table for fork()
and catches another thread with the lock.

ok jsing@ tedu@

Revision 1.60 / (download) - annotate - [select for diffs], Sun Sep 18 23:24:14 2011 UTC (12 years, 8 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.59: +23 -7 lines
Diff to previous 1.59 (colored)

Add support for *at(2) system calls to systrace(1).

ok deraadt@, sthen@, jasper@

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jul 11 15:40:47 2011 UTC (12 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.58: +1 -11 lines
Diff to previous 1.58 (colored)

Revert art@'s moving around of the KERNEL_LOCK()/KERNEL_UNLOCK() calls,
as it causes hangs in some ports, including libsigsegv's configure script

confirmed by krw@, landry@

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jul 7 18:11:24 2011 UTC (12 years, 10 months ago) by art
Branch: MAIN
Changes since 1.57: +12 -2 lines
Diff to previous 1.57 (colored)

There is a bunch of places in the kernel entry points where we don't
hold the kernel lock, but still need call one function that needs it.

Instead of grabbing the lock all over the place, move the locks into
the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret,
systrace_redirect and ADDUPROF. In the cases we already hold the biglock
we'll just recurse.

kettenis@, beck@ ok

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jun 24 22:48:36 2011 UTC (12 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.56: +3 -2 lines
Diff to previous 1.56 (colored)

printf -> DPRINTF in the SIGKILL path

Revision 1.56 / (download) - annotate - [select for diffs], Thu Jun 23 16:02:33 2011 UTC (12 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.55: +13 -46 lines
Diff to previous 1.55 (colored)

ansify a few files.  ok deraadt dlg krw matthew

Revision 1.55 / (download) - annotate - [select for diffs], Wed Jun 22 01:32:16 2011 UTC (12 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.54: +10 -4 lines
Diff to previous 1.54 (colored)

Add a SYSTR_POLICY_KILL per-syscall policy option that sends SIGKILL to
the traced process when the syscall is attempted. This is more useful and
safer for unsupervised sandboxing than returning EPERM (which is the
behaviour of SYSTR_POLICY_NEVER), as this could cause dangerous misbehaviour
in applications that don't expect it.

"I like it" deraadt@ markus@

Revision 1.54 / (download) - annotate - [select for diffs], Sat Apr 2 17:04:35 2011 UTC (13 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.53: +10 -12 lines
Diff to previous 1.53 (colored)

Move P_SUGID and P_SUGIDEXEC from struct proc to struct process, so
that you can't evade the checks by doing the dirty work in an rthread

ok blambert@, deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jul 21 18:44:01 2010 UTC (13 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.52: +1 -31 lines
Diff to previous 1.52 (colored)

No need for read/write functions, just use enodev like all the other
things things do
ok nicm

Revision 1.52 / (download) - annotate - [select for diffs], Mon Nov 9 17:53:39 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.51: +1 -2 lines
Diff to previous 1.51 (colored)

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt

Revision 1.51 / (download) - annotate - [select for diffs], Sat Oct 31 06:40:16 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (colored)

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Jul 9 22:29:55 2009 UTC (14 years, 10 months ago) by thib
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Remove the VREF() macro and replaces all instances with a call to verf(),
which is exactly what the macro does.

Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.

OK blambert@
Agreed by many.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Nov 9 05:13:53 2008 UTC (15 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.48: +39 -24 lines
Diff to previous 1.48 (colored)

systrace activation happens in the middle of a rather sensitive piece of
fork(), i worry about it a lot but cannot prove yet that sleeping there
is bad.  Anyways, this change makes us never sleep in that area -- the
memory needed is allocated ealier like the ptrace state.  tested by many
developers.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Sep 12 12:27:27 2008 UTC (15 years, 8 months ago) by blambert
Branch: MAIN
Changes since 1.47: +3 -5 lines
Diff to previous 1.47 (colored)

Remove bzero/memset calls after pool_gets by passing the PR_ZERO
flag to the pool_get call.

ok art@, krw@

Revision 1.47 / (download) - annotate - [select for diffs], Sat Jan 5 07:33:37 2008 UTC (16 years, 5 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

return with ENOTTY instead of EINVAL for unknown ioctl requests.

ok krw@ deraadt@ dlg@

Revision 1.46 / (download) - annotate - [select for diffs], Tue Sep 11 13:39:33 2007 UTC (16 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

KNF

prompted and "much better" by marco@, ok pyr@

Revision 1.45 / (download) - annotate - [select for diffs], Mon Sep 10 19:49:31 2007 UTC (16 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.44: +5 -7 lines
Diff to previous 1.44 (colored)

more MALLOC/FREE -> malloc/free and M_ZERO changes

ok pyr@

Revision 1.44 / (download) - annotate - [select for diffs], Thu Mar 15 10:22:30 2007 UTC (17 years, 2 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.43: +6 -6 lines
Diff to previous 1.43 (colored)

Since p_flag is often manipulated in interrupts and without biglock
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.

Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.

kettenis@ ok

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Wed Nov 1 20:03:35 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_4_0
Changes since 1.42: +14 -3 lines
Diff to previous 1.42 (colored) next main 1.43 (colored)

MFC:
Fix by djm@

fix an exploitable integer overflow found by Chris Evans of Google
Security; ok deraadt

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Fri Oct 6 05:53:37 2006 UTC (17 years, 8 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.38: +14 -3 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

MFC:
Fix by djm@

fix an exploitable integer overflow found by Chris Evans of Google
Security; ok deraadt

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Fri Oct 6 05:51:12 2006 UTC (17 years, 8 months ago) by brad
Branch: OPENBSD_3_9
Changes since 1.40: +14 -3 lines
Diff to previous 1.40 (colored) next main 1.41 (colored)

MFC:
Fix by djm@

fix an exploitable integer overflow found by Chris Evans of Google
Security; ok deraadt

Revision 1.43 / (download) - annotate - [select for diffs], Fri Oct 6 05:47:27 2006 UTC (17 years, 8 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.42: +14 -3 lines
Diff to previous 1.42 (colored)

fix an exploitable integer overflow found by Chris Evans of Google
Security; ok deraadt

Revision 1.42 / (download) - annotate - [select for diffs], Sun May 28 17:06:38 2006 UTC (18 years ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE
Branch point for: OPENBSD_4_0
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Allow len == 1 in systrace_fname(), so systraced processes can proceed
their *stat() calls, for example, and get ENOENT, which is expected for
"", instead of a forced EINVAL.

Fixes the spurious 'rm: : Invalid argument' warnings when building with
option USE_SYSTRACE, reported on ports@.

Okay provos@ sturm@ deraadt@

Revision 1.41 / (download) - annotate - [select for diffs], Tue May 23 22:28:22 2006 UTC (18 years ago) by alek
Branch: MAIN
Changes since 1.40: +34 -34 lines
Diff to previous 1.40 (colored)

Replace lockmgr with rwlock; 'i think so' tedu@, ok sturm@

Revision 1.40 / (download) - annotate - [select for diffs], Sun Dec 11 21:30:30 2005 UTC (18 years, 5 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.39: +3 -4 lines
Diff to previous 1.39 (colored)

Replace procfs_domem() with a similar interface, process_domem(), which lives
out of procfs and gets a ptrace request PT_{READ,WRITE}_{I,D} as argument;
also procfs_checkioperm() becomes process_checkioperm().

From art@ some time ago; ok kettenis@ pedro@

Revision 1.39 / (download) - annotate - [select for diffs], Sat Nov 19 02:18:00 2005 UTC (18 years, 6 months ago) by pedro
Branch: MAIN
Changes since 1.38: +30 -31 lines
Diff to previous 1.38 (colored)

Remove unnecessary lockmgr() archaism that was costing too much in terms
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Apr 17 22:11:34 2005 UTC (19 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE
Branch point for: OPENBSD_3_8
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Intermediate cast of strio_offs -> uio_offset should be u_long not long
since otherwise a very high kernel address would be stored as a negative
offset.  From NetBSD (christos).

Revision 1.37 / (download) - annotate - [select for diffs], Sun Nov 7 20:39:31 2004 UTC (19 years, 6 months ago) by marius
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.36: +89 -12 lines
Diff to previous 1.36 (colored)

add a new message: inject.  this allows the tracer to to inject buffers into
the stackgap.  this in turn allows for argument replacement with indirection.
for example replacing an entire envp or struct pollfd.

ok provos@ millert@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jul 7 07:31:40 2004 UTC (19 years, 11 months ago) by marius
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.35: +108 -31 lines
Diff to previous 1.35 (colored)

fix an issue when scripts are exec'd under systrace where
the argv[0] would be normalized, and hence break scripts
that depend on how they were called.

this fixes an issue in the ports builds.

ok provos@ deraadt@; lots of testing during hackathon sturm@ naddy@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jun 23 05:16:35 2004 UTC (19 years, 11 months ago) by marius
Branch: MAIN
Changes since 1.34: +61 -18 lines
Diff to previous 1.34 (colored)

a few fixes to systrace

- add an exec message so that whenever a set-uid/gid process
  exec's a new image which we may control, the exec does not
  go by unnoticed.

- take special care to check for P_SUGIDEXEC as well as
  P_SUGID, corresponding to the same changes that were made in
  the ptrace code a while ago

ok niels@, sturm@; thanks to naddy for testing

Revision 1.28.4.2 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:13 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.28.4.1: +205 -92 lines
Diff to previous 1.28.4.1 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.34 / (download) - annotate - [select for diffs], Tue Oct 21 05:24:40 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

typos from Tom Cosgrove;

Revision 1.33 / (download) - annotate - [select for diffs], Wed Oct 8 16:30:01 2003 UTC (20 years, 7 months ago) by sturm
Branch: MAIN
Changes since 1.32: +144 -72 lines
Diff to previous 1.32 (colored)

originally from cb@netbsd.org, adapted by provos

itojun@ ok

fix a race condition between path resolution in userland
and the subsequent namei(): inform the kernel portion of
valid filenames and then disallow symlink lookups for
those filenames by means of a hook in namei().
with suggestions from provos@

also, add (currently unused) seqnr field to struct
systrace_replace, from provos@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Sep 23 16:51:12 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.31: +16 -14 lines
Diff to previous 1.31 (colored)

Replace select backends with poll backends.  selscan() and pollscan()
now call the poll backend.  With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK

Revision 1.31 / (download) - annotate - [select for diffs], Fri Aug 15 20:32:16 2003 UTC (20 years, 9 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

change arguments to suser.  suser now takes the process, and a flags
argument.  old cred only calls user suser_ucred.  this will allow future
work to more flexibly implement the idea of a root process.  looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@  testing and further review miod@

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jun 16 06:36:40 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.29: +43 -4 lines
Diff to previous 1.29 (colored)

- limited number of processes per systrace
- escape fixes for special characters
markus, sturm ok.  from provos

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Mon May 19 22:01:42 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.5.2.2: +62 -54 lines
Diff to previous 1.5.2.2 (colored) next main 1.6 (colored)

sync

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Tue May 13 19:34:56 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Mar 28 12:40:01 2003 UTC (21 years, 2 months ago) by henning
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

unbreak
STRIOCCLONE and SYSTR_CLONE have the same value now

ok mickey@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Feb 20 22:03:31 2003 UTC (21 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Branch point for: SMP
Changes since 1.27: +57 -55 lines
Diff to previous 1.27 (colored)

Fix a crash in the systrace found by form@
One is a kernel fix that changes the lockin and one is a userland fix that
prevents dereferencing a freed pointer.
From provos
deraadt@ ok

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 12 08:36:05 2002 UTC (21 years, 5 months ago) by art
Branch: MAIN
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored)

statement after label.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Dec 4 17:37:39 2002 UTC (21 years, 6 months ago) by mickey
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

rename the clone ioctl to avoid clashing w/ the sockio; provos@ ok

Revision 1.25 / (download) - annotate - [select for diffs], Sun Nov 10 04:34:56 2002 UTC (21 years, 6 months ago) by art
Branch: MAIN
Changes since 1.24: +6 -1 lines
Diff to previous 1.24 (colored)

Be more careful with illegal syscall numbers.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:33:23 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.5.2.1: +407 -115 lines
Diff to previous 1.5.2.1 (colored)

sync to -current

Revision 1.24 / (download) - annotate - [select for diffs], Fri Oct 25 23:22:58 2002 UTC (21 years, 7 months ago) by fgsch
Branch: MAIN
CVS Tags: UBC_SYNC_B
Changes since 1.23: +1 -0 lines
Diff to previous 1.23 (colored)

add id tags.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Oct 16 15:01:08 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.22: +153 -57 lines
Diff to previous 1.22 (colored)

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.

from provos

Revision 1.22 / (download) - annotate - [select for diffs], Wed Oct 9 03:51:49 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.21: +32 -0 lines
Diff to previous 1.21 (colored)

new message to track uid/gid changes
from provos

Revision 1.21 / (download) - annotate - [select for diffs], Wed Aug 28 03:38:35 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

cast size_t to u_long on printing.  from netbsd

Revision 1.20 / (download) - annotate - [select for diffs], Wed Aug 7 21:22:55 2002 UTC (21 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

return EBUSY in processready

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jul 30 15:53:36 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.18: +6 -6 lines
Diff to previous 1.18 (colored)

minor KNF.  pid_t is unsigned.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jul 30 04:28:05 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.17: +10 -10 lines
Diff to previous 1.17 (colored)

whitespace at EOL

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jul 24 21:45:55 2002 UTC (21 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.16: +18 -5 lines
Diff to previous 1.16 (colored)

better uid/gid tracking; okay deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jul 23 18:01:39 2002 UTC (21 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.15: +3 -1 lines
Diff to previous 1.15 (colored)

prevent double free in some error conditions; from xs@kittenz.org

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 22 04:02:39 2002 UTC (21 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.14: +9 -0 lines
Diff to previous 1.14 (colored)

add seqnr to message from kernel, userland needs to quote correct seqnr.
avoids problems where tsleep has been interrupted by a signal.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 21 00:23:00 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.13: +4 -0 lines
Diff to previous 1.13 (colored)

two more missing systrace_lock

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jul 21 00:18:57 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.12: +2 -0 lines
Diff to previous 1.12 (colored)

need systrace_lock/unlock around lockmgr lock operation.  provos ok

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jul 20 00:03:37 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

comment clarification.  niels ok

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jul 19 07:50:42 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

minor KNF

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 19 07:43:22 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.9: +7 -7 lines
Diff to previous 1.9 (colored)

whitespace

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 19 07:39:49 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.8: +7 -7 lines
Diff to previous 1.8 (colored)

tabify

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jul 13 08:13:54 2002 UTC (21 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.7: +29 -27 lines
Diff to previous 1.7 (colored)

do not call unlock when the lock is not locked; found by millert@

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 12 12:20:35 2002 UTC (21 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.6: +6 -2 lines
Diff to previous 1.6 (colored)

in the error case, just remove an installed argument replacement, it is not
needed

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 21 15:07:04 2002 UTC (21 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.5: +124 -12 lines
Diff to previous 1.5 (colored)

system call argument rewriting framework via stackgap; okay art@

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:42:15 2002 UTC (21 years, 11 months ago) by art
Branch: UBC
Changes since 1.5: +11 -25 lines
Diff to previous 1.5 (colored)

Sync UBC branch to -current

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 10 21:26:34 2002 UTC (21 years, 11 months ago) by espie
Branch: MAIN
Branch point for: UBC
Changes since 1.4: +10 -10 lines
Diff to previous 1.4 (colored)

more __FUNCTION__ slaughter

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 10 19:15:06 2002 UTC (21 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.3: +15 -1 lines
Diff to previous 1.3 (colored)

new ioctl that reports the current emulation a process uses; needed for
attaching to a running process

Revision 1.3 / (download) - annotate - [select for diffs], Sun May 19 21:44:02 2002 UTC (22 years ago) by provos
Branch: MAIN
Changes since 1.2: +3 -23 lines
Diff to previous 1.2 (colored)

make fsystrace available in systrace.h; keep some more stats.

Revision 1.2 / (download) - annotate - [select for diffs], Sat May 18 00:16:00 2002 UTC (22 years ago) by provos
Branch: MAIN
Changes since 1.1: +12 -8 lines
Diff to previous 1.1 (colored)

when detaching form a process don't forget to remove posted messages.

Revision 1.1 / (download) - annotate - [select for diffs], Thu May 16 16:16:52 2002 UTC (22 years ago) by provos
Branch: MAIN

systrace facility, used to enforce and generate policies for system calls
okay deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.