diff options
Diffstat (limited to 'fs/cifs/cifsacl.c')
-rw-r--r-- | fs/cifs/cifsacl.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index e8e56353f5a1..e8083043a26c 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -129,6 +129,29 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) | |||
129 | return (1); /* sids compare/match */ | 129 | return (1); /* sids compare/match */ |
130 | } | 130 | } |
131 | 131 | ||
132 | void get_mode_from_acl(struct inode * inode, const char * path) | ||
133 | { | ||
134 | |||
135 | if (inode == NULL) | ||
136 | return; | ||
137 | |||
138 | /* find an open readable handle | ||
139 | if handle found | ||
140 | lock handle | ||
141 | else open file | ||
142 | if no open file can not hurt to check if path is null | ||
143 | GetCIFSACL | ||
144 | for all ACEs in ACL { | ||
145 | if U or G or O | ||
146 | inode->i_mode = parse_ace(file_type, UG or O, ace->perms, inode->i_mode) | ||
147 | else continue | ||
148 | } | ||
149 | if handle open close it | ||
150 | else unlock handle */ | ||
151 | |||
152 | return; | ||
153 | } | ||
154 | |||
132 | 155 | ||
133 | static void parse_ace(struct cifs_ace *pace, char *end_of_acl) | 156 | static void parse_ace(struct cifs_ace *pace, char *end_of_acl) |
134 | { | 157 | { |