diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-01 18:26:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-01 18:26:20 +0000 |
commit | 1a4edecc538cb63473c3dc08ec8ff7c4cf2fd081 (patch) | |
tree | b77c654b8c6d50c9d00b9d1840270083dbd6b68b /sys/kern | |
parent | b30cb16b80dd0f40005e804685a7d7755d9cfd4e (diff) |
the special check logic for /usr/share/nls/../libc.cat became failure
to return failure. open() of these paths should succeed to satisfy
strerror() and friends.
ok semarie
Diffstat (limited to 'sys/kern')
-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 0e07060c8d8..42fb740e761 100644 --- a/sys/kern/kern_tame.c +++ b/sys/kern/kern_tame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tame.c,v 1.36 2015/09/01 09:19:21 semarie Exp $ */ +/* $OpenBSD: kern_tame.c,v 1.37 2015/09/01 18:26:19 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -481,12 +481,12 @@ tame_namei(struct proc *p, char *origpath) strcmp(path, "/etc/localtime") == 0) return (0); - /* /usr/share/nls/../libc.cat returns EPERM, for strerror(3). */ + /* /usr/share/nls/../libc.cat has to succeed for strerror(3). */ if ((p->p_tamenote == TMN_RPATH) && strncmp(path, "/usr/share/nls/", sizeof("/usr/share/nls/") - 1) == 0 && strcmp(path + strlen(path) - 9, "/libc.cat") == 0) - return (EPERM); + return (0); break; case SYS_readlink: /* Allow /etc/malloc.conf for malloc(3). */ |