summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-11-08 11:31:49 -0800
committerIvan Kohler <ivan@freeside.biz>2018-11-08 11:31:49 -0800
commit782c9989fba6332e28f25187da8d623bddaab466 (patch)
treef039cfbf9dfa858039d3d9ebfb07f33008942394
parent495d70ed4f160e6c7ef4e9adce066bcbbc85bfef (diff)
better debugging for htpasswd failure, RT#78179
-rw-r--r--FS/FS/access_user.pm11
1 files changed, 10 insertions, 1 deletions
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 );
+ }
+
}
}