diff options
author | Michael Scherer <misc@zarb.org> | 2015-03-02 16:13:40 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-03 04:49:24 -0800 |
commit | a5b02c0d71c7952ebbb24b1075c216cc76761956 (patch) | |
tree | 31fb6102a95838683b36e650845d2036f3e25471 /tests | |
parent | 33214ef83684c3b025c773931c071f8af030242b (diff) |
tests: prevent deleting /etc/passwd
This happened twice last week on our gluster jenkins slave,
http://www.gluster.org/pipermail/gluster-infra/2015-March/000818.html
Change-Id: I40ff0e143256fb1b33ee4ab6dd0850727f9e2135
BUG: 1163543
Signed-off-by: Michael Scherer <misc@zarb.org>
Reviewed-on: http://review.gluster.org/9785
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/gfid-access.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/basic/gfid-access.t b/tests/basic/gfid-access.t index f83eb6d47ee..19b6564e676 100644 --- a/tests/basic/gfid-access.t +++ b/tests/basic/gfid-access.t @@ -48,11 +48,13 @@ TEST ! ln $M0/.gfid $M0/hlink TEST ! mknod $M0/.gfid b 0 0 #Test that first level directory/file creations inside .gfid are not allowed. +tmpfile=$(mktemp) TEST ! mkdir $M0/.gfid/a TEST ! touch $M0/.gfid/a -TEST ! mv /etc/passwd $M0/.gfid +TEST ! mv $tmpfile $M0/.gfid TEST ! mv $M0/a $M0/.gfid TEST ! mknod $M0/.gfid/b b 0 0 +rm -f $tmpfile #Operations on File TEST setfattr -n trusted.abc -v abc $M0/b |