]> git.pld-linux.org Git - packages/apache1-mod_frontpage.git/blob - apache1-mod_frontpage-mirfak.patch
- adapterized (sorted %verify attrs)
[packages/apache1-mod_frontpage.git] / apache1-mod_frontpage-mirfak.patch
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);
8 +                /*
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.
15 +                 */
16 +                } else if (((pos = strstr(uri, _FPPASSWD)) != NULL)) {
17 +                        pos = strstr(uri, _VTI_AUT);
18 +                        pos = pos + 19;
19 +                        Lcid = (int)strtol(pos, &pos, 10);
20 +                        if (Lcid == 0) {
21 +                                Lcid = 1033;
22 +                        }
23 +                        pos = strrchr((char *)uri, '/');
24 +                        snprintf((char *)fnbuf, sizeof(fnbuf), "%s%s%c%04d%s",
25 +                                FPBASE, _ADMIN, '/', Lcid, pos);
26 +
27                 /*
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.
31                  */
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);
37 +                     } else {
38 +                        pos = strstr(uri, _VTI_AUT);
39 +                     }
40                         pos = pos + 19;
41                         Lcid = (int)strtol(pos, &pos, 10);
42 +                        if (Lcid == 0) {
43 +                                Lcid = 1033;
44 +                        }
45 +                        pos = strrchr((char *)uri, '/');
46                         snprintf((char *)fnbuf, sizeof(fnbuf), "%s%s%c%04d%s",
47                             FPBASE, _ADMIN, '/', Lcid, pos);
48                 }
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
53  
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
58  
59  fpexec: fpexec.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
64 @@ -11,9 +11,11 @@
65  
66  $flavor=`uname`;
67  if (-e "/etc/mandrake-release") {$flavor="Mandrake";}
68 +if (-e "/etc/debian_version") {$flavor="Debian";}
69  
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"; 
73  } else {
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"; }
78  
79  $httpd=$thechoice;
80 -$thechoice=~s|/httpd||;
81 +
82 +if ($flavor eq "Debian") { $thechoice=~s|sbin/apache|bin/|; 
83 +} else {
84 +$thechoice=~s|/httpd||; }
85  
86  print "sbindir is $thechoice, trying to find apxs...";
87  
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";
91  while(<FILE>) {
92 -    if (!$user && /^\s*User (\w*)/i) {
93 +    if (!$user && /^\s*User ([\w-]*)/i) {
94         $user=$1;
95      }
96 -    if (!$group && /^\s*Group (\w*)/i) {
97 +    if (!$group && /^\s*Group ([\w-]*)/i) {
98         $group=$1;
99      }
100      if (!$userdir && /^\s*UserDir (\w*)/i) {
101 @@ -123,6 +128,7 @@ if (/^(\d*)(\s*)(\d*)/) {
102  
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; }
107  
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
112 @@ -67,6 +67,7 @@
113  #define _HELP "/help"
114  #define _EXES "/exes"
115  #define _ADMIN "/admin"
116 +#define _FPPASSWD "/passwd.htm"
117  
118  #define VTIHELP  _VTI_BIN "/_vti_adm/help"
119  #define SHTMLDLL _VTI_BIN "/shtml.dll"
This page took 0.073376 seconds and 3 git commands to generate.