]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
libadacl: improve safe_open() error message when given bad args.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 26 Feb 2018 18:13:56 +0000 (13:13 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 26 Feb 2018 19:10:29 +0000 (14:10 -0500)
src/libadacl.c

index 69f20733150e1533982adb0044b249e9bbc76aa7..1fb54a87bc8233b8a33bb08c20be1c17ae42be21 100644 (file)
@@ -102,7 +102,8 @@ int safe_open_ex(int at_fd, char* pathname, int flags) {
  */
 int safe_open(const char* pathname, int flags) {
   if (pathname == NULL || strlen(pathname) == 0 || pathname[0] == '\0') {
-    /* error? */
+    errno = EINVAL;
+    perror("safe_open (args)");
     return OPEN_ERROR;
   }