diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2015-08-26 05:20:07 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2015-08-26 05:20:07 +0000 |
commit | 19c28350e80ec9d7c7aa28f91afd35216e7cc01c (patch) | |
tree | d96b36f5d05a122f2685b66a0463a1551f3ad138 /sys/kern/kern_tame.c | |
parent | cef978ebdb4e317f900661a5bc177214d21e070c (diff) |
Convert paths argument of tame(2) to const char **.
The path will not be modified and this reduces casts. Discussed with many.
ok deraadt@
Diffstat (limited to 'sys/kern/kern_tame.c')
-rw-r--r-- | sys/kern/kern_tame.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c index 666d1e24752..1b5265c6af0 100644 --- a/sys/kern/kern_tame.c +++ b/sys/kern/kern_tame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tame.c,v 1.29 2015/08/25 15:35:44 jsg Exp $ */ +/* $OpenBSD: kern_tame.c,v 1.30 2015/08/26 05:20:06 doug Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -206,7 +206,7 @@ sys_tame(struct proc *p, void *v, register_t *retval) { struct sys_tame_args /* { syscallarg(int) flags; - syscallarg(char **)paths; + syscallarg(const char **)paths; } */ *uap = v; int flags = SCARG(uap, flags); @@ -227,7 +227,7 @@ sys_tame(struct proc *p, void *v, register_t *retval) } if (SCARG(uap, paths)) { - char **u = SCARG(uap, paths), *sp; + const char **u = SCARG(uap, paths), *sp; struct whitepaths *wl; char *cwdpath = NULL, *path; size_t cwdpathlen, cwdlen, len, maxargs = 0; |