diff --git a/lemonldap-ng-manager/example/scripts/lemonldap-ng-cli b/lemonldap-ng-manager/example/scripts/lemonldap-ng-cli index 8f94a9332..111b3a932 100644 --- a/lemonldap-ng-manager/example/scripts/lemonldap-ng-cli +++ b/lemonldap-ng-manager/example/scripts/lemonldap-ng-cli @@ -8,7 +8,7 @@ sub giveUpPrivileges { my ( $user, $group ) = @_; $user = "nobody" unless defined($user); - $group = "nobody" unless defined($user); + $group = "nobody" unless defined($group); # become $user:$group and give up root privileges setgid( ( getgrnam($group) )[2] ); @@ -33,7 +33,7 @@ if ( !@ARGV ) { exit 1; } -giveUpPrivileges( "www-data", "www-data" ); +giveUpPrivileges( "__APACHEUSER__", "__APACHEGROUP__" ); my ( $cli, $action, $method, $ret ); diff --git a/rpm/lemonldap-ng.spec b/rpm/lemonldap-ng.spec index 28a34aca3..db7af69eb 100644 --- a/rpm/lemonldap-ng.spec +++ b/rpm/lemonldap-ng.spec @@ -344,6 +344,7 @@ find %{buildroot} -name *.bak -exec rm -f {} \; # built as root sed -i 's/nobody/%{lm_apacheuser}/' %{buildroot}%{_sysconfdir}/cron.d/* sed -i 's/nobody/%{lm_apacheuser}/' %{buildroot}%{lm_sharedir}/bin/lmConfigEditor +sed -i 's/nobody/%{lm_apacheuser}/' %{buildroot}%{lm_sharedir}/bin/lemonldap-ng-cli # Minify Javascript and CSS ./scripts/minifierjs `find %{buildroot} -name '*.js'`