1 diff -urp mod_frontpage_mirfak-1.6.2.orig/fpstatic.c mod_frontpage_mirfak-1.6.2/fpstatic.c
2 --- mod_frontpage_mirfak-1.6.2.orig/fpstatic.c 2002-03-12 17:07:07.000000000 -0400
3 +++ mod_frontpage_mirfak-1.6.2/fpstatic.c 2002-11-08 02:00:49.000000000 -0400
4 @@ -434,16 +434,42 @@ int translate (const char * uri) {
5 pos = strrchr((char *)uri, '/');
6 snprintf((char *)fnbuf, sizeof(fnbuf), "%s%s%s%s%s",
7 FPBASE, _EXES, _VTI_ADM, _IMAGES, pos);
9 + * Check to see if the user is changing the password,
10 + * which has a URL like _vti_bin/_vti_aut/passwd.htm.
11 + * It's different from other ".htm" files because it
12 + * goes through _VTI_AUT instead of _VTI_ADM and it
13 + * may not have the Lcid in the URL. If it's missing
14 + * the Lcid, hard-code it to 1033 like the rtr patches.
16 + } else if (((pos = strstr(uri, _FPPASSWD)) != NULL)) {
17 + pos = strstr(uri, _VTI_AUT);
19 + Lcid = (int)strtol(pos, &pos, 10);
23 + pos = strrchr((char *)uri, '/');
24 + snprintf((char *)fnbuf, sizeof(fnbuf), "%s%s%c%04d%s",
25 + FPBASE, _ADMIN, '/', Lcid, pos);
28 * If we still have .htm or .css, we end up
29 * with the admin dir. If we match, we calculate
30 * the Lcid from the string.
32 - } else if (((pos = strstr(uri, ".htm")) != NULL)
33 - || ((pos = strstr(uri, ".css")) != NULL)) {
34 + } else if (((pos = strstr(uri, ".css")) != NULL)) {
35 + if (((pos = strstr(uri, _VTI_ADM)) != NULL)) {
36 pos = strstr(uri, _VTI_ADM);
38 + pos = strstr(uri, _VTI_AUT);
41 Lcid = (int)strtol(pos, &pos, 10);
45 + pos = strrchr((char *)uri, '/');
46 snprintf((char *)fnbuf, sizeof(fnbuf), "%s%s%c%04d%s",
47 FPBASE, _ADMIN, '/', Lcid, pos);
49 diff -urp mod_frontpage_mirfak-1.6.2.orig/Makefile.in mod_frontpage_mirfak-1.6.2/Makefile.in
50 --- mod_frontpage_mirfak-1.6.2.orig/Makefile.in 2002-03-12 17:07:06.000000000 -0400
51 +++ mod_frontpage_mirfak-1.6.2/Makefile.in 2002-11-08 01:46:36.000000000 -0400
52 @@ -37,7 +37,7 @@ all: mod_frontpage.so fpexec fpstatic
54 # compile the DSO file
55 mod_frontpage.so: mod_frontpage.c
56 - $(APXS) -Wall -c $(DEF) $(INC) $(LIB) mod_frontpage.c
57 + $(APXS) -Wall -c $(DEF) $(DEF2) $(INC) $(LIB) mod_frontpage.c
60 $(cc) $(CFLAGS) $(DEF2) $(INC) $(LIB) -o fpexec fpexec.c
61 diff -urp mod_frontpage_mirfak-1.6.2.orig/Makefile.PL mod_frontpage_mirfak-1.6.2/Makefile.PL
62 --- mod_frontpage_mirfak-1.6.2.orig/Makefile.PL 2002-03-12 17:07:07.000000000 -0400
63 +++ mod_frontpage_mirfak-1.6.2/Makefile.PL 2002-11-08 02:01:41.000000000 -0400
67 if (-e "/etc/mandrake-release") {$flavor="Mandrake";}
68 +if (-e "/etc/debian_version") {$flavor="Debian";}
70 if ($flavor eq "FreeBSD") { $thechoice="/usr/local/sbin/httpd";
71 } elsif ($flavor eq "Mandrake") { $thechoice="/usr/sbin/httpd";
72 +} elsif ($flavor eq "Debian") { $thechoice="/usr/sbin/apache";
74 print "Enter the path of your httpd binary.\n";
75 print "It should be something like /usr/local/apache/bin).\n";
76 @@ -43,7 +45,10 @@ if (/Server version:/) { print " YES!\n"
77 } else { die "\n\nSorry, can't find Apache version!\n"; }
80 -$thechoice=~s|/httpd||;
82 +if ($flavor eq "Debian") { $thechoice=~s|sbin/apache|bin/|;
84 +$thechoice=~s|/httpd||; }
86 print "sbindir is $thechoice, trying to find apxs...";
88 @@ -74,10 +79,10 @@ $tmpfile="/tmp/frontpage.$$";
89 open(FILE,"$tmpfile") or die "Can't find $tmpfile!\n";
90 print "Reading httpd.conf...\n";
92 - if (!$user && /^\s*User (\w*)/i) {
93 + if (!$user && /^\s*User ([\w-]*)/i) {
96 - if (!$group && /^\s*Group (\w*)/i) {
97 + if (!$group && /^\s*Group ([\w-]*)/i) {
100 if (!$userdir && /^\s*UserDir (\w*)/i) {
101 @@ -123,6 +128,7 @@ if (/^(\d*)(\s*)(\d*)/) {
103 if ($flavor eq "FreeBSD") { $defaultid=80;
104 } elsif ($flavor eq "Mandrake") { $defaultid=48;
105 +} elsif ($flavor eq "Debian") { $defaultid=33;
106 } else { $defaultid=99; }
108 if ($uid < $defaultid) {
109 diff -urp mod_frontpage_mirfak-1.6.2.orig/path.h mod_frontpage_mirfak-1.6.2/path.h
110 --- mod_frontpage_mirfak-1.6.2.orig/path.h 2002-03-12 17:07:07.000000000 -0400
111 +++ mod_frontpage_mirfak-1.6.2/path.h 2002-11-08 01:52:01.000000000 -0400
113 #define _HELP "/help"
114 #define _EXES "/exes"
115 #define _ADMIN "/admin"
116 +#define _FPPASSWD "/passwd.htm"
118 #define VTIHELP _VTI_BIN "/_vti_adm/help"
119 #define SHTMLDLL _VTI_BIN "/shtml.dll"