diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm index fef3c77c0..bdc32a97f 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm @@ -4,12 +4,12 @@ package Lemonldap::NG::Handler::Status; use strict; -use POSIX; +use POSIX qw(setuid setgid); use Data::Dumper; #inherits Cache::Cache -our $VERSION = '1.2.0'; +our $VERSION = '1.2.2'; our $status = {}; our $activity = []; @@ -99,8 +99,8 @@ sub portalTab { } eval { - POSIX::setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] ); - POSIX::setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] ); + setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] ); + setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] ); }; ## @rfn void run(string localStorage, hashRef localStorageOptions) diff --git a/lemonldap-ng-manager/example/scripts/lmConfigEditor b/lemonldap-ng-manager/example/scripts/lmConfigEditor index e5985e2f3..1375c908c 100644 --- a/lemonldap-ng-manager/example/scripts/lmConfigEditor +++ b/lemonldap-ng-manager/example/scripts/lmConfigEditor @@ -3,12 +3,12 @@ use Lemonldap::NG::Common::Conf; use Lemonldap::NG::Common::Conf::Constants; use Data::Dumper; -use POSIX; +use POSIX qw(setuid setgid); use strict; eval { - POSIX::setgid( ( getgrnam('__APACHEGROUP__') )[2] ); - POSIX::setuid( ( getpwnam('__APACHEUSER__') )[2] ); + setgid( ( getgrnam('__APACHEGROUP__') )[2] ); + setuid( ( getpwnam('__APACHEUSER__') )[2] ); print STDERR "Running as uid $> and gid $)\n"; }; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/MailReset.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/MailReset.pm index a2c7e5d45..0c841dbb5 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/MailReset.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/MailReset.pm @@ -8,13 +8,13 @@ package Lemonldap::NG::Portal::MailReset; use strict; use warnings; -our $VERSION = '1.2.1'; +our $VERSION = '1.2.2'; use Lemonldap::NG::Portal::Simple qw(:all); use base qw(Lemonldap::NG::Portal::SharedConf Exporter); use HTML::Template; use Encode; -use POSIX; +use POSIX qw(strftime); #inherits Lemonldap::NG::Portal::_SMTP @@ -225,8 +225,8 @@ sub sendConfirmationMail { $self->lmLog( "Mail expiration timestamp: $expTimestamp", 'debug' ); $self->{expMailDate} = - &POSIX::strftime( "%d/%m/%Y", localtime $expTimestamp ); - $self->{expMailTime} = &POSIX::strftime( "%H:%M", localtime $expTimestamp ); + strftime( "%d/%m/%Y", localtime $expTimestamp ); + $self->{expMailTime} = strftime( "%H:%M", localtime $expTimestamp ); # Mail session start date my $startTimestamp = $self->{mailSessionStartTimestamp}; @@ -234,9 +234,9 @@ sub sendConfirmationMail { $self->lmLog( "Mail start timestamp: $startTimestamp", 'debug' ); $self->{startMailDate} = - &POSIX::strftime( "%d/%m/%Y", localtime $startTimestamp ); + strftime( "%d/%m/%Y", localtime $startTimestamp ); $self->{startMailTime} = - &POSIX::strftime( "%H:%M", localtime $startTimestamp ); + strftime( "%H:%M", localtime $startTimestamp ); # Ask if user want another confirmation email if ( $self->{mail_already_sent} and !$self->param('resendconfirmation') ) { diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm index 4641ddb8e..73a2faa2c 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm @@ -12,7 +12,7 @@ use MIME::Base64; use String::Random; use LWP::UserAgent; # 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 Encode; # Encode attribute values use URI; # Get metadata URL path @@ -20,7 +20,7 @@ use URI; # Get metadata URL path # Special comments for doxygen #inherits Lemonldap::NG::Common::Conf::SAML::Metadata protected service_metadata -our $VERSION = '1.2.0'; +our $VERSION = '1.2.2'; our $samlCache; our $initGlibDone; @@ -2272,7 +2272,7 @@ sub timestamp2samldate { my ( $self, $timestamp ) = splice @_; 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", 'debug' );