Fixed permissions for symlinks when there is no user mapping

This commit is contained in:
jpandre 2009-05-17 19:59:26 +00:00
parent c453008681
commit 220883485a

View File

@ -614,13 +614,12 @@ static int ntfs_fuse_getattr(const char *org_path, struct stat *stbuf)
if (withusermapping) {
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;
} else {
stbuf->st_uid = ctx->uid;
stbuf->st_gid = ctx->gid;
}
if (S_ISLNK(stbuf->st_mode))
stbuf->st_mode |= 0777;
stbuf->st_ino = ni->mft_no;
stbuf->st_atime = ni->last_access_time;
stbuf->st_ctime = ni->last_mft_change_time;