Commit 4adba0b9 authored by Clément OUDOT's avatar Clément OUDOT

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

parent 77492c01
......@@ -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 );
......
......@@ -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'`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment