浏览代码

[CIFS] change misleading field name

num_auth is really num_subauth in ACL terminology

Signed-off-by: Steve French <sfrench@us.ibm.com>
Steve French 17 年之前
父节点
当前提交
4084973dba
共有 2 个文件被更改,包括 6 次插入8 次删除
  1. 2 2
      fs/cifs/cifsacl.c
  2. 4 6
      fs/cifs/cifsacl.h

+ 2 - 2
fs/cifs/cifsacl.c

@@ -46,11 +46,11 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
 	}
 	}
 #ifdef CONFIG_CIFS_DEBUG2
 #ifdef CONFIG_CIFS_DEBUG2
 	cFYI(1, ("revision %d num_auth %d First subauth 0x%x",
 	cFYI(1, ("revision %d num_auth %d First subauth 0x%x",
-		psid->revision, psid->num_auth, psid->sub_auth[0]));
+		psid->revision, psid->num_subauth, psid->sub_auth[0]));
 
 
 	/* BB add length check to make sure that we do not have huge num auths
 	/* BB add length check to make sure that we do not have huge num auths
 	      and therefore go off the end */
 	      and therefore go off the end */
-	cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_auth])));
+	cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_subauth])));
 #endif
 #endif
 	return 0;
 	return 0;
 }
 }

+ 4 - 6
fs/cifs/cifsacl.h

@@ -33,10 +33,9 @@ struct cifs_ntsd {
 
 
 struct cifs_sid {
 struct cifs_sid {
 	__u8 revision; /* revision level */
 	__u8 revision; /* revision level */
-	__u8 num_auth;
+	__u8 num_subauth;
 	__u8 authority[6];
 	__u8 authority[6];
-	__u32 sub_auth[4];
-	__u32 rid;
+	__u32 sub_auth[0]; /* sub_auth[num_subauth] */
 } __attribute__((packed));
 } __attribute__((packed));
 
 
 struct cifs_acl {
 struct cifs_acl {
@@ -54,10 +53,9 @@ struct cifs_ntace {
 
 
 struct cifs_ace {
 struct cifs_ace {
 	__u8 revision; /* revision level */
 	__u8 revision; /* revision level */
-	__u8 num_auth;
+	__u8 num_subauth;
 	__u8 authority[6];
 	__u8 authority[6];
-	__u32 sub_auth[4];
-	__u32 rid;
+	__u32 sub_auth[0];
 } __attribute__((packed));
 } __attribute__((packed));
 
 
 /* everyone */
 /* everyone */