Changeset 1877 for trunk/server/common/patches/httpd-suexec-scripts.patch
- Timestamp:
- Jun 7, 2011, 12:23:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/patches/httpd-suexec-scripts.patch
r1785 r1877 73 73 74 74 /* variable name is */ 75 @@ -245,9 +250, 71@@75 @@ -245,9 +250,108 @@ 76 76 environ = cleanenv; 77 77 } … … 100 100 + "xls", 101 101 + "ppt", 102 + "dot", 103 + "docx", 104 + "dotx", 105 + "docm", 106 + "dotm", 107 + "xlt", 108 + "xla", 109 + "xlsx", 110 + "xltx", 111 + "xlsm", 112 + "xltm", 113 + "xlam", 114 + "xlsb", 115 + "pot", 116 + "pps", 117 + "ppa", 118 + "pptx", 119 + "potx", 120 + "ppsx", 121 + "ppam", 122 + "pptm", 123 + "potm", 124 + "ppsm", 102 125 + "swf", 103 126 + "mp3", … … 117 140 + "ttf", 118 141 + "otf", 142 + "odc", 143 + "odb", 144 + "odf", 145 + "odg", 146 + "otg", 147 + "odi", 148 + "odp", 149 + "otp", 150 + "ods", 151 + "ots", 152 + "odt", 153 + "odm", 154 + "ott", 155 + "oth", 119 156 + NULL 120 157 +}; … … 145 182 gid_t gid; /* target group placeholder */ 146 183 char *target_uname; /* target user name */ 147 @@ -268,6 +3 31,7 @@184 @@ -268,6 +368,7 @@ 148 185 * Start with a "clean" environment 149 186 */ … … 153 190 prog = argv[0]; 154 191 /* 155 @@ -350,6 +4 14,20 @@192 @@ -350,6 +451,20 @@ 156 193 #endif /*_OSD_POSIX*/ 157 194 … … 174 211 * or attempts to back up out of the current directory, 175 212 * to protect against attacks. If any are 176 @@ -371,6 +4 49,7 @@213 @@ -371,6 +486,7 @@ 177 214 userdir = 1; 178 215 } … … 182 219 * Error out if the target username is invalid. 183 220 */ 184 @@ -452,7 +5 31,7 @@221 @@ -452,7 +568,7 @@ 185 222 * Error out if attempt is made to execute as root or as 186 223 * a UID less than AP_UID_MIN. Tsk tsk. … … 191 228 exit(107); 192 229 } 193 @@ -484,6 +5 63,7 @@230 @@ -484,6 +599,7 @@ 194 231 log_err("failed to setuid (%ld: %s)\n", uid, cmd); 195 232 exit(110); … … 199 236 /* 200 237 * Get the current working directory, as well as the proper 201 @@ -506,6 +6 00,21 @@238 @@ -506,6 +637,21 @@ 202 239 log_err("cannot get docroot information (%s)\n", target_homedir); 203 240 exit(112); … … 221 258 else { 222 259 if (((chdir(AP_DOC_ROOT)) != 0) || 223 @@ -532,15 +6 41,17 @@260 @@ -532,15 +678,17 @@ 224 261 /* 225 262 * Error out if cwd is writable by others. … … 240 277 exit(117); 241 278 } 242 @@ -548,10 +6 59,12 @@279 @@ -548,10 +696,12 @@ 243 280 /* 244 281 * Error out if the program is writable by others. … … 253 290 /* 254 291 * Error out if the file is setuid or setgid. 255 @@ -565,6 + 678,7 @@292 @@ -565,6 +715,7 @@ 256 293 * Error out if the target name/group is different from 257 294 * the name/group of the cwd or the program. … … 261 298 (gid != dir_info.st_gid) || 262 299 (uid != prg_info.st_uid) || 263 @@ -576,12 + 690,14 @@300 @@ -576,12 +727,14 @@ 264 301 prg_info.st_uid, prg_info.st_gid); 265 302 exit(120); … … 277 314 exit(121); 278 315 } 279 @@ -614,6 +7 30,23 @@316 @@ -614,6 +767,23 @@ 280 317 /* 281 318 * Execute the command, replacing our image with its own.
Note: See TracChangeset
for help on using the changeset viewer.