From f785b1da4fcfab5410a7aebacf6d6327176d58fa Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 26 Feb 2018 13:13:56 -0500 Subject: [PATCH] libadacl: improve safe_open() error message when given bad args. --- src/libadacl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libadacl.c b/src/libadacl.c index 69f2073..1fb54a8 100644 --- a/src/libadacl.c +++ b/src/libadacl.c @@ -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; } -- 2.44.2