Module Name: src
Committed By: pooka
Date: Sat Mar 5 07:41:12 UTC 2011
Modified Files:
src/tests/fs/tmpfs: t_create.sh t_mkdir.sh
Log Message:
chown the workdir to unpriv user instead of chmod 711. Otherwise,
if your (root's) login shell is {t,}csh, su -m gets outoutsmarted.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/tmpfs/t_create.sh \
src/tests/fs/tmpfs/t_mkdir.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/fs/tmpfs/t_create.sh
diff -u src/tests/fs/tmpfs/t_create.sh:1.7 src/tests/fs/tmpfs/t_create.sh:1.8
--- src/tests/fs/tmpfs/t_create.sh:1.7 Tue Nov 9 13:01:33 2010
+++ src/tests/fs/tmpfs/t_create.sh Sat Mar 5 07:41:11 2011
@@ -1,4 +1,4 @@
-# $NetBSD: t_create.sh,v 1.7 2010/11/09 13:01:33 jmmv Exp $
+# $NetBSD: t_create.sh,v 1.8 2011/03/05 07:41:11 pooka Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -52,8 +52,9 @@
atf_set "require.user" "root"
}
attrs_body() {
+ user=$(atf_config_get unprivileged-user)
# Allow the unprivileged user to access the work directory.
- chmod 711 .
+ chown ${user} .
test_mount
@@ -70,8 +71,6 @@
test ${st_gid} -eq ${dst_gid} || atf_fail "Incorrect gid"
test ${st_mode} = 0100644 || atf_fail "Incorrect mode"
- user=$(atf_config_get unprivileged-user)
-
atf_check -s eq:0 -o empty -e empty mkdir b c
atf_check -s eq:0 -o empty -e empty chown ${user}:0 b
Index: src/tests/fs/tmpfs/t_mkdir.sh
diff -u src/tests/fs/tmpfs/t_mkdir.sh:1.7 src/tests/fs/tmpfs/t_mkdir.sh:1.8
--- src/tests/fs/tmpfs/t_mkdir.sh:1.7 Mon Nov 8 15:25:50 2010
+++ src/tests/fs/tmpfs/t_mkdir.sh Sat Mar 5 07:41:11 2011
@@ -1,4 +1,4 @@
-# $NetBSD: t_mkdir.sh,v 1.7 2010/11/08 15:25:50 pooka Exp $
+# $NetBSD: t_mkdir.sh,v 1.8 2011/03/05 07:41:11 pooka Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -92,13 +92,12 @@
atf_set "require.user" "root"
}
attrs_body() {
+ user=$(atf_config_get unprivileged-user)
# Allow the unprivileged user to access the work directory.
- chmod 711 .
+ chown ${user} .
test_mount
- user=$(atf_config_get unprivileged-user)
-
atf_check -s eq:0 -o empty -e empty mkdir b c
atf_check -s eq:0 -o empty -e empty chown ${user}:0 b