-Prevent sqlite databases from being accessible by non-root users
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2609 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f60a7dcf6b
commit
e5c3267933
@ -236,10 +236,12 @@ sub new
|
||||
$self->{connstring} =~ s/^/dbi:/;
|
||||
#return undef;
|
||||
}
|
||||
my $oldumask= umask 0077;
|
||||
unless ($::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{autocommit}}) { #= $self->{tabname};
|
||||
$::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{autocommit}} =
|
||||
DBI->connect($self->{connstring}, $self->{dbuser}, $self->{dbpass}, {AutoCommit => $self->{autocommit}});
|
||||
}
|
||||
umask $oldumask;
|
||||
|
||||
$self->{dbh} = $::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{autocommit}};
|
||||
#DBI->connect($self->{connstring}, $self->{dbuser}, $self->{dbpass}, {AutoCommit => $autocommit});
|
||||
|
Loading…
Reference in New Issue
Block a user