gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: -fix permissions on _v


From: gnunet
Subject: [libeufin] branch master updated: -fix permissions on _v
Date: Thu, 30 Nov 2023 07:41:29 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 082716f4 -fix permissions on _v
082716f4 is described below

commit 082716f407eb9306d1cfa2cc3702e5b9ca9be2e3
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Thu Nov 30 15:41:21 2023 +0900

    -fix permissions on _v
---
 contrib/libeufin-bank-dbconfig  | 2 +-
 contrib/libeufin-nexus-dbconfig | 2 +-
 util/src/main/kotlin/DB.kt      | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/libeufin-bank-dbconfig b/contrib/libeufin-bank-dbconfig
index 6da99f66..b916b734 100755
--- a/contrib/libeufin-bank-dbconfig
+++ b/contrib/libeufin-bank-dbconfig
@@ -105,7 +105,7 @@ then
            echo "Failed to grant access to database '$DBNAME' to '$DBUSER'." 
1>&2
            exit 1
        fi
-       if ! echo "GRANT ALL PRIVILEGES ON SCHEMA _v TO \"$DBUSER\"" \
+       if ! echo "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA _v TO 
\"$DBUSER\"" \
                | sudo -i -u postgres psql "$DBNAME"
        then
            echo "Failed to grant access to schema '_v' to '$DBUSER'. Maybe OK 
if it does not exist. Will continue." 1>&2
diff --git a/contrib/libeufin-nexus-dbconfig b/contrib/libeufin-nexus-dbconfig
index 4ff5472a..c8151564 100755
--- a/contrib/libeufin-nexus-dbconfig
+++ b/contrib/libeufin-nexus-dbconfig
@@ -104,7 +104,7 @@ then
            echo "Failed to grant access to database '$DBNAME' to '$DBUSER'." 
1>&2
            exit 1
        fi
-       if ! echo "GRANT ALL PRIVILEGES ON SCHEMA _v TO \"$DBUSER\"" \
+       if ! echo "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA _v TO 
\"$DBUSER\"" \
                | sudo -i -u postgres psql "$DBNAME"
        then
            echo "Failed to grant access to schema '_v' to '$DBUSER'. Maybe OK 
if it does not exist. Will continue." 1>&2
diff --git a/util/src/main/kotlin/DB.kt b/util/src/main/kotlin/DB.kt
index 830832b6..f3ed575c 100644
--- a/util/src/main/kotlin/DB.kt
+++ b/util/src/main/kotlin/DB.kt
@@ -201,6 +201,8 @@ fun initializeDatabaseTables(cfg: DatabaseConfig, 
sqlFilePrefix: String) {
            try {
                conn.execSQLUpdate(sqlVersioning)
             } catch (e: SQLException) {}
+       }
+        conn.transaction {
             val checkStmt = conn.prepareStatement("SELECT count(*) as n FROM 
_v.patches where patch_name = ?")
 
             for (n in 1..9999) {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]