public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] CIFS: remove local xattr definitions
@ 2011-08-11 19:14 Mimi Zohar
  2011-08-11 19:29 ` Eric Paris
  0 siblings, 1 reply; 9+ messages in thread
From: Mimi Zohar @ 2011-08-11 19:14 UTC (permalink / raw)
  To: linux-security-module-u79uwXL29TY76Z2rM5mHXA
  Cc: Mimi Zohar, linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, James Morris,
	Stephen Rothwell, Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	David Safford, Mimi Zohar

Local XATTR_TRUSTED_PREFIX_LEN and XATTR_SECURITY_PREFIX_LEN definitions
redefined ones in 'linux/xattr.h'. This was caused by commit 9d8f13ba3f48
("security: new security_inode_init_security API adds function callback")
including 'linux/xattr.h' in 'linux/security.h'.

In file included from include/linux/security.h:39,
                 from include/net/sock.h:54,
                 from fs/cifs/cifspdu.h:25,
                 from fs/cifs/xattr.c:26:

This patch removes the local definitions.

Reported-by: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public•gmane.org>
Signed-off-by: Mimi Zohar <zohar-r/Jw6+rmf7HQT0dZR+AlfA@public•gmane.org>
---
 fs/cifs/xattr.c |   39 +++++++++++++++++----------------------
 1 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 2a22fb2..7f23f3c 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -31,16 +31,8 @@
 #define MAX_EA_VALUE_SIZE 65535
 #define CIFS_XATTR_DOS_ATTRIB "user.DosAttrib"
 #define CIFS_XATTR_CIFS_ACL "system.cifs_acl"
-#define CIFS_XATTR_USER_PREFIX "user."
-#define CIFS_XATTR_SYSTEM_PREFIX "system."
-#define CIFS_XATTR_OS2_PREFIX "os2."
-#define CIFS_XATTR_SECURITY_PREFIX "security."
-#define CIFS_XATTR_TRUSTED_PREFIX "trusted."
-#define XATTR_TRUSTED_PREFIX_LEN  8
-#define XATTR_SECURITY_PREFIX_LEN 9
-/* BB need to add server (Samba e.g) support for security and trusted prefix */
-
 
+/* BB need to add server (Samba e.g) support for security and trusted prefix */
 
 int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 {
@@ -76,8 +68,8 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 	}
 	if (ea_name == NULL) {
 		cFYI(1, "Null xattr names not supported");
-	} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5)
-		&& (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) {
+	} else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
+		&& (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))) {
 		cFYI(1,
 		     "illegal xattr request %s (only user namespace supported)",
 		     ea_name);
@@ -88,7 +80,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto remove_ea_exit;
 
-		ea_name += 5; /* skip past user. prefix */
+		ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
 			(__u16)0, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -149,21 +141,23 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
 
 	if (ea_name == NULL) {
 		cFYI(1, "Null xattr names not supported");
-	} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
+	} else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
+		   == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto set_ea_exit;
 		if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0)
 			cFYI(1, "attempt to set cifs inode metadata");
 
-		ea_name += 5; /* skip past user. prefix */
+		ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
 			(__u16)value_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
-	} else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
+	} else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)
+		   == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto set_ea_exit;
 
-		ea_name += 4; /* skip past os2. prefix */
+		ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
 			(__u16)value_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -269,7 +263,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 	/* return alt name if available as pseudo attr */
 	if (ea_name == NULL) {
 		cFYI(1, "Null xattr names not supported");
-	} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
+	} else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
+		   == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto get_ea_exit;
 
@@ -277,15 +272,15 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 			cFYI(1, "attempt to query cifs inode metadata");
 			/* revalidate/getattr then populate from inode */
 		} /* BB add else when above is implemented */
-		ea_name += 5; /* skip past user. prefix */
+		ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
 		rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
 			buf_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
-	} else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
+	} else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto get_ea_exit;
 
-		ea_name += 4; /* skip past os2. prefix */
+		ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
 		rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
 			buf_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -339,10 +334,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 		cFYI(1, "Query CIFS ACL not supported yet");
 #endif /* CONFIG_CIFS_ACL */
 	} else if (strncmp(ea_name,
-		  CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
+		  XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
 		cFYI(1, "Trusted xattr namespace not supported yet");
 	} else if (strncmp(ea_name,
-		  CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
+		  XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
 		cFYI(1, "Security xattr namespace not supported yet");
 	} else
 		cFYI(1,
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
  2011-08-11 19:14 [PATCH] CIFS: remove local xattr definitions Mimi Zohar
@ 2011-08-11 19:29 ` Eric Paris
  2011-08-11 20:00   ` Mimi Zohar
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Paris @ 2011-08-11 19:29 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-security-module, linux-next, linux-kernel, James Morris,
	Stephen Rothwell, Steve French, linux-cifs, David Safford,
	Mimi Zohar

Not that this patch is wrong, but shouldn't cifs include xattr.h
directly rather than rely on such an obscure indirect callchain as
well?

-Eric

On Thu, Aug 11, 2011 at 3:14 PM, Mimi Zohar <zohar@linux•vnet.ibm.com> wrote:
> Local XATTR_TRUSTED_PREFIX_LEN and XATTR_SECURITY_PREFIX_LEN definitions
> redefined ones in 'linux/xattr.h'. This was caused by commit 9d8f13ba3f48
> ("security: new security_inode_init_security API adds function callback")
> including 'linux/xattr.h' in 'linux/security.h'.
>
> In file included from include/linux/security.h:39,
>                 from include/net/sock.h:54,
>                 from fs/cifs/cifspdu.h:25,
>                 from fs/cifs/xattr.c:26:
>
> This patch removes the local definitions.
>
> Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
> Signed-off-by: Mimi Zohar <zohar@us•ibm.com>
> ---
>  fs/cifs/xattr.c |   39 +++++++++++++++++----------------------
>  1 files changed, 17 insertions(+), 22 deletions(-)
>
> diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
> index 2a22fb2..7f23f3c 100644
> --- a/fs/cifs/xattr.c
> +++ b/fs/cifs/xattr.c
> @@ -31,16 +31,8 @@
>  #define MAX_EA_VALUE_SIZE 65535
>  #define CIFS_XATTR_DOS_ATTRIB "user.DosAttrib"
>  #define CIFS_XATTR_CIFS_ACL "system.cifs_acl"
> -#define CIFS_XATTR_USER_PREFIX "user."
> -#define CIFS_XATTR_SYSTEM_PREFIX "system."
> -#define CIFS_XATTR_OS2_PREFIX "os2."
> -#define CIFS_XATTR_SECURITY_PREFIX "security."
> -#define CIFS_XATTR_TRUSTED_PREFIX "trusted."
> -#define XATTR_TRUSTED_PREFIX_LEN  8
> -#define XATTR_SECURITY_PREFIX_LEN 9
> -/* BB need to add server (Samba e.g) support for security and trusted prefix */
> -
>
> +/* BB need to add server (Samba e.g) support for security and trusted prefix */
>
>  int cifs_removexattr(struct dentry *direntry, const char *ea_name)
>  {
> @@ -76,8 +68,8 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
>        }
>        if (ea_name == NULL) {
>                cFYI(1, "Null xattr names not supported");
> -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5)
> -               && (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) {
> +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> +               && (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))) {
>                cFYI(1,
>                     "illegal xattr request %s (only user namespace supported)",
>                     ea_name);
> @@ -88,7 +80,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto remove_ea_exit;
>
> -               ea_name += 5; /* skip past user. prefix */
> +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
>                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
>                        (__u16)0, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> @@ -149,21 +141,23 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
>
>        if (ea_name == NULL) {
>                cFYI(1, "Null xattr names not supported");
> -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
> +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> +                  == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto set_ea_exit;
>                if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0)
>                        cFYI(1, "attempt to set cifs inode metadata");
>
> -               ea_name += 5; /* skip past user. prefix */
> +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
>                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
>                        (__u16)value_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> -       } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
> +       } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)
> +                  == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto set_ea_exit;
>
> -               ea_name += 4; /* skip past os2. prefix */
> +               ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
>                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
>                        (__u16)value_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> @@ -269,7 +263,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>        /* return alt name if available as pseudo attr */
>        if (ea_name == NULL) {
>                cFYI(1, "Null xattr names not supported");
> -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
> +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> +                  == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto get_ea_exit;
>
> @@ -277,15 +272,15 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>                        cFYI(1, "attempt to query cifs inode metadata");
>                        /* revalidate/getattr then populate from inode */
>                } /* BB add else when above is implemented */
> -               ea_name += 5; /* skip past user. prefix */
> +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
>                rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
>                        buf_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> -       } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
> +       } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto get_ea_exit;
>
> -               ea_name += 4; /* skip past os2. prefix */
> +               ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
>                rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
>                        buf_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> @@ -339,10 +334,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>                cFYI(1, "Query CIFS ACL not supported yet");
>  #endif /* CONFIG_CIFS_ACL */
>        } else if (strncmp(ea_name,
> -                 CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
> +                 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
>                cFYI(1, "Trusted xattr namespace not supported yet");
>        } else if (strncmp(ea_name,
> -                 CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
> +                 XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
>                cFYI(1, "Security xattr namespace not supported yet");
>        } else
>                cFYI(1,
> --
> 1.7.3.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo@vger•kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
  2011-08-11 19:29 ` Eric Paris
@ 2011-08-11 20:00   ` Mimi Zohar
  2011-08-11 20:17     ` Steve French
  0 siblings, 1 reply; 9+ messages in thread
From: Mimi Zohar @ 2011-08-11 20:00 UTC (permalink / raw)
  To: Eric Paris
  Cc: linux-security-module, linux-next, linux-kernel, James Morris,
	Stephen Rothwell, Steve French, linux-cifs, David Safford,
	Mimi Zohar

On Thu, 2011-08-11 at 15:29 -0400, Eric Paris wrote:
> Not that this patch is wrong, but shouldn't cifs include xattr.h
> directly rather than rely on such an obscure indirect callchain as
> well?
> 
> -Eric

True, updated below.

thanks,

Mimi

---
Local XATTR_TRUSTED_PREFIX_LEN and XATTR_SECURITY_PREFIX_LEN definitions
redefined ones in 'linux/xattr.h'. This was caused by commit 9d8f13ba3f48
("security: new security_inode_init_security API adds function callback")
including 'linux/xattr.h' in 'linux/security.h'.

In file included from include/linux/security.h:39,
                 from include/net/sock.h:54,
                 from fs/cifs/cifspdu.h:25,
                 from fs/cifs/xattr.c:26:

This patch removes the local definitions.

Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
Signed-off-by: Mimi Zohar <zohar@us•ibm.com>
---
 fs/cifs/xattr.c |   40 ++++++++++++++++++----------------------
 1 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 2a22fb2..c323088 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -22,6 +22,7 @@
 #include <linux/fs.h>
 #include <linux/posix_acl_xattr.h>
 #include <linux/slab.h>
+#include <linux/xattr.h>
 #include "cifsfs.h"
 #include "cifspdu.h"
 #include "cifsglob.h"
@@ -31,16 +32,8 @@
 #define MAX_EA_VALUE_SIZE 65535
 #define CIFS_XATTR_DOS_ATTRIB "user.DosAttrib"
 #define CIFS_XATTR_CIFS_ACL "system.cifs_acl"
-#define CIFS_XATTR_USER_PREFIX "user."
-#define CIFS_XATTR_SYSTEM_PREFIX "system."
-#define CIFS_XATTR_OS2_PREFIX "os2."
-#define CIFS_XATTR_SECURITY_PREFIX "security."
-#define CIFS_XATTR_TRUSTED_PREFIX "trusted."
-#define XATTR_TRUSTED_PREFIX_LEN  8
-#define XATTR_SECURITY_PREFIX_LEN 9
-/* BB need to add server (Samba e.g) support for security and trusted prefix */
-
 
+/* BB need to add server (Samba e.g) support for security and trusted prefix */
 
 int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 {
@@ -76,8 +69,8 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 	}
 	if (ea_name == NULL) {
 		cFYI(1, "Null xattr names not supported");
-	} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5)
-		&& (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) {
+	} else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
+		&& (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))) {
 		cFYI(1,
 		     "illegal xattr request %s (only user namespace supported)",
 		     ea_name);
@@ -88,7 +81,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto remove_ea_exit;
 
-		ea_name += 5; /* skip past user. prefix */
+		ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
 			(__u16)0, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -149,21 +142,23 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
 
 	if (ea_name == NULL) {
 		cFYI(1, "Null xattr names not supported");
-	} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
+	} else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
+		   == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto set_ea_exit;
 		if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0)
 			cFYI(1, "attempt to set cifs inode metadata");
 
-		ea_name += 5; /* skip past user. prefix */
+		ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
 			(__u16)value_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
-	} else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
+	} else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)
+		   == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto set_ea_exit;
 
-		ea_name += 4; /* skip past os2. prefix */
+		ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
 			(__u16)value_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -269,7 +264,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 	/* return alt name if available as pseudo attr */
 	if (ea_name == NULL) {
 		cFYI(1, "Null xattr names not supported");
-	} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
+	} else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
+		   == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto get_ea_exit;
 
@@ -277,15 +273,15 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 			cFYI(1, "attempt to query cifs inode metadata");
 			/* revalidate/getattr then populate from inode */
 		} /* BB add else when above is implemented */
-		ea_name += 5; /* skip past user. prefix */
+		ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
 		rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
 			buf_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
-	} else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
+	} else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto get_ea_exit;
 
-		ea_name += 4; /* skip past os2. prefix */
+		ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
 		rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
 			buf_size, cifs_sb->local_nls,
 			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -339,10 +335,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 		cFYI(1, "Query CIFS ACL not supported yet");
 #endif /* CONFIG_CIFS_ACL */
 	} else if (strncmp(ea_name,
-		  CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
+		  XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
 		cFYI(1, "Trusted xattr namespace not supported yet");
 	} else if (strncmp(ea_name,
-		  CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
+		  XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
 		cFYI(1, "Security xattr namespace not supported yet");
 	} else
 		cFYI(1,
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
  2011-08-11 20:00   ` Mimi Zohar
@ 2011-08-11 20:17     ` Steve French
       [not found]       ` <CAH2r5muSOM=haAXHg+ys05vgJ30m94g_NQz-Y2AgMDkmV1dbiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Steve French @ 2011-08-11 20:17 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: Eric Paris, linux-security-module, linux-next, linux-kernel,
	James Morris, Stephen Rothwell, linux-cifs, David Safford,
	Mimi Zohar

makes sense - do we want this going through the cifs tree or as part
of the xattr change mentioned below.

On Thu, Aug 11, 2011 at 3:00 PM, Mimi Zohar <zohar@linux•vnet.ibm.com> wrote:
> On Thu, 2011-08-11 at 15:29 -0400, Eric Paris wrote:
>> Not that this patch is wrong, but shouldn't cifs include xattr.h
>> directly rather than rely on such an obscure indirect callchain as
>> well?
>>
>> -Eric
>
> True, updated below.
>
> thanks,
>
> Mimi
>
> ---
> Local XATTR_TRUSTED_PREFIX_LEN and XATTR_SECURITY_PREFIX_LEN definitions
> redefined ones in 'linux/xattr.h'. This was caused by commit 9d8f13ba3f48
> ("security: new security_inode_init_security API adds function callback")
> including 'linux/xattr.h' in 'linux/security.h'.
>
> In file included from include/linux/security.h:39,
>                 from include/net/sock.h:54,
>                 from fs/cifs/cifspdu.h:25,
>                 from fs/cifs/xattr.c:26:
>
> This patch removes the local definitions.
>
> Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
> Signed-off-by: Mimi Zohar <zohar@us•ibm.com>
> ---
>  fs/cifs/xattr.c |   40 ++++++++++++++++++----------------------
>  1 files changed, 18 insertions(+), 22 deletions(-)
>
> diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
> index 2a22fb2..c323088 100644
> --- a/fs/cifs/xattr.c
> +++ b/fs/cifs/xattr.c
> @@ -22,6 +22,7 @@
>  #include <linux/fs.h>
>  #include <linux/posix_acl_xattr.h>
>  #include <linux/slab.h>
> +#include <linux/xattr.h>
>  #include "cifsfs.h"
>  #include "cifspdu.h"
>  #include "cifsglob.h"
> @@ -31,16 +32,8 @@
>  #define MAX_EA_VALUE_SIZE 65535
>  #define CIFS_XATTR_DOS_ATTRIB "user.DosAttrib"
>  #define CIFS_XATTR_CIFS_ACL "system.cifs_acl"
> -#define CIFS_XATTR_USER_PREFIX "user."
> -#define CIFS_XATTR_SYSTEM_PREFIX "system."
> -#define CIFS_XATTR_OS2_PREFIX "os2."
> -#define CIFS_XATTR_SECURITY_PREFIX "security."
> -#define CIFS_XATTR_TRUSTED_PREFIX "trusted."
> -#define XATTR_TRUSTED_PREFIX_LEN  8
> -#define XATTR_SECURITY_PREFIX_LEN 9
> -/* BB need to add server (Samba e.g) support for security and trusted prefix */
> -
>
> +/* BB need to add server (Samba e.g) support for security and trusted prefix */
>
>  int cifs_removexattr(struct dentry *direntry, const char *ea_name)
>  {
> @@ -76,8 +69,8 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
>        }
>        if (ea_name == NULL) {
>                cFYI(1, "Null xattr names not supported");
> -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5)
> -               && (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) {
> +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> +               && (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))) {
>                cFYI(1,
>                     "illegal xattr request %s (only user namespace supported)",
>                     ea_name);
> @@ -88,7 +81,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto remove_ea_exit;
>
> -               ea_name += 5; /* skip past user. prefix */
> +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
>                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
>                        (__u16)0, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> @@ -149,21 +142,23 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
>
>        if (ea_name == NULL) {
>                cFYI(1, "Null xattr names not supported");
> -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
> +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> +                  == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto set_ea_exit;
>                if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0)
>                        cFYI(1, "attempt to set cifs inode metadata");
>
> -               ea_name += 5; /* skip past user. prefix */
> +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
>                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
>                        (__u16)value_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> -       } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
> +       } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)
> +                  == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto set_ea_exit;
>
> -               ea_name += 4; /* skip past os2. prefix */
> +               ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
>                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
>                        (__u16)value_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> @@ -269,7 +264,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>        /* return alt name if available as pseudo attr */
>        if (ea_name == NULL) {
>                cFYI(1, "Null xattr names not supported");
> -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
> +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> +                  == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto get_ea_exit;
>
> @@ -277,15 +273,15 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>                        cFYI(1, "attempt to query cifs inode metadata");
>                        /* revalidate/getattr then populate from inode */
>                } /* BB add else when above is implemented */
> -               ea_name += 5; /* skip past user. prefix */
> +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
>                rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
>                        buf_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> -       } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
> +       } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) {
>                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
>                        goto get_ea_exit;
>
> -               ea_name += 4; /* skip past os2. prefix */
> +               ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
>                rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
>                        buf_size, cifs_sb->local_nls,
>                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> @@ -339,10 +335,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>                cFYI(1, "Query CIFS ACL not supported yet");
>  #endif /* CONFIG_CIFS_ACL */
>        } else if (strncmp(ea_name,
> -                 CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
> +                 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
>                cFYI(1, "Trusted xattr namespace not supported yet");
>        } else if (strncmp(ea_name,
> -                 CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
> +                 XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
>                cFYI(1, "Security xattr namespace not supported yet");
>        } else
>                cFYI(1,
> --
> 1.7.3.4
>
>



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
       [not found]       ` <CAH2r5muSOM=haAXHg+ys05vgJ30m94g_NQz-Y2AgMDkmV1dbiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-08-12  0:48         ` James Morris
  2011-08-12  1:49           ` Stephen Rothwell
  0 siblings, 1 reply; 9+ messages in thread
From: James Morris @ 2011-08-12  0:48 UTC (permalink / raw)
  To: Steve French
  Cc: Mimi Zohar, Eric Paris,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Stephen Rothwell,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA, David Safford, Mimi Zohar

[-- Attachment #1: Type: TEXT/PLAIN, Size: 8285 bytes --]

On Thu, 11 Aug 2011, Steve French wrote:

> makes sense - do we want this going through the cifs tree or as part
> of the xattr change mentioned below.

Should be fine to go into the CIFS tree, as long as that is in -next.


> 
> On Thu, Aug 11, 2011 at 3:00 PM, Mimi Zohar <zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public•gmane.org> wrote:
> > On Thu, 2011-08-11 at 15:29 -0400, Eric Paris wrote:
> >> Not that this patch is wrong, but shouldn't cifs include xattr.h
> >> directly rather than rely on such an obscure indirect callchain as
> >> well?
> >>
> >> -Eric
> >
> > True, updated below.
> >
> > thanks,
> >
> > Mimi
> >
> > ---
> > Local XATTR_TRUSTED_PREFIX_LEN and XATTR_SECURITY_PREFIX_LEN definitions
> > redefined ones in 'linux/xattr.h'. This was caused by commit 9d8f13ba3f48
> > ("security: new security_inode_init_security API adds function callback")
> > including 'linux/xattr.h' in 'linux/security.h'.
> >
> > In file included from include/linux/security.h:39,
> >                 from include/net/sock.h:54,
> >                 from fs/cifs/cifspdu.h:25,
> >                 from fs/cifs/xattr.c:26:
> >
> > This patch removes the local definitions.
> >
> > Reported-by: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public•gmane.org>
> > Signed-off-by: Mimi Zohar <zohar-r/Jw6+rmf7HQT0dZR+AlfA@public•gmane.org>
> > ---
> >  fs/cifs/xattr.c |   40 ++++++++++++++++++----------------------
> >  1 files changed, 18 insertions(+), 22 deletions(-)
> >
> > diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
> > index 2a22fb2..c323088 100644
> > --- a/fs/cifs/xattr.c
> > +++ b/fs/cifs/xattr.c
> > @@ -22,6 +22,7 @@
> >  #include <linux/fs.h>
> >  #include <linux/posix_acl_xattr.h>
> >  #include <linux/slab.h>
> > +#include <linux/xattr.h>
> >  #include "cifsfs.h"
> >  #include "cifspdu.h"
> >  #include "cifsglob.h"
> > @@ -31,16 +32,8 @@
> >  #define MAX_EA_VALUE_SIZE 65535
> >  #define CIFS_XATTR_DOS_ATTRIB "user.DosAttrib"
> >  #define CIFS_XATTR_CIFS_ACL "system.cifs_acl"
> > -#define CIFS_XATTR_USER_PREFIX "user."
> > -#define CIFS_XATTR_SYSTEM_PREFIX "system."
> > -#define CIFS_XATTR_OS2_PREFIX "os2."
> > -#define CIFS_XATTR_SECURITY_PREFIX "security."
> > -#define CIFS_XATTR_TRUSTED_PREFIX "trusted."
> > -#define XATTR_TRUSTED_PREFIX_LEN  8
> > -#define XATTR_SECURITY_PREFIX_LEN 9
> > -/* BB need to add server (Samba e.g) support for security and trusted prefix */
> > -
> >
> > +/* BB need to add server (Samba e.g) support for security and trusted prefix */
> >
> >  int cifs_removexattr(struct dentry *direntry, const char *ea_name)
> >  {
> > @@ -76,8 +69,8 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
> >        }
> >        if (ea_name == NULL) {
> >                cFYI(1, "Null xattr names not supported");
> > -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5)
> > -               && (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) {
> > +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> > +               && (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))) {
> >                cFYI(1,
> >                     "illegal xattr request %s (only user namespace supported)",
> >                     ea_name);
> > @@ -88,7 +81,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
> >                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
> >                        goto remove_ea_exit;
> >
> > -               ea_name += 5; /* skip past user. prefix */
> > +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
> >                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
> >                        (__u16)0, cifs_sb->local_nls,
> >                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> > @@ -149,21 +142,23 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
> >
> >        if (ea_name == NULL) {
> >                cFYI(1, "Null xattr names not supported");
> > -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
> > +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> > +                  == 0) {
> >                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
> >                        goto set_ea_exit;
> >                if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0)
> >                        cFYI(1, "attempt to set cifs inode metadata");
> >
> > -               ea_name += 5; /* skip past user. prefix */
> > +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
> >                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
> >                        (__u16)value_size, cifs_sb->local_nls,
> >                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> > -       } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
> > +       } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)
> > +                  == 0) {
> >                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
> >                        goto set_ea_exit;
> >
> > -               ea_name += 4; /* skip past os2. prefix */
> > +               ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
> >                rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
> >                        (__u16)value_size, cifs_sb->local_nls,
> >                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> > @@ -269,7 +264,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
> >        /* return alt name if available as pseudo attr */
> >        if (ea_name == NULL) {
> >                cFYI(1, "Null xattr names not supported");
> > -       } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
> > +       } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)
> > +                  == 0) {
> >                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
> >                        goto get_ea_exit;
> >
> > @@ -277,15 +273,15 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
> >                        cFYI(1, "attempt to query cifs inode metadata");
> >                        /* revalidate/getattr then populate from inode */
> >                } /* BB add else when above is implemented */
> > -               ea_name += 5; /* skip past user. prefix */
> > +               ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */
> >                rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
> >                        buf_size, cifs_sb->local_nls,
> >                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> > -       } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
> > +       } else if (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) == 0) {
> >                if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
> >                        goto get_ea_exit;
> >
> > -               ea_name += 4; /* skip past os2. prefix */
> > +               ea_name += XATTR_OS2_PREFIX_LEN; /* skip past os2. prefix */
> >                rc = CIFSSMBQAllEAs(xid, pTcon, full_path, ea_name, ea_value,
> >                        buf_size, cifs_sb->local_nls,
> >                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
> > @@ -339,10 +335,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
> >                cFYI(1, "Query CIFS ACL not supported yet");
> >  #endif /* CONFIG_CIFS_ACL */
> >        } else if (strncmp(ea_name,
> > -                 CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
> > +                 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) {
> >                cFYI(1, "Trusted xattr namespace not supported yet");
> >        } else if (strncmp(ea_name,
> > -                 CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
> > +                 XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
> >                cFYI(1, "Security xattr namespace not supported yet");
> >        } else
> >                cFYI(1,
> > --
> > 1.7.3.4
> >
> >
> 
> 
> 
> -- 
> Thanks,
> 
> Steve
> 

-- 
James Morris
<jmorris-gx6/JNMH7DfYtjvyW6yDsg@public•gmane.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
  2011-08-12  0:48         ` James Morris
@ 2011-08-12  1:49           ` Stephen Rothwell
       [not found]             ` <20110812114919.2797815cf41cd69048e1d3cf-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2011-08-12  1:49 UTC (permalink / raw)
  To: James Morris
  Cc: Steve French, Mimi Zohar, Eric Paris, linux-security-module,
	linux-next, linux-kernel, linux-cifs, David Safford, Mimi Zohar

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

Hi all,

On Fri, 12 Aug 2011 10:48:27 +1000 (EST) James Morris <jmorris@namei•org> wrote:
>
> On Thu, 11 Aug 2011, Steve French wrote:
> 
> > makes sense - do we want this going through the cifs tree or as part
> > of the xattr change mentioned below.
> 
> Should be fine to go into the CIFS tree, as long as that is in -next.

Except then that could leave Linus' tree broken during the next merge
window depending on the order he merges the cifs and security-testing
trees.  Unless that patch is sent to Linus as a fix patch before the next
merge window, of course.

I will add this patch as a merge fixup to the merge of the
security-testing tree for today.  And will remove my copy when one of the
trees gets fixed.

James: maybe I should change the name of your tree in -next to just
"security"?
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
       [not found]             ` <20110812114919.2797815cf41cd69048e1d3cf-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
@ 2011-08-12  2:44               ` James Morris
  2011-08-12  2:49                 ` Steve French
  0 siblings, 1 reply; 9+ messages in thread
From: James Morris @ 2011-08-12  2:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Steve French, Mimi Zohar, Eric Paris,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA, David Safford, Mimi Zohar

On Fri, 12 Aug 2011, Stephen Rothwell wrote:

> Except then that could leave Linus' tree broken during the next merge
> window depending on the order he merges the cifs and security-testing
> trees.  Unless that patch is sent to Linus as a fix patch before the next
> merge window, of course.
> 
> I will add this patch as a merge fixup to the merge of the
> security-testing tree for today.  And will remove my copy when one of the
> trees gets fixed.

I'll put it in my tree, then.

> James: maybe I should change the name of your tree in -next to just
> "security"?

Sure.


-- 
James Morris
<jmorris-gx6/JNMH7DfYtjvyW6yDsg@public•gmane.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
  2011-08-12  2:44               ` James Morris
@ 2011-08-12  2:49                 ` Steve French
  2011-08-12  5:08                   ` James Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Steve French @ 2011-08-12  2:49 UTC (permalink / raw)
  To: James Morris
  Cc: Stephen Rothwell, Mimi Zohar, Eric Paris, linux-security-module,
	linux-next, linux-kernel, linux-cifs, David Safford, Mimi Zohar

If it is easier - I don't mind merging it to cifs now.   Seems
harmless and low risk.

On Thu, Aug 11, 2011 at 9:44 PM, James Morris <jmorris@namei•org> wrote:
> On Fri, 12 Aug 2011, Stephen Rothwell wrote:
>
>> Except then that could leave Linus' tree broken during the next merge
>> window depending on the order he merges the cifs and security-testing
>> trees.  Unless that patch is sent to Linus as a fix patch before the next
>> merge window, of course.
>>
>> I will add this patch as a merge fixup to the merge of the
>> security-testing tree for today.  And will remove my copy when one of the
>> trees gets fixed.
>
> I'll put it in my tree, then.
>
>> James: maybe I should change the name of your tree in -next to just
>> "security"?
>
> Sure.
>
>
> --
> James Morris
> <jmorris@namei•org>
>



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] CIFS: remove local xattr definitions
  2011-08-12  2:49                 ` Steve French
@ 2011-08-12  5:08                   ` James Morris
  0 siblings, 0 replies; 9+ messages in thread
From: James Morris @ 2011-08-12  5:08 UTC (permalink / raw)
  To: Steve French
  Cc: Stephen Rothwell, Mimi Zohar, Eric Paris, linux-security-module,
	linux-next, linux-kernel, linux-cifs, David Safford, Mimi Zohar

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1005 bytes --]

On Thu, 11 Aug 2011, Steve French wrote:

> If it is easier - I don't mind merging it to cifs now.   Seems
> harmless and low risk.

I've applied it to my tree.

> 
> On Thu, Aug 11, 2011 at 9:44 PM, James Morris <jmorris@namei•org> wrote:
> > On Fri, 12 Aug 2011, Stephen Rothwell wrote:
> >
> >> Except then that could leave Linus' tree broken during the next merge
> >> window depending on the order he merges the cifs and security-testing
> >> trees.  Unless that patch is sent to Linus as a fix patch before the next
> >> merge window, of course.
> >>
> >> I will add this patch as a merge fixup to the merge of the
> >> security-testing tree for today.  And will remove my copy when one of the
> >> trees gets fixed.
> >
> > I'll put it in my tree, then.
> >
> >> James: maybe I should change the name of your tree in -next to just
> >> "security"?
> >
> > Sure.
> >
> >
> > --
> > James Morris
> > <jmorris@namei•org>
> >
> 
> 
> 
> -- 
> Thanks,
> 
> Steve
> 

-- 
James Morris
<jmorris@namei•org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-08-12  5:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 19:14 [PATCH] CIFS: remove local xattr definitions Mimi Zohar
2011-08-11 19:29 ` Eric Paris
2011-08-11 20:00   ` Mimi Zohar
2011-08-11 20:17     ` Steve French
     [not found]       ` <CAH2r5muSOM=haAXHg+ys05vgJ30m94g_NQz-Y2AgMDkmV1dbiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-12  0:48         ` James Morris
2011-08-12  1:49           ` Stephen Rothwell
     [not found]             ` <20110812114919.2797815cf41cd69048e1d3cf-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2011-08-12  2:44               ` James Morris
2011-08-12  2:49                 ` Steve French
2011-08-12  5:08                   ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox