Skip to contentSkip to conversation

cifs: Handle extended attribute name cifs_acl to generate cifs acl blob (try #4)

PATCH New [email protected] 1 participant 1 message Nov 27, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: Handle extended attribute name cifs_acl to generate cifs acl blob (try #4)

From: Shirish Pargaonkar <[email protected]>

Add extended attribute name system.cifs_acl

Get/generate cifs/ntfs acl blob and hand over to the invoker however it wants to parse/process it under experimental configurable option CIFS_ACL.

Do not get CIFS/NTFS ACL for xattr for attribute system.posix_acl_access

---
 fs/cifs/Kconfig     |    7 ++++++
 fs/cifs/cifsacl.c   |    2 +-
 fs/cifs/cifsproto.h |    2 +
 fs/cifs/xattr.c     |   55 +++++++++++++++++++++++++++-----------------------
 4 files changed, 40 insertions(+), 26 deletions(-)
fs/cifs/Kconfig +7 -0
index 3bdbfb0..ee45648 100644
@@ -144,6 +144,13 @@ config CIFS_FSCACHE
 	    to be cached locally on disk through the general filesystem cache
 	    manager. If unsure, say N.
 
+config CIFS_ACL
+	  bool "Provide CIFS ACL support (EXPERIMENTAL)"
+	  depends on EXPERIMENTAL && CIFS_XATTR
+	  help
+	    Allows to fetch CIFS/NTFS ACL from the server.  The DACL blob
+	    is handed over to the application/caller.
+
 config CIFS_EXPERIMENTAL
 	  bool "CIFS Experimental Features (EXPERIMENTAL)"
 	  depends on CIFS && EXPERIMENTAL
fs/cifs/cifsacl.c +1 -1
index c15e3ee..c6ebea0 100644
@@ -608,7 +608,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
 }
 
 /* Retrieve an ACL from the server */
-static struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *cifs_sb,
+struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *cifs_sb,
 				      struct inode *inode, const char *path,
 				      u32 *pacllen)
 {
fs/cifs/cifsproto.h +2 -0
index b498731..db961dc 100644
@@ -134,6 +134,8 @@ extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb,
 			      struct cifs_fattr *fattr, struct inode *inode,
 			      const char *path, const __u16 *pfid);
 extern int mode_to_cifs_acl(struct inode *inode, const char *path, __u64);
+extern struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *, struct inode *,
+					const char *, u32 *);
 
 extern int cifs_mount(struct super_block *, struct cifs_sb_info *, char *,
 			const char *);
fs/cifs/xattr.c +30 -25

77 lines not on this page · raw message

Signature · 1 line
1.6.0.2