X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fapply-default-acl.c;h=b7ef3a82c951f83e167c9dd00653402f7b74ef95;hb=b0131edac01695a533c4ffd33774215aec9cd03a;hp=0a70b09d27dc7c88355e9cc339016b1f33357647;hpb=7e0a431bdbba1757b4fc54289dcfb5f26b59781e;p=apply-default-acl.git diff --git a/src/apply-default-acl.c b/src/apply-default-acl.c index 0a70b09..b7ef3a8 100644 --- a/src/apply-default-acl.c +++ b/src/apply-default-acl.c @@ -536,9 +536,8 @@ int apply_default_acl(const char* path, /* The file descriptor corresponding to "path" */ int fd = 0; - /* Split "path" into base/dirname parts to be used with openat(). - * We duplicate the strings involved because dirname/basename mangle - * their arguments. + /* Get the parent directory of "path" with dirname(), which happens + * to murder its argument and necessitates a path_copy. */ char* path_copy = strdup(path); if (path_copy == NULL) {