summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2001-04-11 02:19:01 +0000
committerjedgar <jedgar@FreeBSD.org>2001-04-11 02:19:01 +0000
commit512fd8bc5fc1ea2d68c2d83ceebc552c788bbb5f (patch)
tree69a038e17e0a39af37ddd627fe20e6a146f1c3c3
parent2c672eefadbb8dbdf2c91e1d1acad8c10e276fe0 (diff)
downloadFreeBSD-src-512fd8bc5fc1ea2d68c2d83ceebc552c788bbb5f.zip
FreeBSD-src-512fd8bc5fc1ea2d68c2d83ceebc552c788bbb5f.tar.gz
Correct the following defines to match the POSIX.1e spec:
ACL_PERM_EXEC -> ACL_EXECUTE ACL_PERM_READ -> ACL_READ ACL_PERM_WRITE -> ACL_WRITE Obtained from: TrustedBSD
-rw-r--r--bin/getfacl/getfacl.c18
-rw-r--r--lib/libc/posix1e/acl_support.c12
-rw-r--r--sys/kern/kern_acl.c72
-rw-r--r--sys/kern/subr_acl_posix1e.c72
-rw-r--r--sys/kern/vfs_acl.c72
-rw-r--r--sys/sys/acl.h12
6 files changed, 129 insertions, 129 deletions
diff --git a/bin/getfacl/getfacl.c b/bin/getfacl/getfacl.c
index 638d26d..c5eb939 100644
--- a/bin/getfacl/getfacl.c
+++ b/bin/getfacl/getfacl.c
@@ -61,31 +61,31 @@ acl_from_stat(struct stat sb)
acl->acl_entry[0].ae_id = sb.st_uid;
acl->acl_entry[0].ae_perm = 0;
if (sb.st_mode & S_IRUSR)
- acl->acl_entry[0].ae_perm |= ACL_PERM_READ;
+ acl->acl_entry[0].ae_perm |= ACL_READ;
if (sb.st_mode & S_IWUSR)
- acl->acl_entry[0].ae_perm |= ACL_PERM_WRITE;
+ acl->acl_entry[0].ae_perm |= ACL_WRITE;
if (sb.st_mode & S_IXUSR)
- acl->acl_entry[0].ae_perm |= ACL_PERM_EXEC;
+ acl->acl_entry[0].ae_perm |= ACL_EXECUTE;
acl->acl_entry[1].ae_tag = ACL_GROUP_OBJ;
acl->acl_entry[1].ae_id = sb.st_gid;
acl->acl_entry[1].ae_perm = 0;
if (sb.st_mode & S_IRGRP)
- acl->acl_entry[1].ae_perm |= ACL_PERM_READ;
+ acl->acl_entry[1].ae_perm |= ACL_READ;
if (sb.st_mode & S_IWGRP)
- acl->acl_entry[1].ae_perm |= ACL_PERM_WRITE;
+ acl->acl_entry[1].ae_perm |= ACL_WRITE;
if (sb.st_mode & S_IXGRP)
- acl->acl_entry[1].ae_perm |= ACL_PERM_EXEC;
+ acl->acl_entry[1].ae_perm |= ACL_EXECUTE;
acl->acl_entry[2].ae_tag = ACL_OTHER_OBJ;
acl->acl_entry[2].ae_id = 0;
acl->acl_entry[2].ae_perm = 0;
if (sb.st_mode & S_IROTH)
- acl->acl_entry[2].ae_perm |= ACL_PERM_READ;
+ acl->acl_entry[2].ae_perm |= ACL_READ;
if (sb.st_mode & S_IWOTH)
- acl->acl_entry[2].ae_perm |= ACL_PERM_WRITE;
+ acl->acl_entry[2].ae_perm |= ACL_WRITE;
if (sb.st_mode & S_IXOTH)
- acl->acl_entry[2].ae_perm |= ACL_PERM_EXEC;
+ acl->acl_entry[2].ae_perm |= ACL_EXECUTE;
acl->acl_cnt = 3;
diff --git a/lib/libc/posix1e/acl_support.c b/lib/libc/posix1e/acl_support.c
index 128e1fc..26fcf07 100644
--- a/lib/libc/posix1e/acl_support.c
+++ b/lib/libc/posix1e/acl_support.c
@@ -351,17 +351,17 @@ _posix1e_acl_perm_to_string(acl_perm_t perm, ssize_t buf_len, char *buf)
buf[3] = 0; /* null terminate */
- if (perm & ACL_PERM_READ)
+ if (perm & ACL_READ)
buf[0] = ACL_STRING_PERM_READ;
else
buf[0] = ACL_STRING_PERM_NONE;
- if (perm & ACL_PERM_WRITE)
+ if (perm & ACL_WRITE)
buf[1] = ACL_STRING_PERM_WRITE;
else
buf[1] = ACL_STRING_PERM_NONE;
- if (perm & ACL_PERM_EXEC)
+ if (perm & ACL_EXECUTE)
buf[2] = ACL_STRING_PERM_EXEC;
else
buf[2] = ACL_STRING_PERM_NONE;
@@ -382,13 +382,13 @@ _posix1e_acl_string_to_perm(char *string, acl_perm_t *perm)
while (*ch) {
switch(*ch) {
case ACL_STRING_PERM_READ:
- myperm |= ACL_PERM_READ;
+ myperm |= ACL_READ;
break;
case ACL_STRING_PERM_WRITE:
- myperm |= ACL_PERM_WRITE;
+ myperm |= ACL_WRITE;
break;
case ACL_STRING_PERM_EXEC:
- myperm |= ACL_PERM_EXEC;
+ myperm |= ACL_EXECUTE;
break;
case ACL_STRING_PERM_NONE:
break;
diff --git a/sys/kern/kern_acl.c b/sys/kern/kern_acl.c
index 7ee457b..d2c878a 100644
--- a/sys/kern/kern_acl.c
+++ b/sys/kern/kern_acl.c
@@ -127,11 +127,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
break;
dac_granted = 0;
dac_granted |= VADMIN;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
if ((acc_mode & dac_granted) == acc_mode)
return (0);
@@ -174,11 +174,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
}
if (acl_mask != NULL) {
acl_mask_granted = 0;
- if (acl_mask->ae_perm & ACL_PERM_EXEC)
+ if (acl_mask->ae_perm & ACL_EXECUTE)
acl_mask_granted |= VEXEC;
- if (acl_mask->ae_perm & ACL_PERM_READ)
+ if (acl_mask->ae_perm & ACL_READ)
acl_mask_granted |= VREAD;
- if (acl_mask->ae_perm & ACL_PERM_WRITE)
+ if (acl_mask->ae_perm & ACL_WRITE)
acl_mask_granted |= VWRITE;
} else
acl_mask_granted = VEXEC | VREAD | VWRITE;
@@ -200,11 +200,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
if (acl->acl_entry[i].ae_id != cred->cr_uid)
break;
dac_granted = 0;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
if ((acc_mode & dac_granted) == acc_mode)
@@ -232,11 +232,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
case ACL_GROUP:
if (groupmember(acl->acl_entry[i].ae_id, cred)) {
dac_granted = 0;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
@@ -262,13 +262,13 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
cred)) {
dac_granted = 0;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_EXEC)
+ ACL_EXECUTE)
dac_granted |= VEXEC;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_READ)
+ ACL_READ)
dac_granted |= VREAD;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_WRITE)
+ ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
if ((acc_mode & (dac_granted |
@@ -292,11 +292,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
* Fall back on ACL_OTHER. ACL_MASK is not applied to ACL_OTHER.
*/
dac_granted = 0;
- if (acl_other->ae_perm & ACL_PERM_EXEC)
+ if (acl_other->ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl_other->ae_perm & ACL_PERM_READ)
+ if (acl_other->ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl_other->ae_perm & ACL_PERM_WRITE)
+ if (acl_other->ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
if ((acc_mode & dac_granted) == acc_mode)
@@ -324,29 +324,29 @@ acl_posix1e_mode_to_perm(acl_tag_t tag, mode_t mode)
switch(tag) {
case ACL_USER_OBJ:
if (mode & S_IXUSR)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IRUSR)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWUSR)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
case ACL_GROUP_OBJ:
if (mode & S_IXGRP)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IRGRP)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWGRP)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
case ACL_OTHER:
if (mode & S_IXOTH)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IROTH)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWOTH)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
default:
@@ -397,23 +397,23 @@ acl_posix1e_perms_to_mode(struct acl_entry *acl_user_obj_entry,
mode_t mode;
mode = 0;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_user_obj_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXUSR;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_READ)
+ if (acl_user_obj_entry->ae_perm & ACL_READ)
mode |= S_IRUSR;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_user_obj_entry->ae_perm & ACL_WRITE)
mode |= S_IWUSR;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_group_obj_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXGRP;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_READ)
+ if (acl_group_obj_entry->ae_perm & ACL_READ)
mode |= S_IRGRP;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_group_obj_entry->ae_perm & ACL_WRITE)
mode |= S_IWGRP;
- if (acl_other_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_other_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXOTH;
- if (acl_other_entry->ae_perm & ACL_PERM_READ)
+ if (acl_other_entry->ae_perm & ACL_READ)
mode |= S_IROTH;
- if (acl_other_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_other_entry->ae_perm & ACL_WRITE)
mode |= S_IWOTH;
return (mode);
diff --git a/sys/kern/subr_acl_posix1e.c b/sys/kern/subr_acl_posix1e.c
index 7ee457b..d2c878a 100644
--- a/sys/kern/subr_acl_posix1e.c
+++ b/sys/kern/subr_acl_posix1e.c
@@ -127,11 +127,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
break;
dac_granted = 0;
dac_granted |= VADMIN;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
if ((acc_mode & dac_granted) == acc_mode)
return (0);
@@ -174,11 +174,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
}
if (acl_mask != NULL) {
acl_mask_granted = 0;
- if (acl_mask->ae_perm & ACL_PERM_EXEC)
+ if (acl_mask->ae_perm & ACL_EXECUTE)
acl_mask_granted |= VEXEC;
- if (acl_mask->ae_perm & ACL_PERM_READ)
+ if (acl_mask->ae_perm & ACL_READ)
acl_mask_granted |= VREAD;
- if (acl_mask->ae_perm & ACL_PERM_WRITE)
+ if (acl_mask->ae_perm & ACL_WRITE)
acl_mask_granted |= VWRITE;
} else
acl_mask_granted = VEXEC | VREAD | VWRITE;
@@ -200,11 +200,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
if (acl->acl_entry[i].ae_id != cred->cr_uid)
break;
dac_granted = 0;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
if ((acc_mode & dac_granted) == acc_mode)
@@ -232,11 +232,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
case ACL_GROUP:
if (groupmember(acl->acl_entry[i].ae_id, cred)) {
dac_granted = 0;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
@@ -262,13 +262,13 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
cred)) {
dac_granted = 0;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_EXEC)
+ ACL_EXECUTE)
dac_granted |= VEXEC;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_READ)
+ ACL_READ)
dac_granted |= VREAD;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_WRITE)
+ ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
if ((acc_mode & (dac_granted |
@@ -292,11 +292,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
* Fall back on ACL_OTHER. ACL_MASK is not applied to ACL_OTHER.
*/
dac_granted = 0;
- if (acl_other->ae_perm & ACL_PERM_EXEC)
+ if (acl_other->ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl_other->ae_perm & ACL_PERM_READ)
+ if (acl_other->ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl_other->ae_perm & ACL_PERM_WRITE)
+ if (acl_other->ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
if ((acc_mode & dac_granted) == acc_mode)
@@ -324,29 +324,29 @@ acl_posix1e_mode_to_perm(acl_tag_t tag, mode_t mode)
switch(tag) {
case ACL_USER_OBJ:
if (mode & S_IXUSR)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IRUSR)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWUSR)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
case ACL_GROUP_OBJ:
if (mode & S_IXGRP)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IRGRP)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWGRP)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
case ACL_OTHER:
if (mode & S_IXOTH)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IROTH)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWOTH)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
default:
@@ -397,23 +397,23 @@ acl_posix1e_perms_to_mode(struct acl_entry *acl_user_obj_entry,
mode_t mode;
mode = 0;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_user_obj_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXUSR;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_READ)
+ if (acl_user_obj_entry->ae_perm & ACL_READ)
mode |= S_IRUSR;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_user_obj_entry->ae_perm & ACL_WRITE)
mode |= S_IWUSR;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_group_obj_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXGRP;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_READ)
+ if (acl_group_obj_entry->ae_perm & ACL_READ)
mode |= S_IRGRP;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_group_obj_entry->ae_perm & ACL_WRITE)
mode |= S_IWGRP;
- if (acl_other_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_other_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXOTH;
- if (acl_other_entry->ae_perm & ACL_PERM_READ)
+ if (acl_other_entry->ae_perm & ACL_READ)
mode |= S_IROTH;
- if (acl_other_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_other_entry->ae_perm & ACL_WRITE)
mode |= S_IWOTH;
return (mode);
diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c
index 7ee457b..d2c878a 100644
--- a/sys/kern/vfs_acl.c
+++ b/sys/kern/vfs_acl.c
@@ -127,11 +127,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
break;
dac_granted = 0;
dac_granted |= VADMIN;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
if ((acc_mode & dac_granted) == acc_mode)
return (0);
@@ -174,11 +174,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
}
if (acl_mask != NULL) {
acl_mask_granted = 0;
- if (acl_mask->ae_perm & ACL_PERM_EXEC)
+ if (acl_mask->ae_perm & ACL_EXECUTE)
acl_mask_granted |= VEXEC;
- if (acl_mask->ae_perm & ACL_PERM_READ)
+ if (acl_mask->ae_perm & ACL_READ)
acl_mask_granted |= VREAD;
- if (acl_mask->ae_perm & ACL_PERM_WRITE)
+ if (acl_mask->ae_perm & ACL_WRITE)
acl_mask_granted |= VWRITE;
} else
acl_mask_granted = VEXEC | VREAD | VWRITE;
@@ -200,11 +200,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
if (acl->acl_entry[i].ae_id != cred->cr_uid)
break;
dac_granted = 0;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
if ((acc_mode & dac_granted) == acc_mode)
@@ -232,11 +232,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
case ACL_GROUP:
if (groupmember(acl->acl_entry[i].ae_id, cred)) {
dac_granted = 0;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_EXEC)
+ if (acl->acl_entry[i].ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_READ)
+ if (acl->acl_entry[i].ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl->acl_entry[i].ae_perm & ACL_PERM_WRITE)
+ if (acl->acl_entry[i].ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
@@ -262,13 +262,13 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
cred)) {
dac_granted = 0;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_EXEC)
+ ACL_EXECUTE)
dac_granted |= VEXEC;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_READ)
+ ACL_READ)
dac_granted |= VREAD;
if (acl->acl_entry[i].ae_perm &
- ACL_PERM_WRITE)
+ ACL_WRITE)
dac_granted |= VWRITE;
dac_granted &= acl_mask_granted;
if ((acc_mode & (dac_granted |
@@ -292,11 +292,11 @@ vaccess_acl_posix1e(enum vtype type, struct acl *acl, mode_t acc_mode,
* Fall back on ACL_OTHER. ACL_MASK is not applied to ACL_OTHER.
*/
dac_granted = 0;
- if (acl_other->ae_perm & ACL_PERM_EXEC)
+ if (acl_other->ae_perm & ACL_EXECUTE)
dac_granted |= VEXEC;
- if (acl_other->ae_perm & ACL_PERM_READ)
+ if (acl_other->ae_perm & ACL_READ)
dac_granted |= VREAD;
- if (acl_other->ae_perm & ACL_PERM_WRITE)
+ if (acl_other->ae_perm & ACL_WRITE)
dac_granted |= VWRITE;
if ((acc_mode & dac_granted) == acc_mode)
@@ -324,29 +324,29 @@ acl_posix1e_mode_to_perm(acl_tag_t tag, mode_t mode)
switch(tag) {
case ACL_USER_OBJ:
if (mode & S_IXUSR)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IRUSR)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWUSR)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
case ACL_GROUP_OBJ:
if (mode & S_IXGRP)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IRGRP)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWGRP)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
case ACL_OTHER:
if (mode & S_IXOTH)
- perm |= ACL_PERM_EXEC;
+ perm |= ACL_EXECUTE;
if (mode & S_IROTH)
- perm |= ACL_PERM_READ;
+ perm |= ACL_READ;
if (mode & S_IWOTH)
- perm |= ACL_PERM_WRITE;
+ perm |= ACL_WRITE;
return (perm);
default:
@@ -397,23 +397,23 @@ acl_posix1e_perms_to_mode(struct acl_entry *acl_user_obj_entry,
mode_t mode;
mode = 0;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_user_obj_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXUSR;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_READ)
+ if (acl_user_obj_entry->ae_perm & ACL_READ)
mode |= S_IRUSR;
- if (acl_user_obj_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_user_obj_entry->ae_perm & ACL_WRITE)
mode |= S_IWUSR;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_group_obj_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXGRP;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_READ)
+ if (acl_group_obj_entry->ae_perm & ACL_READ)
mode |= S_IRGRP;
- if (acl_group_obj_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_group_obj_entry->ae_perm & ACL_WRITE)
mode |= S_IWGRP;
- if (acl_other_entry->ae_perm & ACL_PERM_EXEC)
+ if (acl_other_entry->ae_perm & ACL_EXECUTE)
mode |= S_IXOTH;
- if (acl_other_entry->ae_perm & ACL_PERM_READ)
+ if (acl_other_entry->ae_perm & ACL_READ)
mode |= S_IROTH;
- if (acl_other_entry->ae_perm & ACL_PERM_WRITE)
+ if (acl_other_entry->ae_perm & ACL_WRITE)
mode |= S_IWOTH;
return (mode);
diff --git a/sys/sys/acl.h b/sys/sys/acl.h
index 9847039..79ae968 100644
--- a/sys/sys/acl.h
+++ b/sys/sys/acl.h
@@ -86,12 +86,12 @@ typedef struct acl *acl_t;
/*
* Possible flags in ae_perm field.
*/
-#define ACL_PERM_EXEC 0x0001
-#define ACL_PERM_WRITE 0x0002
-#define ACL_PERM_READ 0x0004
-#define ACL_PERM_NONE 0x0000
-#define ACL_PERM_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
-#define ACL_POSIX1E_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
+#define ACL_EXECUTE 0x0001
+#define ACL_WRITE 0x0002
+#define ACL_READ 0x0004
+#define ACL_PERM_NONE 0x0000
+#define ACL_PERM_BITS (ACL_EXECUTE | ACL_WRITE | ACL_READ)
+#define ACL_POSIX1E_BITS (ACL_EXECUTE | ACL_WRITE | ACL_READ)
#ifdef _KERNEL
OpenPOWER on IntegriCloud