Harden directory statefile permissions
This commit is contained in:
parent
c4c30c6a92
commit
3b7c45179a
|
@ -148,9 +148,9 @@ sub read {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! -e $self->{statefile_dir} . "/" . $self->{statefile}) {
|
if (! -e $self->{statefile_dir} . "/" . $self->{statefile}) {
|
||||||
if (! -w $self->{statefile_dir}) {
|
if (! -w $self->{statefile_dir} || ! -x $self->{statefile_dir}) {
|
||||||
$self->error(1);
|
$self->error(1);
|
||||||
$self->{output}->add_option_msg(short_msg => "Cannot write statefile '" . $self->{statefile_dir} . "/" . $self->{statefile} . "'. Need write permissions on directory.");
|
$self->{output}->add_option_msg(short_msg => "Cannot write statefile '" . $self->{statefile_dir} . "/" . $self->{statefile} . "'. Need write/exec permissions on directory.");
|
||||||
if ($self->{no_quit} == 0) {
|
if ($self->{no_quit} == 0) {
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue