/* If the path is relative, interpret it relative to the current
working directory (just like the access() system call). */
/* If the path is relative, interpret it relative to the current
working directory (just like the access() system call). */
- int result = faccessat(AT_FDCWD, path, F_OK, flags);
-
- if (result == 0) {
+ if (faccessat(AT_FDCWD, path, F_OK, flags) == 0) {
match one of them, we're allowed to return ACL_SUCCESS
below and bypass the rest of the function. */
acl_permset_t existing_permset;
match one of them, we're allowed to return ACL_SUCCESS
below and bypass the rest of the function. */
acl_permset_t existing_permset;
* be fed to acl_free(). In other words, we should still be freeing
* the right thing, even if the value pointed to by aclp changes.
*/
* be fed to acl_free(). In other words, we should still be freeing
* the right thing, even if the value pointed to by aclp changes.
*/
/* The first thing we do is check to see if this is a mask
entry. If it is, we skip it entirely. */
acl_tag_t tag = ACL_UNDEFINED_TAG;
/* The first thing we do is check to see if this is a mask
entry. If it is, we skip it entirely. */
acl_tag_t tag = ACL_UNDEFINED_TAG;
- int sf_result = acl_set_file(path, ACL_TYPE_DEFAULT, path_acl);
- if (sf_result == ACL_ERROR) {
+ if (acl_set_file(path, ACL_TYPE_DEFAULT, path_acl) == ACL_ERROR) {
/* The mask doesn't affect acl_user_obj, acl_group_obj (in
minimal ACLs) or acl_other entries, so if execute should be
masked, we have to do it manually. */
/* The mask doesn't affect acl_user_obj, acl_group_obj (in
minimal ACLs) or acl_other entries, so if execute should be
masked, we have to do it manually. */
* called right here, we need acl_create_entry() to update the
* value of "acl". To do that, it needs the address of "acl".
*/
* called right here, we need acl_create_entry() to update the
* value of "acl". To do that, it needs the address of "acl".
*/