/[smecontribs]/rpms/smeserver-sarg/contribs7/smeserver-sarg-2.2.1-validuser2.patch
ViewVC logotype

Contents of /rpms/smeserver-sarg/contribs7/smeserver-sarg-2.2.1-validuser2.patch

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


Revision 1.1 - (show annotations) (download)
Fri Sep 18 10:22:52 2009 UTC (15 years, 2 months ago) by dungog
Branch: MAIN
CVS Tags: smeserver-sarg-2_2_1-6_el4_sme, HEAD
* Fri Sep 18 2009 Stephen Noble <support@dungog.net> 2.2.1-6.sme
- allow valid userpanel users access [SME 2931]

1 --- smeserver-sarg-2.2.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess20sarg.validuser2 2006-10-17 22:12:45.000000000 +1000
2 +++ smeserver-sarg-2.2.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess20sarg 2009-09-18 20:17:18.000000000 +1000
3 @@ -1,35 +1,53 @@
4 {
5 -my $externalSSLAccess = '';
6 -my $validFrom = db_get_prop($confref, "httpd-admin", "ValidFrom") || 'none';
7 + my $externalSSLAccess = '';
8 + my $validFrom = db_get_prop($confref, "httpd-admin", "ValidFrom") || 'none';
9
10 -$validFrom =~ s/,/ /g;
11 -$validFrom =~ s:/255.255.255.255::g;
12 + $validFrom =~ s/,/ /g;
13 + $validFrom =~ s:/255.255.255.255::g;
14
15 -unless ($validFrom eq 'none')
16 -{
17 -$externalSSLAccess = $validFrom;
18 -}
19 + unless ($validFrom eq 'none')
20 + {
21 + $externalSSLAccess = $validFrom;
22 + }
23 +
24 + use esmith::AccountsDB;
25 + my $adb = esmith::AccountsDB->open_ro();
26 + my $sargusers = "";
27 +
28 + foreach my $user ($adb->users)
29 + {
30 + my %properties = $user->props;
31 + my $key = $user->key;
32 +
33 + if ($properties{'AdminPanels'})
34 + {
35 + if ($properties{'AdminPanels'} =~ /sarg/)
36 + {
37 + $sargusers = "$sargusers $key";
38 + }
39 + }
40 + }
41
42 $OUT .= <<HERE;
43 -#-----------------------------------------------------------------------------
44 -# SARG generated squid access log reports web repository
45 -#-----------------------------------------------------------------------------
46 -
47 -Alias /squid /var/www/sarg
48 -<Directory /var/www/sarg>
49 -AllowOverride None
50 -Options +Indexes
51 -order deny,allow
52 -deny from all
53 -allow from $localAccess $externalSSLAccess
54 -AuthName "SME Server Manager"
55 -AuthType Basic
56 -AuthExternal pwauth
57 -require user admin
58 -</Directory>
59 -
60 -#-----------------------------------------------------------------------------
61 -# End of SARG generated squid access log reports web repository
62 -#-----------------------------------------------------------------------------
63 + #-----------------------------------------------------------------------------
64 + # SARG generated squid access log reports web repository
65 + #-----------------------------------------------------------------------------
66 +
67 + Alias /squid /var/www/sarg
68 + <Directory /var/www/sarg>
69 + AllowOverride None
70 + Options +Indexes
71 + order deny,allow
72 + deny from all
73 + allow from $localAccess $externalSSLAccess
74 + AuthName "SME Server Manager"
75 + AuthType Basic
76 + AuthExternal pwauth
77 + require user admin $sargusers
78 + </Directory>
79 +
80 + #-----------------------------------------------------------------------------
81 + # End of SARG generated squid access log reports web repository
82 + #-----------------------------------------------------------------------------
83 HERE
84 }

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