Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern fill_cwd() Drop GETCWD_CHECK_ACCESS
details: https://anonhg.NetBSD.org/src/rev/dedf0a457121
branches: trunk
changeset: 999415:dedf0a457121
user: kamil <kamil%NetBSD.org@localhost>
date: Sat Jun 01 00:19:43 2019 +0000
description:
fill_cwd() Drop GETCWD_CHECK_ACCESS
This additional check is not needed and actually prevents from checking
the path. This follows the protection rules of /proc/*/cwd.
diffstat:
sys/kern/kern_proc.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 09fd5bf39946 -r dedf0a457121 sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c Fri May 31 23:19:38 2019 +0000
+++ b/sys/kern/kern_proc.c Sat Jun 01 00:19:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_proc.c,v 1.230 2019/05/31 23:19:38 kamil Exp $ */
+/* $NetBSD: kern_proc.c,v 1.231 2019/06/01 00:19:43 kamil Exp $ */
/*-
* Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.230 2019/05/31 23:19:38 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.231 2019/06/01 00:19:43 kamil Exp $");
#ifdef _KERNEL_OPT
#include "opt_kstack.h"
@@ -2594,7 +2594,6 @@
struct cwdinfo *cwdi;
struct vnode *vp;
size_t len, lenused;
- const int flags = GETCWD_CHECK_ACCESS;
if ((error = proc_find_locked(l, &p, pid)) != 0)
return error;
@@ -2615,7 +2614,7 @@
cwdi = p->p_cwdi;
rw_enter(&cwdi->cwdi_lock, RW_READER);
vp = cwdi->cwdi_cdir;
- error = getcwd_common(vp, NULL, &bp, path, len/2, flags, l);
+ error = getcwd_common(vp, NULL, &bp, path, len/2, 0, l);
rw_exit(&cwdi->cwdi_lock);
if (error)
Home |
Main Index |
Thread Index |
Old Index