Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 303809
Collapse All | Expand All

(-)suphp-0.7.1.orig/doc/CONFIG (+6 lines)
Lines 109-114 Link Here
109
  "--disable-check-docroot" option has been specified, otherwise it is
109
  "--disable-check-docroot" option has been specified, otherwise it is
110
  enabled by default.
110
  enabled by default.
111
111
112
check_symlink_ownership:
113
  Checks whether the owner UID and GID of a symbolic link match the owner
114
  UID and GID of the target file. If this is disabled, scripts will always
115
  be run under the owner of the symbolic link.
116
  Is enabled by default.
117
112
errors_to_browser:
118
errors_to_browser:
113
  Enable this option to sent information about minor problems during script
119
  Enable this option to sent information about minor problems during script
114
  invocation to the browser. This option is disabled by default.
120
  invocation to the browser. This option is disabled by default.
(-)suphp-0.7.1.orig/src/Application.cpp (-2 / +3 lines)
Lines 258-265 Link Here
258
    }
258
    }
259
259
260
    // Check UID/GID of symlink is matching target
260
    // Check UID/GID of symlink is matching target
261
    if (scriptFile.getUser() != realScriptFile.getUser()
261
    if (config.getCheckSymlinkOwnership()
262
        || scriptFile.getGroup() != realScriptFile.getGroup()) {
262
        && (scriptFile.getUser() != realScriptFile.getUser()
263
        || scriptFile.getGroup() != realScriptFile.getGroup())) {
263
        std::string error = "UID or GID of symlink \"" + scriptFile.getPath()
264
        std::string error = "UID or GID of symlink \"" + scriptFile.getPath()
264
            + "\" is not matching its target";
265
            + "\" is not matching its target";
265
        logger.logWarning(error);
266
        logger.logWarning(error);
(-)suphp-0.7.1.orig/src/Configuration.cpp (+7 lines)
Lines 97-102 Link Here
97
#else
97
#else
98
    this->check_vhost_docroot = true;
98
    this->check_vhost_docroot = true;
99
#endif
99
#endif
100
    this->check_symlink_ownership = true;
100
    this->errors_to_browser = false;
101
    this->errors_to_browser = false;
101
    this->env_path = "/bin:/usr/bin";
102
    this->env_path = "/bin:/usr/bin";
102
    this->loglevel = LOGLEVEL_INFO;
103
    this->loglevel = LOGLEVEL_INFO;
Lines 143-148 Link Here
143
                    this->strToBool(value);
144
                    this->strToBool(value);
144
            else if (key == "check_vhost_docroot")
145
            else if (key == "check_vhost_docroot")
145
                this->check_vhost_docroot = this->strToBool(value);
146
                this->check_vhost_docroot = this->strToBool(value);
147
            else if (key == "check_symlink_ownership")
148
                this->check_symlink_ownership = this->strToBool(value);
146
            else if (key == "errors_to_browser")
149
            else if (key == "errors_to_browser")
147
                this->errors_to_browser = this->strToBool(value);
150
                this->errors_to_browser = this->strToBool(value);
148
            else if (key == "env_path")
151
            else if (key == "env_path")
Lines 201-206 Link Here
201
    return this->check_vhost_docroot;
204
    return this->check_vhost_docroot;
202
}
205
}
203
206
207
bool suPHP::Configuration::getCheckSymlinkOwnership() const {
208
    return this->check_symlink_ownership;
209
}
210
204
bool suPHP::Configuration::getAllowFileGroupWriteable() const {
211
bool suPHP::Configuration::getAllowFileGroupWriteable() const {
205
    return this->allow_file_group_writeable;
212
    return this->allow_file_group_writeable;
206
}
213
}
(-)suphp-0.7.1.orig/src/Configuration.hpp (+7 lines)
Lines 50-55 Link Here
50
        bool allow_file_others_writeable;
50
        bool allow_file_others_writeable;
51
        bool allow_directory_others_writeable;
51
        bool allow_directory_others_writeable;
52
        bool check_vhost_docroot;
52
        bool check_vhost_docroot;
53
        bool check_symlink_ownership;
53
        bool errors_to_browser;
54
        bool errors_to_browser;
54
        std::string env_path;
55
        std::string env_path;
55
        std::map<std::string, std::string> handlers;
56
        std::map<std::string, std::string> handlers;
Lines 108-113 Link Here
108
        bool getCheckVHostDocroot() const;
109
        bool getCheckVHostDocroot() const;
109
        
110
        
110
        /**
111
        /**
112
          * Returns whether suPHP should check if the owner UID and GID
113
          * matches the UID and GID of the target file.
114
        */
115
        bool getCheckSymlinkOwnership() const;
116
        
117
        /**
111
         * Returns wheter suPHP should ignore the group write bit of
118
         * Returns wheter suPHP should ignore the group write bit of
112
         * the script file
119
         * the script file
113
         */
120
         */

Return to bug 303809