summaryrefslogtreecommitdiffstats
path: root/satellit_installer
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-14 17:24:13 +0100
committerSimon Rettberg2016-01-14 17:24:13 +0100
commit68195fadf691405cace5bb3ca1a5f2ee0f6978c6 (patch)
treeba0991eff86382a454426649f632a15a7606c716 /satellit_installer
parent[SSPS] mysql: Grant DROP, CREATE, ALTER to sat user on sat db (diff)
downloadsetup-scripts-68195fadf691405cace5bb3ca1a5f2ee0f6978c6.tar.gz
setup-scripts-68195fadf691405cace5bb3ca1a5f2ee0f6978c6.tar.xz
setup-scripts-68195fadf691405cace5bb3ca1a5f2ee0f6978c6.zip
[SSPS] Grant sat user SELECT on openslx.location
Diffstat (limited to 'satellit_installer')
-rw-r--r--satellit_installer/includes/10-handle_mysql.inc2
-rw-r--r--satellit_installer/includes/50-add_mysql_dbs_users.inc3
2 files changed, 3 insertions, 2 deletions
diff --git a/satellit_installer/includes/10-handle_mysql.inc b/satellit_installer/includes/10-handle_mysql.inc
index 1038892..b072c5a 100644
--- a/satellit_installer/includes/10-handle_mysql.inc
+++ b/satellit_installer/includes/10-handle_mysql.inc
@@ -43,7 +43,7 @@ mysql_add_privs() {
# $1=user, $2=database, $3=privileges
echo "# Adding privileges $3 for user $1 on database $2..."
mysql -u root -p"$MYSQL_ROOT_PASS" <<-CMDS
- GRANT $3 ON $2.* TO '$1'@'localhost';
+ GRANT $3 ON $2 TO '$1'@'localhost';
CMDS
ERR=$?
diff --git a/satellit_installer/includes/50-add_mysql_dbs_users.inc b/satellit_installer/includes/50-add_mysql_dbs_users.inc
index 75116f6..b07d9d4 100644
--- a/satellit_installer/includes/50-add_mysql_dbs_users.inc
+++ b/satellit_installer/includes/50-add_mysql_dbs_users.inc
@@ -7,7 +7,8 @@ add_mysql_dbs_users() {
mysql_add_user sat sat "DELETE, INSERT, SELECT, UPDATE, ALTER, CREATE, DROP" "$MYSQL_SAT_PASS"
mysql_add_user openslx openslx ALL "$MYSQL_OPENSLX_PASS"
# $1=user, $2=database, $3=privileges
- mysql_add_privs openslx sat ALL
+ mysql_add_privs "openslx" "sat.*" "ALL"
+ mysql_add_privs "sat" "openslx.location" "SELECT"
# $1=sql-dumpfile, $2=database
mysql_import_dump "$BASEDIR/static_files/db_sat_dump.sql" sat