projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46bbc25
)
cifs: Use BUILD_BUG_ON to validate uids and gids are the same size
author
Eric W. Biederman
<ebiederm@xmission.com>
Wed, 6 Feb 2013 08:10:23 +0000
(
00:10
-0800)
committer
Eric W. Biederman
<ebiederm@xmission.com>
Wed, 13 Feb 2013 15:28:45 +0000
(07:28 -0800)
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>
fs/cifs/cifsacl.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/cifs/cifsacl.c
b/fs/cifs/cifsacl.c
index 5cbd00e740671dc13a0f4a07621513eb469762ac..2e811f45b413debf6593509190a729b50ecd2e79 100644
(file)
--- 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 "