From a453456d6b63c079c3bb5bab72c87fbafb57af49 Mon Sep 17 00:00:00 2001 From: jpandre Date: Sat, 6 Sep 2008 15:00:24 +0000 Subject: [PATCH] Fixed building a security context for truncate() and create() when Posix ACL are disabled --- src/ntfs-3g.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 740507e1..bbdd33e4 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -898,6 +898,7 @@ static int ntfs_fuse_trunc(const char *org_path, off_t size, BOOL chkwrite) na = ntfs_attr_open(ni, AT_DATA, stream_name, stream_name_len); if (!na) goto exit; +#if POSIXACLS /* * JPA deny truncation if cannot search in parent directory * or cannot write to file (already checked for ftruncate()) @@ -909,6 +910,7 @@ static int ntfs_fuse_trunc(const char *org_path, off_t size, BOOL chkwrite) errno = EACCES; goto exit; } +#endif if (ntfs_attr_truncate(na, size)) goto exit; @@ -1121,6 +1123,8 @@ static int ntfs_fuse_create(const char *org_path, dev_t typemode, dev_t dev, if (!ntfs_fuse_fill_security_context(&security) || ntfs_allowed_access(&security,dir_path, dir_ni,S_IWRITE + S_IEXEC)) { +#else + ntfs_fuse_fill_security_context(&security); #endif /* ! JPA ! did not find where to get umask from ! */ if (S_ISDIR(type))