Commit 814c6842 authored by Steve French's avatar Steve French Committed by Steve French

[CIFS] Update Kconfig to make CIFS POSIX ACLs dependent on xattrs and

fix related ifdef in fs/cifs/xattr.c

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent ef6fb660
......@@ -1718,12 +1718,22 @@ config CIFS_XATTR
config CIFS_POSIX
bool "CIFS POSIX Extensions (EXPERIMENTAL)"
depends on CIFS
depends on CIFS_XATTR
help
Enabling this option will cause the cifs client to attempt to
negotiate a newer dialect with servers, such as Samba 3.0.5
or later, that optionally can handle more POSIX like (rather
than Windows like) file behavior. If unsure, say N.
than Windows like) file behavior. It also enables
support for POSIX ACLs (getfacl and setfacl) to servers
(such as Samba 3.10 and later) which can negotiate
CIFS POSIX ACL support. If unsure, say N.
config CIFS_EXPERIMENTAL
bool "CIFS Experimental Features (EXPERIMENTAL)
depends on CIFS
help
Enables cifs features under testing. These features
are highly experimental. If unsure, say N.
config NCP_FS
tristate "NCP file system support (to mount NetWare volumes)"
......
......@@ -144,7 +144,7 @@
#define SMBFLG2_KNOWS_EAS cpu_to_le16(2)
#define SMBFLG2_SECURITY_SIGNATURE cpu_to_le16(4)
#define SMBFLG2_IS_LONG_NAME cpu_to_le16(0x40)
#define SMBFLG2_EXT_SEC cpu_to_le16(0x80)
#define SMBFLG2_EXT_SEC cpu_to_le16(0x800)
#define SMBFLG2_DFS cpu_to_le16(0x1000)
#define SMBFLG2_PAGING_IO cpu_to_le16(0x2000)
#define SMBFLG2_ERR_STATUS cpu_to_le16(0x4000)
......
......@@ -145,17 +145,23 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name,
temp = strncmp(ea_name,POSIX_ACL_XATTR_ACCESS,
strlen(POSIX_ACL_XATTR_ACCESS));
if (temp == 0) {
cFYI(1,("set POSIX ACL not supported yet"));
#ifdef CONFIG_CIFS_POSIX
rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,ea_value,
(const int)value_size, ACL_TYPE_ACCESS,
cifs_sb->local_nls);
cFYI(1,("set POSIX ACL rc %d",rc)); /* BB removeme BB */
cFYI(1,("set POSIX ACL rc %d",rc));
#else
cFYI(1,("set POSIX ACL not supported"));
#endif
} else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) {
cFYI(1,("set default POSIX ACL not supported yet"));
#ifdef CONFIG_CIFS_POSIX
rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,ea_value,
(const int)value_size, ACL_TYPE_DEFAULT,
cifs_sb->local_nls);
cFYI(1,("set POSIX default ACL rc %d",rc)); /* BB removeme BB */
cFYI(1,("set POSIX default ACL rc %d",rc));
#else
cFYI(1,("set default POSIX ACL not supported"));
#endif
} else {
cFYI(1,("illegal xattr request %s (only user namespace supported)",ea_name));
/* BB what if no namespace prefix? */
......@@ -189,9 +195,8 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name,
sb = direntry->d_inode->i_sb;
if(sb == NULL)
return -EIO;
xid = GetXid();
cFYI(1,("getxattr %s with size %d",ea_name,buf_size));
xid = GetXid();
cifs_sb = CIFS_SB(sb);
pTcon = cifs_sb->tcon;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment