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

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

parent 8832955c
...@@ -418,8 +418,6 @@ sub SetDBs(@) ...@@ -418,8 +418,6 @@ sub SetDBs(@)
DBQueryFatal("delete from db where User='$uid' and Db='$db'") DBQueryFatal("delete from db where User='$uid' and Db='$db'")
or return -1; or return -1;
} }
DBQueryFatal("flush privileges")
or return -1;
# Then do additions. # Then do additions.
foreach my $db (keys(%newglist)) { foreach my $db (keys(%newglist)) {
...@@ -440,9 +438,9 @@ sub SetDBs(@) ...@@ -440,9 +438,9 @@ sub SetDBs(@)
DBQueryFatal("grant all on `${db}`.* to '$uid'\@'%.${OURDOMAIN}'") DBQueryFatal("grant all on `${db}`.* to '$uid'\@'%.${OURDOMAIN}'")
or return -1; or return -1;
} }
DBQueryFatal("flush privileges")
or return -1;
} }
DBQueryFatal("flush privileges")
or return -1;
return 0; 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