Use binary and (&) instead of logical to extract the mask of a capability.
CID: 1365227 Submitted by: cem
This commit is contained in:
parent
0a33140d06
commit
8368d90bfc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307948
@ -959,7 +959,7 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_long flags, u_long *rem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: This should be in <sys/capsicum.h> */
|
/* XXX: This should be in <sys/capsicum.h> */
|
||||||
#define CAPMASK(right) ((right) && (((uint64_t)1 << 57) - 1))
|
#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1))
|
||||||
|
|
||||||
void
|
void
|
||||||
sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp)
|
sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp)
|
||||||
|
Loading…
Reference in New Issue
Block a user