forked from pool/warewulf
- Fix minor issues:
* vnfs-SUSE-Templates-Leap-15.1-Leap-15.3-added-SLE-15.patch
Add templates for Leap 15.3 and SLE 15 (all SPs).
* common-Check-for-non-empty-string-before-chomp.patch
Avoid Perl error message by checking for non-empty string
before chomp().
* common-Create-database-user-separately-to-allow-empty-password.patch
Allow empty password for read only user database access.
* common-Fix-help-text.patch
* cluster-Don-t-attempt-ntp-configuration-when-chrony-is-found.patch
Do not attempt to configure ntp when chrony is found.
* cluster-If-hostname-doesn-t-contain-the-domain-try-to-derive-this-from-FQDN.patch
Attempt to derive hostname from FQDN.
* Set apache2moddir correctly
* Set warewulf group in perl-warewulf-common, not warewulf-common:
perl-warewulf-common is installed earlier.
- Removed:
* vnfs-wwmkchroot-opensuse-15.0.tmpl
OBS-URL: https://build.opensuse.org/request/show/923420
OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf?expand=0&rev=10
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From: Egbert Eich <eich@suse.com>
|
|
Date: Mon Oct 4 19:49:16 2021 +0200
|
|
Subject: common: Create database user separately to allow empty password
|
|
Patch-mainline: Not yet
|
|
Git-commit: 3e87929be4b49584a9a3d5c51ef5eb2dc2d1792a
|
|
References:
|
|
|
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
|
---
|
|
common/libexec/wwinit/10-database.init | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
diff --git a/common/libexec/wwinit/10-database.init b/common/libexec/wwinit/10-database.init
|
|
index 5d0626b..c58c5c0 100644
|
|
--- a/common/libexec/wwinit/10-database.init
|
|
+++ b/common/libexec/wwinit/10-database.init
|
|
@@ -183,10 +183,14 @@ if [ "$DATASTORE" = "mysql" ]; then
|
|
fi
|
|
|
|
if [ -n "$DBUSER" ] && [ "$DBUSER" != "root" ]; then
|
|
- wwprint "Updating database permissions for base user"
|
|
+ wwprint "Creating base user if it doesn't exist"
|
|
wwrun mysql $CLI_ARGS $DBNAME <<- END_OF_SQL
|
|
- GRANT SELECT on $DBNAME.*
|
|
- TO '$DBUSER'@'$DBCLIENT' IDENTIFIED BY '$DBPASS'
|
|
+ CREATE USER if not exists '$DBUSER'@'$DBCLIENT';
|
|
+ END_OF_SQL
|
|
+ wwprint "Updating database permissions for base user"
|
|
+ wwrun mysql $CLI_ARGS $DBNAME <<- END_OF_SQL
|
|
+ GRANT SELECT on $DBNAME.*
|
|
+ TO '$DBUSER'@'$DBCLIENT' IDENTIFIED BY '$DBPASS'
|
|
END_OF_SQL
|
|
fi
|
|
|