From: rettenbe Date: Fri, 12 Sep 2008 12:19:37 +0000 (+0000) Subject: update: databases will be created with root:adm 640 permissions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=06309a31075c2115ced1f68d46f154ab227a36b9;p=gosa.git update: databases will be created with root:adm 640 permissions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12448 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index f2f26ada8..8848ebef7 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -101,6 +101,9 @@ our $forground; our $cfg_file; our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn); our $known_modules; +our $root_uid; +our $adm_gid; + # specifies the verbosity of the daemon_log $verbose = 0 ; @@ -3135,8 +3138,8 @@ if ($server_headURL =~ /\/tag\// || } # Prepare log file -my $root_uid = getpwnam('root'); -my $adm_gid = getgrnam('adm'); +$root_uid = getpwnam('root'); +$adm_gid = getgrnam('adm'); chmod(0640, $log_file); chown($root_uid, $adm_gid, $log_file); diff --git a/gosa-si/modules/DBsqlite.pm b/gosa-si/modules/DBsqlite.pm index 3505dbb68..3b702376a 100644 --- a/gosa-si/modules/DBsqlite.pm +++ b/gosa-si/modules/DBsqlite.pm @@ -23,11 +23,14 @@ sub new { } my $self = {dbh=>undef,db_name=>undef,db_lock=>undef,db_lock_handle=>undef}; my $dbh = DBI->connect("dbi:SQLite:dbname=$db_name", "", "", {RaiseError => 1, AutoCommit => 1}); + chmod(0640, $db_name); + chown($main::root_uid, $main::adm_gid, $db_name); + $self->{dbh} = $dbh; $self->{db_name} = $db_name; $self->{db_lock} = $lock; - bless($self,$class); + bless($self,$class); return($self); }