1 |
brianr |
1.1 |
diff -urN smeserver-gitweb-1.1.0.org/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook smeserver-gitweb-1.1.0/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook |
2 |
|
|
--- smeserver-gitweb-1.1.0.org/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook 2016-02-17 11:23:06.448465220 +1030 |
3 |
|
|
+++ smeserver-gitweb-1.1.0/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook 2016-02-17 11:23:58.430574814 +1030 |
4 |
|
|
@@ -2,11 +2,21 @@ |
5 |
|
|
# Password Check - Returns 0 when password validated OK, or !0 otherwise |
6 |
|
|
# |
7 |
|
|
|
8 |
|
|
-$pwauth_path= "/usr/bin/pwauth"; |
9 |
|
|
sub trypass \{ |
10 |
|
|
my $userid= $_[0]; |
11 |
|
|
my $passwd= $_[1]; |
12 |
|
|
|
13 |
|
|
+ # Find the pwauth program. It is in a different location in SME8 and SME9 |
14 |
|
|
+ if( -f "/usr/bin/pwauth" ) \{ |
15 |
|
|
+ $pwauth_path= "/usr/bin/pwauth"; |
16 |
|
|
+ \} |
17 |
|
|
+ elsif( -f "/usr/lib/httpd/modules/pwauth" ) \{ |
18 |
|
|
+ $pwauth_path= "/usr/lib/httpd/modules/pwauth"; |
19 |
|
|
+ \} |
20 |
|
|
+ else \{ |
21 |
|
|
+ $pwauth_path = ""; |
22 |
|
|
+ \} |
23 |
|
|
+ |
24 |
|
|
open PWAUTH, "|$pwauth_path" or die("Could not run $pwauth_path"); |
25 |
|
|
print PWAUTH "$userid\n$passwd\n"; |
26 |
|
|
close PWAUTH; |