Commit b8c6c2a1 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Move "flush privs" out of the loop and do just once!

parent 8832955c
......@@ -418,8 +418,6 @@ sub SetDBs(@)
DBQueryFatal("delete from db where User='$uid' and Db='$db'")
or return -1;
}
DBQueryFatal("flush privileges")
or return -1;
# Then do additions.
foreach my $db (keys(%newglist)) {
......@@ -440,9 +438,9 @@ sub SetDBs(@)
DBQueryFatal("grant all on `${db}`.* to '$uid'\@'%.${OURDOMAIN}'")
or return -1;
}
DBQueryFatal("flush privileges")
or return -1;
}
DBQueryFatal("flush privileges")
or return -1;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment