From efe1ffec7a97084d74ff2a4431f8d10f6b26254e Mon Sep 17 00:00:00 2001 From: jpandre Date: Mon, 12 Nov 2007 13:31:54 +0000 Subject: [PATCH] Fixed apparent protection mode for symbolic links --- src/ntfs-3g.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 96ec281e..3eac4392 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -436,9 +436,12 @@ static int ntfs_fuse_getattr(const char *org_path, struct stat *stbuf) if (ntfs_fuse_fill_security_context(&security)) { if (ntfs_get_owner_mode(&security,path,ni,stbuf) < 0) set_fuse_error(&res); + else + if (S_ISLNK(stbuf->st_mode)) + stbuf->st_mode |= (0777 & ~ctx->fmask); } else { - stbuf->st_uid = ctx->uid; - stbuf->st_gid = ctx->gid; + stbuf->st_uid = ctx->uid; + stbuf->st_gid = ctx->gid; } stbuf->st_ino = ni->mft_no; stbuf->st_atime = ni->last_access_time;