diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-06 03:10:23 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 10:28:45 -0500 |
commit | 355958f2893d97375da17696d2566dd4ab7b54a8 (patch) | |
tree | c2090cd25d87d8f537ddd65039819e662ec9e522 | |
parent | 46bbc25f9ff1242cd1c042580aec11ddb5e41369 (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>
-rw-r--r-- | fs/cifs/cifsacl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 5cbd00e74067..2e811f45b413 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, | |||
297 | * probably a safe assumption but might be better to check based on | 297 | * probably a safe assumption but might be better to check based on |
298 | * sidtype. | 298 | * sidtype. |
299 | */ | 299 | */ |
300 | BUILD_BUG_ON(sizeof(uid_t) != sizeof(gid_t)); | ||
300 | if (sidkey->datalen != sizeof(uid_t)) { | 301 | if (sidkey->datalen != sizeof(uid_t)) { |
301 | rc = -EIO; | 302 | rc = -EIO; |
302 | cFYI(1, "%s: Downcall contained malformed key " | 303 | cFYI(1, "%s: Downcall contained malformed key " |