From 370b73adb5336fc7d07d1a58cac43370ea977459 Mon Sep 17 00:00:00 2001 From: jpandre Date: Wed, 7 Nov 2007 10:03:16 +0000 Subject: [PATCH] Fixed check for sticky directory when unlinking --- src/ntfs-3g.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 1109b468..f5bd3bb6 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -1303,10 +1303,14 @@ static int ntfs_fuse_unlink(const char *org_path) stream_name_len = ntfs_fuse_parse_path(org_path, &path, &stream_name); if (stream_name_len < 0) return stream_name_len; - /* JPA deny unlinking if directory is not writable and executable */ + /* + * JPA deny unlinking if directory is not writable + * and executable + * sticky directory to be tested in ntfs_fuse_rm() + */ if (!ntfs_fuse_fill_security_context(&security) || ntfs_allowed_dir_access(&security, path, - S_IEXEC + S_IWRITE + S_ISVTX)) { + S_IEXEC + S_IWRITE)) { if (!stream_name_len) res = ntfs_fuse_rm(path); else