[CIFS] ACL support part 5
[sfrench/cifs-2.6.git] / fs / cifs / cifsacl.c
index e8e56353f5a1c423b5e6e70f986bbb8b6a3f7a19..e8083043a26c0bbe3391b100581c8ac7d34b3c00 100644 (file)
@@ -129,6 +129,29 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid)
        return (1); /* sids compare/match */
 }
 
        return (1); /* sids compare/match */
 }
 
+void get_mode_from_acl(struct inode * inode, const char * path)
+{
+       
+       if (inode == NULL)
+               return;
+
+       /* find an open readable handle
+          if handle found
+                lock handle 
+          else open file
+             if no open file can not hurt to check if path is null
+          GetCIFSACL
+          for all ACEs in ACL {
+                  if U or G or O
+                          inode->i_mode = parse_ace(file_type, UG or O, ace->perms, inode->i_mode)
+                  else continue
+          }
+          if handle open close it
+          else unlock handle */
+
+       return;
+}
+
 
 static void parse_ace(struct cifs_ace *pace, char *end_of_acl)
 {
 
 static void parse_ace(struct cifs_ace *pace, char *end_of_acl)
 {