]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - src/apply-default-acl.c
Improve the error message when apply_default_acl() is fed a NULL path.
[apply-default-acl.git] / src / apply-default-acl.c
index 15383a003772aaf47736cefc7a0f957b02c1ccd8..b43a1c65bb6226eaa22eacd08122c8ba20920eec 100644 (file)
@@ -191,8 +191,7 @@ bool is_directory(int fd) {
  *   returned. Otherwise, @c ACL_SUCCESS.
  *
  */
-int acl_set_entry(acl_t* aclp,
-                 acl_entry_t entry) {
+int acl_set_entry(acl_t* aclp, acl_entry_t entry) {
 
   acl_tag_t entry_tag;
   if (acl_get_tag_type(entry, &entry_tag) == ACL_ERROR) {
@@ -630,7 +629,8 @@ int wipe_acls(int fd) {
 int apply_default_acl(const char* path, bool no_exec_mask) {
 
   if (path == NULL) {
-    errno = ENOENT;
+    errno = EINVAL;
+    perror("apply_default_acl (args)");
     return ACL_ERROR;
   }