X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fapply-default-acl.c;h=45dfa56fecfdf2a160673cb412eda9690bef2f29;hb=86257934b1ac9a26a9582544801528bc4b50fcb3;hp=8979d1c56eb1955922d4b9705de9f4876781e3d2;hpb=2dee89ff5a032f896d57a353c04525c506372669;p=apply-default-acl.git diff --git a/src/apply-default-acl.c b/src/apply-default-acl.c index 8979d1c..45dfa56 100644 --- a/src/apply-default-acl.c +++ b/src/apply-default-acl.c @@ -51,6 +51,13 @@ int safe_open_ex(int at_fd, char* pathname, int flags) { openat() opens only the next directory (and doesn't recurse). */ *firstslash = '\0'; int fd = safe_open_ex(at_fd, pathname, flags); + if (fd == -1) { + if (errno != ELOOP) { + /* Don't output anything if we ignore a symlink */ + perror("safe_open_ex (safe_open_ex)"); + } + return -1; + } /* The ++ is safe because there needs to be at least a null byte after the first slash, even if it's the last real character in