burgergold 5$? va chez l'diable! | J'ai la structure suivante:
Appel de httpd_cops::Identification
Dans lequel j'appel $self->ServerRoot ($self étant un bless de mon httpd_cops::Identification)
Dans lequel j'aimerais bien faire un find, avec en utilisant la fonction httpd_cops::Identification::ServerRoot::files_owner
1: find a pas l'air à aimer, il demande un CODE reference
2: j'ai pas l'air d'être en mesure d'apperler mon httpd_cops::Identification::ServerRoot::files_owner à l'aide de $self
merci
Code :
- ########################################
- # Fonction:
- # Description: 1. Identification
- # Date du dernier changement:
- # Utilisé dans:
- ########################################
- sub httpd_cops::Identification {
- my $self = {};
- bless($self, "httpd_cops::Identification" );
- switch: {
- if ($config->SERVER =~ m/apache/i) {
- ################
- # Web Server ID
- ################
- $self->system_administrator;
- $self->system_privileges;
- $self->ServerRoot;
- $self->DocumentRoot;
- $self->Configuration_files;
- last switch;
- }
- if ($config->server =~ m/domino/i) {
- ################
- # Web Server ID
- ################
- $self->system_administrator;
- $self->system_privileges;
- $self->UserID;
- ################
- last switch;
- }
- }
- }
- ########################################
- # Fonction:
- # Description:
- # Date du dernier changement:
- # Utilisé dans:
- ########################################
- sub httpd_cops::Identification::ServerRoot {
- my $self = shift;
- ##########
- # Make the ServerRoot and everything under it owned by the webserver administrator group
- find (\$self->files_owner, $httpd_conf->ServerRoot);
- ##########
- ##########
- # Never give read/write access to documents in the ServerRoot to the webserver userid
- find (\$self->webserver_no_readwrite, $httpd_conf->ServerRoot);
- ##########
- ##########
- # ServerRoot should allow the webserver administrator group read/write access
- find (\$self->administrator_readwrite, $httpd_conf->ServerRoot);
- ##########
- }
- ########################################
- # Fonction:
- # Description:
- # Date du dernier changement:
- # Utilisé dans:
- ########################################
- sub httpd_cops::Identification::ServerRoot::files_owner {
- my $file = Security::File(file => $File::Find::name);
- if (! -l $file->name && $file->group ne $config->WEBSERVER_ADMIN && $file->group ne $config->CONTENT_WEBMASTER) {
- push(@report, "1.1 Make the ServerRoot and everything under it owned by the webserver administrator group." . " " . $file->name);
- }
- }
|
|