Changeset 296 for server


Ignore:
Timestamp:
Apr 23, 2007, 2:25:01 AM (18 years ago)
Author:
andersk
Message:
Replace ref-prepatch/suexec.c with the actually unpatched version.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/fedora/ref-prepatch/suexec.c

    r33 r296  
    9696    /* variable name starts with */
    9797    "HTTP_",
    98     "HTTPS_",
    9998    "SSL_",
    10099
     
    142141    "USER_NAME=",
    143142    "TZ=",
    144     "PHPRC=",
    145143    NULL
    146144};
     
    516514        }
    517515    }
    518     char *expected = malloc(strlen(target_homedir)+strlen(AP_USERDIR_SUFFIX)+1);
    519     sprintf(expected, "%s/%s", target_homedir, AP_USERDIR_SUFFIX);
    520     if ((strncmp(cwd, expected, strlen(expected))) != 0) {
    521         log_err("error: file's directory not a subdirectory of user's home directory (%s, %s)\n", cwd, expected);
    522         exit(114);
    523     }
    524516
    525517    if ((strncmp(cwd, dwd, strlen(dwd))) != 0) {
     
    539531     * Error out if cwd is writable by others.
    540532     */
    541 #if 0
    542533    if ((dir_info.st_mode & S_IWOTH) || (dir_info.st_mode & S_IWGRP)) {
    543534        log_err("directory is writable by others: (%s)\n", cwd);
    544535        exit(116);
    545536    }
    546 #endif
    547537
    548538    /*
    549539     * Error out if we cannot stat the program.
    550540     */
    551     if (((lstat(cmd, &prg_info)) != 0) /*|| (S_ISLNK(prg_info.st_mode))*/) {
     541    if (((lstat(cmd, &prg_info)) != 0) || (S_ISLNK(prg_info.st_mode))) {
    552542        log_err("cannot stat program: (%s)\n", cmd);
    553543        exit(117);
     
    557547     * Error out if the program is writable by others.
    558548     */
    559 #if 0
    560549    if ((prg_info.st_mode & S_IWOTH) || (prg_info.st_mode & S_IWGRP)) {
    561550        log_err("file is writable by others: (%s/%s)\n", cwd, cmd);
    562551        exit(118);
    563552    }
    564 #endif
    565553
    566554    /*
     
    576564     * the name/group of the cwd or the program.
    577565     */
    578 #if 0
    579566    if ((uid != dir_info.st_uid) ||
    580567        (gid != dir_info.st_gid) ||
     
    588575        exit(120);
    589576    }
    590 #endif
    591577    /*
    592578     * Error out if the program is not executable for the user.
Note: See TracChangeset for help on using the changeset viewer.