Make lemonldap-ng-cli work on RHEL systems (#649)

This commit is contained in:
Clément Oudot 2014-01-23 15:59:52 +00:00
parent 77492c0116
commit 4adba0b982
2 changed files with 3 additions and 2 deletions

View File

@ -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 );

View File

@ -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'`