* [LEMONLDAP-491] Don't import all POSIX functions
This commit is contained in:
parent
333f7d6750
commit
b9a20c3995
|
@ -4,12 +4,12 @@
|
||||||
package Lemonldap::NG::Handler::Status;
|
package Lemonldap::NG::Handler::Status;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use POSIX;
|
use POSIX qw(setuid setgid);
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
#inherits Cache::Cache
|
#inherits Cache::Cache
|
||||||
|
|
||||||
our $VERSION = '1.2.0';
|
our $VERSION = '1.2.2';
|
||||||
|
|
||||||
our $status = {};
|
our $status = {};
|
||||||
our $activity = [];
|
our $activity = [];
|
||||||
|
@ -99,8 +99,8 @@ sub portalTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
POSIX::setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] );
|
setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] );
|
||||||
POSIX::setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] );
|
setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] );
|
||||||
};
|
};
|
||||||
|
|
||||||
## @rfn void run(string localStorage, hashRef localStorageOptions)
|
## @rfn void run(string localStorage, hashRef localStorageOptions)
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
use Lemonldap::NG::Common::Conf;
|
use Lemonldap::NG::Common::Conf;
|
||||||
use Lemonldap::NG::Common::Conf::Constants;
|
use Lemonldap::NG::Common::Conf::Constants;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use POSIX;
|
use POSIX qw(setuid setgid);
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
POSIX::setgid( ( getgrnam('__APACHEGROUP__') )[2] );
|
setgid( ( getgrnam('__APACHEGROUP__') )[2] );
|
||||||
POSIX::setuid( ( getpwnam('__APACHEUSER__') )[2] );
|
setuid( ( getpwnam('__APACHEUSER__') )[2] );
|
||||||
print STDERR "Running as uid $> and gid $)\n";
|
print STDERR "Running as uid $> and gid $)\n";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@ package Lemonldap::NG::Portal::MailReset;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
our $VERSION = '1.2.1';
|
our $VERSION = '1.2.2';
|
||||||
|
|
||||||
use Lemonldap::NG::Portal::Simple qw(:all);
|
use Lemonldap::NG::Portal::Simple qw(:all);
|
||||||
use base qw(Lemonldap::NG::Portal::SharedConf Exporter);
|
use base qw(Lemonldap::NG::Portal::SharedConf Exporter);
|
||||||
use HTML::Template;
|
use HTML::Template;
|
||||||
use Encode;
|
use Encode;
|
||||||
use POSIX;
|
use POSIX qw(strftime);
|
||||||
|
|
||||||
#inherits Lemonldap::NG::Portal::_SMTP
|
#inherits Lemonldap::NG::Portal::_SMTP
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@ sub sendConfirmationMail {
|
||||||
$self->lmLog( "Mail expiration timestamp: $expTimestamp", 'debug' );
|
$self->lmLog( "Mail expiration timestamp: $expTimestamp", 'debug' );
|
||||||
|
|
||||||
$self->{expMailDate} =
|
$self->{expMailDate} =
|
||||||
&POSIX::strftime( "%d/%m/%Y", localtime $expTimestamp );
|
strftime( "%d/%m/%Y", localtime $expTimestamp );
|
||||||
$self->{expMailTime} = &POSIX::strftime( "%H:%M", localtime $expTimestamp );
|
$self->{expMailTime} = strftime( "%H:%M", localtime $expTimestamp );
|
||||||
|
|
||||||
# Mail session start date
|
# Mail session start date
|
||||||
my $startTimestamp = $self->{mailSessionStartTimestamp};
|
my $startTimestamp = $self->{mailSessionStartTimestamp};
|
||||||
|
@ -234,9 +234,9 @@ sub sendConfirmationMail {
|
||||||
$self->lmLog( "Mail start timestamp: $startTimestamp", 'debug' );
|
$self->lmLog( "Mail start timestamp: $startTimestamp", 'debug' );
|
||||||
|
|
||||||
$self->{startMailDate} =
|
$self->{startMailDate} =
|
||||||
&POSIX::strftime( "%d/%m/%Y", localtime $startTimestamp );
|
strftime( "%d/%m/%Y", localtime $startTimestamp );
|
||||||
$self->{startMailTime} =
|
$self->{startMailTime} =
|
||||||
&POSIX::strftime( "%H:%M", localtime $startTimestamp );
|
strftime( "%H:%M", localtime $startTimestamp );
|
||||||
|
|
||||||
# Ask if user want another confirmation email
|
# Ask if user want another confirmation email
|
||||||
if ( $self->{mail_already_sent} and !$self->param('resendconfirmation') ) {
|
if ( $self->{mail_already_sent} and !$self->param('resendconfirmation') ) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ use MIME::Base64;
|
||||||
use String::Random;
|
use String::Random;
|
||||||
use LWP::UserAgent; # SOAP call
|
use LWP::UserAgent; # SOAP call
|
||||||
use HTTP::Request; # SOAP call
|
use HTTP::Request; # SOAP call
|
||||||
use POSIX; # Convert SAML2 date into timestamp
|
use POSIX qw(strftime); # Convert SAML2 date into timestamp
|
||||||
use Time::Local; # Convert SAML2 date into timestamp
|
use Time::Local; # Convert SAML2 date into timestamp
|
||||||
use Encode; # Encode attribute values
|
use Encode; # Encode attribute values
|
||||||
use URI; # Get metadata URL path
|
use URI; # Get metadata URL path
|
||||||
|
@ -20,7 +20,7 @@ use URI; # Get metadata URL path
|
||||||
# Special comments for doxygen
|
# Special comments for doxygen
|
||||||
#inherits Lemonldap::NG::Common::Conf::SAML::Metadata protected service_metadata
|
#inherits Lemonldap::NG::Common::Conf::SAML::Metadata protected service_metadata
|
||||||
|
|
||||||
our $VERSION = '1.2.0';
|
our $VERSION = '1.2.2';
|
||||||
our $samlCache;
|
our $samlCache;
|
||||||
our $initGlibDone;
|
our $initGlibDone;
|
||||||
|
|
||||||
|
@ -2272,7 +2272,7 @@ sub timestamp2samldate {
|
||||||
my ( $self, $timestamp ) = splice @_;
|
my ( $self, $timestamp ) = splice @_;
|
||||||
|
|
||||||
my @t = gmtime($timestamp);
|
my @t = gmtime($timestamp);
|
||||||
my $samldate = POSIX::strftime( "%Y-%m-%dT%TZ", @t );
|
my $samldate = strftime( "%Y-%m-%dT%TZ", @t );
|
||||||
|
|
||||||
$self->lmLog( "Convert timestamp $timestamp in SAML2 date: $samldate",
|
$self->lmLog( "Convert timestamp $timestamp in SAML2 date: $samldate",
|
||||||
'debug' );
|
'debug' );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user