15 #include <linux/kernel.h>
16 #include <linux/slab.h>
19 #include <linux/sched.h>
21 #include <linux/export.h>
23 #include <linux/errno.h>
66 clone =
kmemdup(acl, size, flags);
99 if (!uid_valid(pa->
e_uid))
101 if (uid_valid(prev_uid) &&
102 uid_lte(pa->
e_uid, prev_uid))
104 prev_uid = pa->
e_uid;
118 if (!gid_valid(pa->
e_gid))
120 if (gid_valid(prev_gid) &&
121 gid_lte(pa->
e_gid, prev_gid))
123 prev_gid = pa->
e_gid;
237 if ((pa->
e_perm & want) == want)
244 if ((pa->
e_perm & want) == want)
262 for (mask_obj = pa+1; mask_obj != pe; mask_obj++) {
271 if ((pa->
e_perm & want) == want)
325 mask_obj->e_perm &= (mode >> 3) | ~
S_IRWXO;
326 mode &= (mask_obj->e_perm << 3) | ~
S_IRWXG;
376 mask_obj->e_perm = (mode &
S_IRWXG) >> 3;
389 struct posix_acl *clone = posix_acl_clone(*acl, gfp);
392 err = posix_acl_create_masq(clone, mode_p);
394 posix_acl_release(clone);
398 posix_acl_release(*acl);
407 struct posix_acl *clone = posix_acl_clone(*acl, gfp);
410 err = posix_acl_chmod_masq(clone, mode);
412 posix_acl_release(clone);
416 posix_acl_release(*acl);