diff options
author | Nikolay Sturm <sturm@cvs.openbsd.org> | 2006-05-02 19:49:06 +0000 |
---|---|---|
committer | Nikolay Sturm <sturm@cvs.openbsd.org> | 2006-05-02 19:49:06 +0000 |
commit | 9838669897d9a5a7abfa74ebb4cca264b3a09457 (patch) | |
tree | 2d9a5d1c8f39eace21b442eaa32689a199baec45 /bin/systrace | |
parent | 0166f8711da31fbc49cf4e6116e24d9ebe4be2aa (diff) |
some type cleanup
with feedback from kettenis
Diffstat (limited to 'bin/systrace')
-rw-r--r-- | bin/systrace/filter.c | 4 | ||||
-rw-r--r-- | bin/systrace/intercept-translate.c | 10 | ||||
-rw-r--r-- | bin/systrace/intercept.h | 6 | ||||
-rw-r--r-- | bin/systrace/openbsd-syscalls.c | 6 | ||||
-rw-r--r-- | bin/systrace/systrace-translate.c | 5 | ||||
-rw-r--r-- | bin/systrace/systrace.c | 5 |
6 files changed, 19 insertions, 17 deletions
diff --git a/bin/systrace/filter.c b/bin/systrace/filter.c index a03d3729147..6d9fcc1c277 100644 --- a/bin/systrace/filter.c +++ b/bin/systrace/filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.c,v 1.31 2006/04/26 20:19:25 sturm Exp $ */ +/* $OpenBSD: filter.c,v 1.32 2006/05/02 19:49:05 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -140,7 +140,7 @@ filter_match(struct intercept_pid *icpid, struct intercept_tlq *tls, int filter_predicate(struct intercept_pid *icpid, struct predicate *pdc) { - int pidnr, pdcnr; + id_t pidnr, pdcnr; int res = 0; if (!pdc->p_flags) diff --git a/bin/systrace/intercept-translate.c b/bin/systrace/intercept-translate.c index 4c6d7cea22e..51736d8535e 100644 --- a/bin/systrace/intercept-translate.c +++ b/bin/systrace/intercept-translate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intercept-translate.c,v 1.11 2004/07/07 07:31:40 marius Exp $ */ +/* $OpenBSD: intercept-translate.c,v 1.12 2006/05/02 19:49:05 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -131,7 +131,7 @@ ic_get_filename(struct intercept_translate *trans, int fd, pid_t pid, void *addr) { char *name; - int len; + size_t len; name = intercept_filename(fd, pid, addr, ICLINK_ALL, NULL); if (name == NULL) @@ -153,7 +153,7 @@ static int ic_get_string(struct intercept_translate *trans, int fd, pid_t pid, void *addr) { char *name; - int len; + size_t len; if (addr == NULL) return (-1); @@ -178,7 +178,7 @@ ic_get_linkname(struct intercept_translate *trans, int fd, pid_t pid, void *addr) { char *name; - int len; + size_t len; name = intercept_filename(fd, pid, addr, ICLINK_NONE, NULL); if (name == NULL) @@ -202,7 +202,7 @@ ic_get_unlinkname(struct intercept_translate *trans, int fd, pid_t pid, void *addr) { char *name; - int len; + size_t len; name = intercept_filename(fd, pid, addr, ICLINK_NOLAST, NULL); if (name == NULL) diff --git a/bin/systrace/intercept.h b/bin/systrace/intercept.h index a470cf20f5b..9c4530b6886 100644 --- a/bin/systrace/intercept.h +++ b/bin/systrace/intercept.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intercept.h,v 1.21 2004/07/07 07:31:40 marius Exp $ */ +/* $OpenBSD: intercept.h,v 1.22 2006/05/02 19:49:05 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -51,7 +51,7 @@ struct intercept_system { int (*restcwd)(int); int (*io)(int, pid_t, int, void *, u_char *, size_t); int (*getarg)(int, void *, int, void **); - int (*answer)(int, pid_t, u_int32_t, short, int, short, + int (*answer)(int, pid_t, u_int16_t, short, int, short, struct elevate *); int (*newpolicy)(int); int (*assignpolicy)(int, pid_t, int); @@ -92,7 +92,7 @@ struct intercept_pid { pid_t pid; pid_t ppid; /* parent pid */ - short policynr; + int policynr; int execve_code; short execve_policy; char *name; /* name of current process image */ diff --git a/bin/systrace/openbsd-syscalls.c b/bin/systrace/openbsd-syscalls.c index f0ec7ac11cf..d2ed8bbede7 100644 --- a/bin/systrace/openbsd-syscalls.c +++ b/bin/systrace/openbsd-syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openbsd-syscalls.c,v 1.29 2006/01/01 11:48:45 sturm Exp $ */ +/* $OpenBSD: openbsd-syscalls.c,v 1.30 2006/05/02 19:49:05 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -138,7 +138,7 @@ static int obsd_syscall_number(const char *, const char *); static short obsd_translate_policy(short); static short obsd_translate_flags(short); static int obsd_translate_errno(int); -static int obsd_answer(int, pid_t, u_int32_t, short, int, short, +static int obsd_answer(int, pid_t, u_int16_t, short, int, short, struct elevate *); static int obsd_newpolicy(int); static int obsd_assignpolicy(int, pid_t, int); @@ -364,7 +364,7 @@ obsd_translate_errno(int nerrno) } static int -obsd_answer(int fd, pid_t pid, u_int32_t seqnr, short policy, int nerrno, +obsd_answer(int fd, pid_t pid, u_int16_t seqnr, short policy, int nerrno, short flags, struct elevate *elevate) { struct systrace_answer ans; diff --git a/bin/systrace/systrace-translate.c b/bin/systrace/systrace-translate.c index 540858dc66a..22d2d7a26d8 100644 --- a/bin/systrace/systrace-translate.c +++ b/bin/systrace/systrace-translate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace-translate.c,v 1.19 2006/03/12 20:56:10 sturm Exp $ */ +/* $OpenBSD: systrace-translate.c,v 1.20 2006/05/02 19:49:05 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -536,7 +536,8 @@ get_argv(struct intercept_translate *trans, int fd, pid_t pid, void *addr) { char *arg; char buf[_POSIX2_LINE_MAX], *p; - int i, off = 0, len; + int i, off = 0; + size_t len; extern struct intercept_system intercept; i = 0; diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c index 28922def61a..442cb900eb2 100644 --- a/bin/systrace/systrace.c +++ b/bin/systrace/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.52 2006/04/26 20:19:25 sturm Exp $ */ +/* $OpenBSD: systrace.c,v 1.53 2006/05/02 19:49:05 sturm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -268,7 +268,8 @@ gen_cb(int fd, pid_t pid, int policynr, const char *name, int code, struct filterq *pflq = NULL; short action = ICPOLICY_PERMIT; short future; - int len, off, dolog = 0; + int off, dolog = 0; + size_t len; if (policynr == -1) goto out; |