summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-08-26 05:20:07 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-08-26 05:20:07 +0000
commit19c28350e80ec9d7c7aa28f91afd35216e7cc01c (patch)
treed96b36f5d05a122f2685b66a0463a1551f3ad138 /sys/kern
parentcef978ebdb4e317f900661a5bc177214d21e070c (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')
-rw-r--r--sys/kern/kern_tame.c6
-rw-r--r--sys/kern/syscalls.master4
2 files changed, 5 insertions, 5 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;
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 3df64cd17c5..5c778538d76 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.156 2015/08/22 20:18:49 deraadt Exp $
+; $OpenBSD: syscalls.master,v 1.157 2015/08/26 05:20:06 doug Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -225,7 +225,7 @@
106 STD { int sys_listen(int s, int backlog); }
107 STD { int sys_chflagsat(int fd, const char *path, \
u_int flags, int atflags); }
-108 STD { int sys_tame(int flags, char **paths); }
+108 STD { int sys_tame(int flags, const char **paths); }
109 STD { int sys_ppoll(struct pollfd *fds, \
u_int nfds, const struct timespec *ts, \
const sigset_t *mask); }