summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-07-27 00:09:58 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-07-27 00:09:58 (GMT)
commitdaea40c7c56d8654a8b1316eddf4d1df9a55589e (patch)
tree87f6cd6dfbfee62afc2578c68e3ec6280a4b7ff7
parentd6c6cac6b1dd60b19e65c499fd09970222e462ec (diff)
fixed return code of rd-user check
-rwxr-xr-xutils/rd-user2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/rd-user b/utils/rd-user
index 22a41ec..520a653 100755
--- a/utils/rd-user
+++ b/utils/rd-user
@@ -44,6 +44,8 @@ if(defined $dbh) {
if($cmd eq "check") {
(my $result, my $status, $errorstring) = RHRD::rddb::check_user($dbh, $username);
print "$result, $status: $errorstring\n";
+ RHRD::rddb::closedb($dbh);
+ exit $result;
} elsif($cmd eq "add") {
my $token = mkpasswd(-length => 16, -minnum => 3, -minupper => 3, -minspecial => 2);
(my $cnt, undef, $errorstring) = RHRD::rddb::add_user($dbh, $username, $token);