diff --git a/hsarback/src/de/hsadmin/core/qserv/CommandShell.java b/hsarback/src/de/hsadmin/core/qserv/CommandShell.java index 273dea9..c57bb56 100644 --- a/hsarback/src/de/hsadmin/core/qserv/CommandShell.java +++ b/hsarback/src/de/hsadmin/core/qserv/CommandShell.java @@ -9,9 +9,9 @@ import java.io.PrintWriter; public class CommandShell { - private static boolean bExecute = true; // really execute or just store command and stdin? - private static String executedCommands; // stored command and stdin - private static String[] aEnvironment; // stored environment + private static boolean bExecute = true; // really execute or just store command and stdin? + private static String executedCommands; // stored command and stdin + private static String[] aEnvironment; // stored environment /** Set mode of real execution or just storing the command and stdin. * diff --git a/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java b/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java index bda2283..bd01f0d 100644 --- a/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java @@ -50,10 +50,10 @@ public class MySqlDatabaseProcessorFactory implements EntityProcessorFactory { String aName = AbstractEntity.escapeString( db.getName() ); String aOwner = AbstractEntity.escapeString( db.getOwner() ); - String aEncoding = AbstractEntity.escapeString( db.getSystemEncoding() ); +// String aEncoding = AbstractEntity.escapeString( db.getSystemEncoding() ); JDBCProcessor aJDBCP = null; aJDBCP = createMySqlAdminProcessor(); - aJDBCP.addSQL( "ALTER DATABASE " + aName + " DEFAULT CHARACTER SET '" + aEncoding + "'" ); +// aJDBCP.addSQL( "ALTER DATABASE " + aName + " DEFAULT CHARACTER SET '" + aEncoding + "'" ); aJDBCP.addSQL( "GRANT ALL ON " + aName + ".* TO '" + aOwner + "'@'%'" ); // TODO: alte Admin-Rechte entziehen return aJDBCP; diff --git a/hsarback/src/de/hsadmin/mods/email/EMailAddress.java b/hsarback/src/de/hsadmin/mods/email/EMailAddress.java index 5c3cd0c..4e8434e 100644 --- a/hsarback/src/de/hsadmin/mods/email/EMailAddress.java +++ b/hsarback/src/de/hsadmin/mods/email/EMailAddress.java @@ -55,7 +55,7 @@ public class EMailAddress extends AbstractEntity implements Serializable { @JoinColumn(name = "domain_id", columnDefinition = "integer", updatable = false) private Domain domain; - @FieldValidation("[a-zA-Z0-9\\_\\-\\.\\|\\\"\\/\\@\\,\\+\\ ]*") + @FieldValidation("[\\x20-\\x7E]*") @Column(name = "target", nullable= false) private String target; diff --git a/hsarback/src/de/hsadmin/mods/email/EMailAlias.java b/hsarback/src/de/hsadmin/mods/email/EMailAlias.java index 21cfecb..da9b01d 100644 --- a/hsarback/src/de/hsadmin/mods/email/EMailAlias.java +++ b/hsarback/src/de/hsadmin/mods/email/EMailAlias.java @@ -50,7 +50,7 @@ public class EMailAlias extends AbstractEntity implements Serializable { @Column(updatable=false) private String name; - @FieldValidation("[a-zA-Z0-9\\_\\-\\.\\|\\\"\\/\\@\\,\\+\\ ]*") + @FieldValidation("[\\x20-\\x7E]*") @Column private String target; diff --git a/hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java b/hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java index 2fe09a4..f0137aa 100644 --- a/hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java +++ b/hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java @@ -225,14 +225,9 @@ public class UnixUserModuleImpl extends AbstractModuleImpl { // throws an AuthorisationException if the login user has no write acess // on the pac of the given UnixUser private boolean hasFullAccessOnPacOf(UnixUser user) { - // only pac admins (same name as pac) and the owner (customer) have - // write access to the pac - boolean isPacAdmin = getLoginUser().getName().equals( - user.getPac().getName()); - boolean isCustomer = getLoginUser().getName().equals( - user.getPac().getCustomer().getName()); - boolean isHostmaster = getLoginUser().hasHostmasterRole(); - return isPacAdmin || isCustomer || isHostmaster; + return getLoginUser().hasHostmasterRole() + || getLoginUser().getName().equals(user.getPac().getName()) + || getLoginUser().getName().equals(user.getPac().getCustomer().getName()); } // throws an AuthorisationException if the login user has no write acess diff --git a/hsarback/webapp/META-INF/context.xml b/hsarback/webapp/META-INF/context.xml index 4c33059..d2b7320 100644 --- a/hsarback/webapp/META-INF/context.xml +++ b/hsarback/webapp/META-INF/context.xml @@ -11,8 +11,88 @@ type="javax.jms.QueueConnectionFactory"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +