/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-apache_alias_for_www.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-apache_alias_for_www.patch

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


Revision 1.2 - (show annotations) (download)
Tue Feb 18 06:21:34 2014 UTC (10 years, 3 months ago) by wellsi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Remove obsolete patch files

1 diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/init-accounts e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/init-accounts
2 --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/init-accounts 2010-12-06 16:55:42.000000000 +0100
3 +++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/init-accounts 2010-12-06 22:40:10.000000000 +0100
4 @@ -188,6 +188,30 @@
5 }
6 }
7
8 +# Now that www exists, change uid/gid of user and group apache
9 +# so they become alias of the www account
10 +if ( !getpwnam("apache") )
11 +{
12 + die "Error creating apache user or group" unless (
13 + system("/usr/sbin/groupadd -g 102 -o apache") == 0 &&
14 + system("/usr/sbin/useradd -u 102 -g 102 -o -c 'Apache' -d /var/www -M -s /bin/nologin apache") == 0
15 + );
16 +}
17 +else
18 +{
19 + my $id = `/usr/bin/id -u apache`;
20 + chomp($id);
21 + if ( $id ne '102')
22 + {
23 + die "Error changing apache uid or gid" unless (
24 + system("/usr/sbin/groupmod -g 102 -o apache") == 0 &&
25 + system("/usr/sbin/usermod -u 102 -g 102 -o apache") == 0
26 + );
27 + warn "failed to fix permissions for apache" unless (
28 + system("/bin/rpm --setugids httpd mod_auth_tkt mod_ssl php 2> /dev/null") == 0
29 + );
30 + }
31 +}
32
33 # delete unwanted user accounts
34 foreach my $user (qw(halt shutdown sync))

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