From 782c9989fba6332e28f25187da8d623bddaab466 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 8 Nov 2018 11:31:49 -0800 Subject: [PATCH] better debugging for htpasswd failure, RT#78179 --- FS/FS/access_user.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/FS/FS/access_user.pm b/FS/FS/access_user.pm index 9f4c34ddb..70cef4a6a 100644 --- a/FS/FS/access_user.pm +++ b/FS/FS/access_user.pm @@ -149,7 +149,16 @@ sub htpasswd_kludge { { return ''; } else { - return 'htpasswd exited unsucessfully'; + + if ($? == -1) { + return "htpasswd failed to execute: $!"; + } elsif ($? & 127) { + return sprintf("htpasswd died with signal %d, %s coredump", + ($? & 127), ($? & 128) ? 'with' : 'without' ); + } else { + return sprintf("htpasswd exited with value %d", $? >> 8 ); + } + } } -- 2.11.0