From eea14dc275d4393400b545b84249ae5341922da4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 25 Oct 2014 12:02:02 +0100 Subject: [PATCH] authbind: Better logging of authbind failures Report the address and the authbind helper pathname. Signed-off-by: Ian Jackson --- udp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/udp.c b/udp.c index 70928a8..a2bb907 100644 --- a/udp.c +++ b/udp.c @@ -283,6 +283,9 @@ bool_t udp_make_socket(struct udpcommon *uc, struct udpsock *us, if (uc->authbind) { pid_t c; int status; + char desc[200]; + snprintf(desc,sizeof(desc),"authbind for %s: %s", + iaddr_to_string(addr), uc->authbind); /* XXX this fork() and waitpid() business needs to be hidden in some system-specific library functions. */ @@ -332,10 +335,10 @@ bool_t udp_make_socket(struct udpcommon *uc, struct udpsock *us, if (WIFEXITED(status) && WEXITSTATUS(status)<127) { int es=WEXITSTATUS(status); lg_perror(FAIL_LG,es, - "authbind exited with error exit status %d;" - " indicates error",es); + "%s exited with error exit status %d;" + " indicates error",desc,es); } else { - lg_exitstatus(FAIL_LG,status,"authbind"); + lg_exitstatus(FAIL_LG,status,desc); } goto failed; } -- 2.30.2