From aabb5d1781654f694fdec399d342aa52c3dc21c5 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Fri, 13 May 2016 14:58:14 +0200 Subject: [PATCH] revoke any privileges for unknown users from created database --- .../src/de/hsadmin/mods/db/PgSqlDatabaseProcessorFactory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hsarback/src/de/hsadmin/mods/db/PgSqlDatabaseProcessorFactory.java b/hsarback/src/de/hsadmin/mods/db/PgSqlDatabaseProcessorFactory.java index a4a650f..4460c8b 100644 --- a/hsarback/src/de/hsadmin/mods/db/PgSqlDatabaseProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/db/PgSqlDatabaseProcessorFactory.java @@ -27,6 +27,7 @@ public class PgSqlDatabaseProcessorFactory implements EntityProcessorFactory { String aEncoding = AbstractEntity.escapeString(db.getEncoding()); aJDBCP = createPostgreSqlAdminProcessor(); aJDBCP.addSQL("CREATE DATABASE " + aName + " OWNER=" + aOwner + " ENCODING='" + aEncoding + "' TEMPLATE template0"); + aJDBCP.addSQL("REVOKE ALL ON DATABASE " + aName + " FROM public"); return aJDBCP; }