"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 diff -c -r apache_1.3.28/src/main/http_request.c apache_1.3.28-dce/src/main/http_request.c
2 *** apache_1.3.28/src/main/http_request.c Sun Jul 6 17:34:10 2003
3 --- apache_1.3.28-dce/src/main/http_request.c Wed Sep 17 16:57:24 2003
4 ***************
5 *** 172,178 ****
6
7 /* Dealing with the file system to get PATH_INFO
8 */
9 ! static int get_path_info(request_rec *r)
10 {
11 char *cp;
12 char *path = r->filename;
13 --- 172,182 ----
14
15 /* Dealing with the file system to get PATH_INFO
16 */
17 !
18 ! /* Modification for mod_auth_dce -- This function used to be static, however,
19 ! * mod_auth_dce needs to call it.
20 ! */
21 ! int get_path_info(request_rec *r)
22 {
23 char *cp;
24 char *path = r->filename;
25 ***************
26 *** 287,303 ****
27 --cp;
28 }
29 else {
30 ! #if defined(EACCES)
31 ! if (errno == EACCES)
32 ! ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
33 ! "access to %s failed because search "
34 ! "permissions are missing on a component "
35 ! "of the path", r->uri);
36 ! else
37 ! #endif
38 ! ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
39 ! "access to %s failed", r->uri);
40 ! return HTTP_FORBIDDEN;
41 }
42 #else
43 #error ENOENT || ENOTDIR not defined; please see the
44 --- 291,318 ----
45 --cp;
46 }
47 else {
48 ! /* Modification for mod_auth_dce -- This check is made before
49 ! * authentication modules are called. If the error is access
50 ! * denied, it is possible that once DCE credentials are obtained
51 ! * that the entry would be accessible. Therefore, return OK now,
52 ! * and mod_auth_dce will call this function again after credentials
53 ! * are obtained.
54 ! */
55 ! if (errno == EACCES)
56 ! return OK;
57 ! /* Modification for mod_auth_dce -- If a fileset is unavailable
58 ! * and a request times out, return HTTP_SERVICE_UNAVAILABLE instead
59 ! * instead of HTTP_FORBIDDEN.
60 ! */
61 ! else if (errno == ETIMEDOUT) {
62 ! ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
63 ! "access to %s timed out", r->uri);
64 ! return HTTP_SERVICE_UNAVAILABLE;
65 ! }
66 ! else
67 ! ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
68 ! "access to %s failed", r->uri);
69 ! return HTTP_FORBIDDEN;
70 }
71 #else
72 #error ENOENT || ENOTDIR not defined; please see the
73 diff -c -r apache_1.3.28/src/modules/standard/mod_cgi.c apache_1.3.28-dce/src/modules/standard/mod_cgi.c
74 *** apache_1.3.28/src/modules/standard/mod_cgi.c Mon Feb 3 09:13:27 2003
75 --- apache_1.3.28-dce/src/modules/standard/mod_cgi.c Wed Sep 17 16:58:54 2003
76 ***************
77 *** 425,433 ****
78 return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
79 "attempt to invoke directory as script");
80 if (!ap_suexec_enabled) {
81 ! if (!ap_can_exec(&r->finfo))
82 ! return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
83 ! "file permissions deny server execution");
84 }
85
86 if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
87 --- 425,444 ----
88 return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
89 "attempt to invoke directory as script");
90 if (!ap_suexec_enabled) {
91 ! /* Modification for mod_auth_dce -- This used to be a call to ap_can_exec
92 ! * in util.c; however, that function does a naive bit check to decide
93 ! * if a script is executable. That fails in an environment with ACLs,
94 ! * where the server may have permission based on the ACL, but not on
95 ! * the Unix mode bits. The access() system call takes ACLs into account.
96 ! */
97 ! if(access(r->filename, X_OK)) {
98 ! if (errno == EACCES)
99 ! return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
100 ! "file permissions deny server execution");
101 ! else
102 ! return log_scripterror(r, conf, SERVER_ERROR, APLOG_NOERRNO,
103 ! "system error checking execute access");
104 ! }
105 }
106
107 if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
108 diff -c -r apache_1.3.28/src/modules/standard/mod_userdir.c apache_1.3.28-dce/src/modules/standard/mod_userdir.c
109 *** apache_1.3.28/src/modules/standard/mod_userdir.c Mon Feb 3 09:13:30 2003
110 --- apache_1.3.28-dce/src/modules/standard/mod_userdir.c Wed Sep 17 17:04:52 2003
111 ***************
112 *** 367,374 ****
113 * anyway, in the hope that some handler might handle it. This can be
114 * used, for example, to run a CGI script for the user.
115 */
116 ! if (filename && (!*userdirs || stat(filename, &statbuf) != -1)) {
117 ! r->filename = ap_pstrcat(r->pool, filename, dname, NULL);
118 /* when statbuf contains info on r->filename we can save a syscall
119 * by copying it to r->finfo
120 */
121 --- 367,376 ----
122 * anyway, in the hope that some handler might handle it. This can be
123 * used, for example, to run a CGI script for the user.
124 */
125 ! if (filename) {
126 ! if (!*userdirs || stat(filename, &statbuf) != -1) {
127 ! r->filename = ap_pstrcat(r->pool, filename, dname, NULL);
128 !
129 /* when statbuf contains info on r->filename we can save a syscall
130 * by copying it to r->finfo
131 */
132 ***************
133 *** 376,381 ****
134 --- 378,385 ----
135 r->finfo = statbuf;
136 }
137 return OK;
138 + }
139 + if (errno == ETIMEDOUT) return HTTP_SERVICE_UNAVAILABLE;
140 }
141 }
142