From 5c69615674a9412ccae9208d67a9f40a6f237881 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 12 Sep 2008 12:46:57 +0000 Subject: [PATCH] bugfix: change file permission git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12451 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 19 +++++++++++++++++++ gosa-si/modules/DBsqlite.pm | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 9f997111e..2f86fb45e 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -3157,42 +3157,61 @@ $incoming_db->create_table($incoming_tn, \@incoming_col_names); # connect to gosa-si job queue $job_db = GOSA::DBsqlite->new($job_queue_file_name); $job_db->create_table($job_queue_tn, \@job_queue_col_names); +chmod(0640, $job_queue_file_name); +chown($root_uid, $adm_gid, $job_queue_file_name); + # connect to known_clients_db $known_clients_db = GOSA::DBsqlite->new($known_clients_file_name); $known_clients_db->create_table($known_clients_tn, \@known_clients_col_names); +chmod(0640, $known_clients_file_name); +chown($root_uid, $adm_gid, $known_clients_file_name); # connect to foreign_clients_db $foreign_clients_db = GOSA::DBsqlite->new($foreign_clients_file_name); $foreign_clients_db->create_table($foreign_clients_tn, \@foreign_clients_col_names); +chmod(0640, $foreign_clients_file_name); +chown($root_uid, $adm_gid, $foreign_clients_file_name); # connect to known_server_db unlink($known_server_file_name); $known_server_db = GOSA::DBsqlite->new($known_server_file_name); $known_server_db->create_table($known_server_tn, \@known_server_col_names); +chmod(0640, $known_server_file_name); +chown($root_uid, $adm_gid, $known_server_file_name); # connect to login_usr_db $login_users_db = GOSA::DBsqlite->new($login_users_file_name); $login_users_db->create_table($login_users_tn, \@login_users_col_names); +chmod(0640, $login_users_file_name); +chown($root_uid, $adm_gid, $login_users_file_name); # connect to fai_server_db and fai_release_db unlink($fai_server_file_name); $fai_server_db = GOSA::DBsqlite->new($fai_server_file_name); $fai_server_db->create_table($fai_server_tn, \@fai_server_col_names); +chmod(0640, $fai_server_file_name); +chown($root_uid, $adm_gid, $fai_server_file_name); unlink($fai_release_file_name); $fai_release_db = GOSA::DBsqlite->new($fai_release_file_name); $fai_release_db->create_table($fai_release_tn, \@fai_release_col_names); +chmod(0640, $fai_release_file_name); +chown($root_uid, $adm_gid, $fai_release_file_name); # connect to packages_list_db #unlink($packages_list_file_name); unlink($packages_list_under_construction); $packages_list_db = GOSA::DBsqlite->new($packages_list_file_name); $packages_list_db->create_table($packages_list_tn, \@packages_list_col_names); +chmod(0640, $packages_list_file_name); +chown($root_uid, $adm_gid, $packages_list_file_name); # connect to messaging_db $messaging_db = GOSA::DBsqlite->new($messaging_file_name); $messaging_db->create_table($messaging_tn, \@messaging_col_names); +chmod(0640, $messaging_file_name); +chown($root_uid, $adm_gid, $messaging_file_name); # create xml object used for en/decrypting diff --git a/gosa-si/modules/DBsqlite.pm b/gosa-si/modules/DBsqlite.pm index 3b702376a..a571a7bb6 100644 --- a/gosa-si/modules/DBsqlite.pm +++ b/gosa-si/modules/DBsqlite.pm @@ -23,9 +23,6 @@ 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; -- 2.30.2