summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2013-02-06 00:10:23 -0800
committerEric W. Biederman <ebiederm@xmission.com>2013-02-13 07:28:45 -0800
commit355958f2893d97375da17696d2566dd4ab7b54a8 (patch)
treec2090cd25d87d8f537ddd65039819e662ec9e522 /fs/cifs
parent46bbc25f9ff1242cd1c042580aec11ddb5e41369 (diff)
cifs: Use BUILD_BUG_ON to validate uids and gids are the same size
The assumption that sizeof(uid_t) is the same as sizeof(gid_t) is completely reasonable but since we can verify the condition at compile time. Cc: Steve French <smfrench@gmail.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsacl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 5cbd00e7406..2e811f45b41 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -297,6 +297,7 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid,
* probably a safe assumption but might be better to check based on
* sidtype.
*/
+ BUILD_BUG_ON(sizeof(uid_t) != sizeof(gid_t));
if (sidkey->datalen != sizeof(uid_t)) {
rc = -EIO;
cFYI(1, "%s: Downcall contained malformed key "