summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);