aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2021-01-28 20:06:11 +0100
committerAndreas Schneider <asn@samba.org>2021-01-28 20:06:11 +0100
commit83771a93ac17f06e61d9d83dbfefdfcc06b5bfba (patch)
tree7b086242ae8fd5199064633841115e4eed51640f
parent8815dd3965bcc858cf6efca09773a5345d95b20d (diff)
downloadsocket_wrapper-metze-fork-mutex-fixes.tar.gz
socket_wrapper-metze-fork-mutex-fixes.tar.xz
socket_wrapper-metze-fork-mutex-fixes.zip
src/socket_wrapper.c: Improve checks and debug output of socket_wrapper_dir()metze-fork-mutex-fixes
Signed-off-by: Andreas Schneider <asn@samba.org>
-rw-r--r--src/socket_wrapper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 78cf711..89454ca 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1475,7 +1475,7 @@ static char *socket_wrapper_dir(void)
char *t;
bool ok;
- if (s == NULL) {
+ if (s == NULL || s[0] == '\0') {
SWRAP_LOG(SWRAP_LOG_WARN, "SOCKET_WRAPPER_DIR not set");
return NULL;
}
@@ -1483,7 +1483,8 @@ static char *socket_wrapper_dir(void)
swrap_dir = realpath(s, NULL);
if (swrap_dir == NULL) {
SWRAP_LOG(SWRAP_LOG_ERROR,
- "Unable to resolve socket_wrapper dir path: %s",
+ "Unable to resolve socket_wrapper dir path: %s - %s",
+ s,
strerror(errno));
abort();
}