HCoop
/
hcoop
/
domtool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d505bba
)
mysql: revoke permissions when dropping database
master
release
release_20211106-1
author
Clinton Ebadi
<clinton@unknownlamer.org>
Sat, 6 Nov 2021 19:29:31 +0000
(15:29 -0400)
committer
Clinton Ebadi
<clinton@unknownlamer.org>
Sat, 6 Nov 2021 19:29:31 +0000
(15:29 -0400)
Grants are not automatically deleted. Also have to explicitly revoke
grant option or a "USAGE WITH GRANT OPTION" grant is left behind.
src/plugins/domtool-mysql
patch
|
blob
|
blame
|
history
diff --git
a/src/plugins/domtool-mysql
b/src/plugins/domtool-mysql
index
0d1710e
..
4e549e6
100755
(executable)
--- a/
src/plugins/domtool-mysql
+++ b/
src/plugins/domtool-mysql
@@
-42,7
+42,10
@@
case $1 in
DBNAME_BASE=$3
DBNAME="${USERNAME}_${DBNAME_BASE}"
+ sudo -H mysql -e "REVOKE ALL ON TABLE * FROM '$USERNAME'@$WHERE;" $DBNAME
+ sudo -H mysql -e "REVOKE GRANT OPTION ON TABLE * FROM '$USERNAME'@$WHERE;" $DBNAME
sudo -H mysql -e "DROP DATABASE $DBNAME;"
+
;;
grant)