X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fapply-default-acl.c;h=d83e428756cadbe4d94d666bdee739e6a7c46a76;hb=380d77fc4acfd5e6cb2317e63c96567209902eda;hp=a520aa9b6d4ebdc43b5055772292c1efe4b2b822;hpb=a940e75467931de75e969b3de97f21698ec6fa08;p=apply-default-acl.git diff --git a/src/apply-default-acl.c b/src/apply-default-acl.c index a520aa9..d83e428 100644 --- a/src/apply-default-acl.c +++ b/src/apply-default-acl.c @@ -109,7 +109,10 @@ int apply_default_acl_nftw(const char *target, } - if (apply_default_acl_ex(target, sp, false) == ACL_ERROR) { + /* The apply_default_acl() function could make use of the stat + struct pointer sp, but for safety we choose to stat the result of + safe_open() ourselves. */ + if (apply_default_acl(target, false) == ACL_ERROR) { /* I guess we do want to bail out for serious/unexpected errors? */ return ACL_ERROR; } @@ -138,7 +141,10 @@ int apply_default_acl_nftw_x(const char *target, return ACL_ERROR; } - if (apply_default_acl_ex(target, sp, true) == ACL_ERROR) { + /* The apply_default_acl() function could make use of the stat + struct pointer sp, but for safety we choose to stat the result of + safe_open() ourselves. */ + if (apply_default_acl(target, true) == ACL_ERROR) { /* I guess we do want to bail out for serious/unexpected errors? */ return ACL_ERROR; }