mirror of
https://github.com/php/php-src.git
synced 2026-04-09 00:53:30 +02:00
- [ main/safe_mode.h ] added new checkuid mode:
CHECKUID_ALLOW_ONLY_FILE: skips directory check if file check
fails
- [ ext/standard/dir.c ] changed php_checkuid() to use
CHECKUID_ALLOW_ONLY_FILE instead of CHECKUID_ALLOW_ONLY_DIR
- [ main/safe_mode.c ] added code for new checkuid mode
o Fixed Bug #12119: safe mode owner check can be bypassed with symlink
- [ main/safe_mode.c ] use VCWD_REALPATH to resolve destination
of symlink before trimming filename
o New Feature: safe_mode_include_dir (php.ini directive)
- Allows bypassing UID/GID checks when including files
from the directory in safe_mode_include_dir and its
subdirectories. (safe_mode must be on, directory must
also be in include_path or full path must be used when
including)
o Fixed Feature: safe_mode_gid (php.ini directive)
- Correctly check (and report) UID/GID bits on directories
o Changed include() fall back to scripts cwd implementation
- CWD added to the (local) search path in php_fopen_with_path()
instead of seperate case. [ main/fopen_wrappers.c ]
16 lines
440 B
C
16 lines
440 B
C
#ifndef SAFE_MODE_H
|
|
#define SAFE_MODE_H
|
|
|
|
/* mode's for php_checkuid() */
|
|
#define CHECKUID_DISALLOW_FILE_NOT_EXISTS 0
|
|
#define CHECKUID_ALLOW_FILE_NOT_EXISTS 1
|
|
#define CHECKUID_CHECK_FILE_AND_DIR 2
|
|
#define CHECKUID_ALLOW_ONLY_DIR 3
|
|
#define CHECKUID_CHECK_MODE_PARAM 4
|
|
#define CHECKUID_ALLOW_ONLY_FILE 5
|
|
|
|
extern PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode);
|
|
extern PHPAPI char *php_get_current_user(void);
|
|
|
|
#endif
|