aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-08-16 09:05:29 -0400
committerMike Frysinger <vapier@gentoo.org>2010-08-16 09:05:29 -0400
commit868378db6253d7f8f39889e762f029587b6bbe3b (patch)
treeb0cebf16ef5bf5c4fe56122b1367ec7466164fed /libsandbox
parenttests: addpredict / by default to match portage (diff)
downloadsandbox-868378db6253d7f8f39889e762f029587b6bbe3b.tar.gz
sandbox-868378db6253d7f8f39889e762f029587b6bbe3b.tar.bz2
sandbox-868378db6253d7f8f39889e762f029587b6bbe3b.zip
libsandbox: mark rmdir as working on symlinks
Doing rmdir(symlink) does not remove the dir the symlink points to, but will operate on the symlink itself. While it will always fail (since it is a link and not a dir), that isn't something we need worry about. Just need to avoid doing permission checking on the target of the symlink. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r--libsandbox/libsandbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index f3d98dd..e5619dc 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -648,6 +648,7 @@ static bool symlink_func(int sb_nr, int flags, const char *abs_path)
sb_nr == SB_NR_LCHOWN ||
sb_nr == SB_NR_REMOVE ||
sb_nr == SB_NR_RENAME ||
+ sb_nr == SB_NR_RMDIR ||
sb_nr == SB_NR_SYMLINK))
{
/* These funcs sometimes operate on symlinks */