/[smeserver]/rpms/e-smith-base/sme9/e-smith-base-5.6.0-ensure_apache_alias_www.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme9/e-smith-base-5.6.0-ensure_apache_alias_www.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sat Jan 3 19:53:54 2015 UTC (9 years, 4 months ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-base-5_6_0-36_el6_sme, e-smith-base-5_6_0-27_el6_sme, e-smith-base-5_6_0-22_el6_sme, e-smith-base-5_6_0-33_el6_sme, e-smith-base-5_6_0-31_el6_sme, e-smith-base-5_6_0-34_el6_sme, e-smith-base-5_6_0-16_el6_sme, e-smith-base-5_6_0-19_el6_sme, e-smith-base-5_6_0-28_el6_sme, e-smith-base-5_6_0-25_el6_sme, e-smith-base-5_6_0-21_el6_sme, e-smith-base-5_6_0-30_el6_sme, e-smith-base-5_6_0-35_el6_sme, e-smith-base--, e-smith-base-5_6_0-32_el6_sme, e-smith-base-5_6_0-26_el6_sme, e-smith-base-5_6_0-23_el6_sme, e-smith-base-5_6_0-20_el6_sme, e-smith-base-5_6_0-29_el6_sme, e-smith-base-5_6_0-24_el6_sme, e-smith-base-5_6_0-17_el6_sme, e-smith-base-5_6_0-15_el6_sme, e-smith-base-5_6_0-18_el6_sme, HEAD
Changes since 1.1: +23 -19 lines
* Sat Jan 3 2014 Stephane de Labrusse <stephdl@de-labrusse.fr> 5.6.0-14.sme
- Modified the patch of daniel e-smith-base-5.6.0-ensure_apache_alias_www.patch
- Ensure www group exists and that apache is an alias of www [SME: 8549]

1 diff -Nur e-smith-base-5.6.0/root/etc/e-smith/events/actions/init-accounts e-smith-base-5.6.0.bz8549/root/etc/e-smith/events/actions/init-accounts
2 --- e-smith-base-5.6.0/root/etc/e-smith/events/actions/init-accounts 2014-03-24 03:47:24.000000000 +0100
3 +++ e-smith-base-5.6.0.bz8549/root/etc/e-smith/events/actions/init-accounts 2015-01-03 20:30:14.270708139 +0100
4 @@ -30,7 +30,33 @@
5 my $conf = esmith::ConfigDB->open_ro
6 or die "Could not open Config DB";
7
8 -my $ldapauth = $conf->get('ldap')->prop('Authentication') || 'disabled';
9 +#create the group apache if doesn't exist
10 +system(qw(/usr/sbin/groupadd -g 102 -r -o -f apache))
11 + unless getgrnam("apache");
12 +
13 +# create the user apache if doesn't exist and has not the same uid/gid as www
14 +if ( !getpwnam("apache") )
15 +{
16 + die "Error creating apache user or group" unless (
17 + system(qw(/usr/sbin/useradd -u 102 -g 102 -o -c 'Apache' -d /var/www -M -s /bin/nologin apache)) == 0);
18 +}
19 +
20 +#set apache gid if different of 102
21 +my $apachegidtest = getgrnam("apache");
22 +if ( $apachegidtest != '102' )
23 +{
24 + die "Error changing apache gid" unless (
25 + system(qw(/usr/sbin/groupmod -g 102 -o apache)) == 0);
26 +}
27 +
28 +#set apache uid if different of 102
29 +my $apacheuidtest = getpwnam("apache");
30 +if ( $apacheuidtest != '102' )
31 +{
32 + die "Error changing apache uid " unless (
33 + system(qw(/usr/sbin/usermod -u 102 -g 102 -o apache )) == 0);
34 +}
35 +
36
37 # fix permissions for www and apache
38 warn "failed to fix permissions for www" unless (

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed