/php-src/ext/fileinfo/libmagic/ |
H A D | fsmagic.c | 116 if (sb->st_mode & S_ISUID) in file_fsmagic() 121 if (sb->st_mode & S_ISGID) in file_fsmagic() 126 if (sb->st_mode & S_ISVTX) in file_fsmagic() 132 switch (sb->st_mode & S_IFMT) { in file_fsmagic() 240 file_error(ms, 0, "invalid mode 0%o", sb->st_mode); in file_fsmagic()
|
H A D | buffer.c | 73 if (!S_ISREG(b->st.st_mode)) in buffer_fill()
|
H A D | magic.c | 231 if (unreadable_info(ms, sb.st_mode, inname) == -1) in file_or_stream()
|
/php-src/ext/phar/ |
H A D | func_interceptors.c | 390 if (S_ISLNK(stat_sb->st_mode)) { in phar_fancy_stat() 393 switch(stat_sb->st_mode & S_IFMT) { in phar_fancy_stat() 404 RETURN_BOOL((stat_sb->st_mode&xmask)!=0 && !S_ISDIR(stat_sb->st_mode)); in phar_fancy_stat() 406 RETURN_BOOL(S_ISREG(stat_sb->st_mode)); in phar_fancy_stat() 408 RETURN_BOOL(S_ISDIR(stat_sb->st_mode)); in phar_fancy_stat() 410 RETURN_BOOL(S_ISLNK(stat_sb->st_mode)); in phar_fancy_stat() 420 ZVAL_LONG(&stat_mode, stat_sb->st_mode); in phar_fancy_stat() 543 sb.st_mode = 0777; in phar_file_stat() 583 sb.st_mode = 0777; in phar_file_stat() 619 sb.st_mode |= S_IFLNK; in phar_file_stat() [all …]
|
H A D | stream.c | 497 ssb->sb.st_mode = data->flags & PHAR_ENT_PERM_MASK; in phar_dostat() 498 ssb->sb.st_mode |= S_IFREG; /* regular file */ in phar_dostat() 505 ssb->sb.st_mode = data->flags & PHAR_ENT_PERM_MASK; in phar_dostat() 506 ssb->sb.st_mode |= S_IFDIR; /* regular directory */ in phar_dostat() 513 ssb->sb.st_mode = 0777; in phar_dostat() 514 ssb->sb.st_mode |= S_IFDIR; /* regular directory */ in phar_dostat() 520 ssb->sb.st_mode = (ssb->sb.st_mode & 0555) | (ssb->sb.st_mode & ~0777); in phar_dostat()
|
H A D | util.c | 240 if (ssb.sb.st_mode & S_IFDIR) { in phar_mount_entry() 253 entry.flags = ssb.sb.st_mode; in phar_mount_entry() 1368 if ((ssb.sb.st_mode & S_IFDIR) && !dir) { in phar_get_entry_info_dir() 1376 if ((ssb.sb.st_mode & S_IFDIR) == 0 && dir) { in phar_get_entry_info_dir()
|
/php-src/ext/random/ |
H A D | csprng.c | 170 !(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode)) in php_random_bytes_ex() 172 !S_ISCHR(st.st_mode) in php_random_bytes_ex()
|
/php-src/win32/ |
H A D | ioutil.c | 872 buf->st_mode = _buf.st_mode; in php_win32_ioutil_fstat_int() 918 buf->st_mode = 0; in php_win32_ioutil_fstat_int() 927 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int() 932 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int() 939 buf->st_mode |= (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int() 943 buf->st_mode |= S_IFCHR; in php_win32_ioutil_fstat_int() 946 buf->st_mode |= S_IFIFO; in php_win32_ioutil_fstat_int() 949 buf->st_mode |= S_IFREG; in php_win32_ioutil_fstat_int() 952 …buf->st_mode |= (data->dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREA… in php_win32_ioutil_fstat_int() 1000 buf->st_mode = S_IFLNK; in php_win32_ioutil_stat_ex_w() [all …]
|
H A D | glob.c | 546 !IS_SLASH(pathend[-1])) && (S_ISDIR(sb.st_mode) || in glob2() 547 (S_ISLNK(sb.st_mode) && in glob2() 549 S_ISDIR(sb.st_mode)))) { in glob2()
|
/php-src/ext/standard/ |
H A D | filestat.c | 844 || !S_ISLNK(ssb.sb.st_mode)) { in php_stat() 897 RETURN_LONG((zend_long)stat_sb->st_mode); in php_stat() 913 if (S_ISLNK(stat_sb->st_mode)) { in php_stat() 916 switch(stat_sb->st_mode & S_IFMT) { in php_stat() 929 RETURN_BOOL((stat_sb->st_mode & wmask) != 0); in php_stat() 931 RETURN_BOOL((stat_sb->st_mode & rmask) != 0); in php_stat() 933 RETURN_BOOL((stat_sb->st_mode & xmask) != 0); in php_stat() 935 RETURN_BOOL(S_ISREG(stat_sb->st_mode)); in php_stat() 937 RETURN_BOOL(S_ISDIR(stat_sb->st_mode)); in php_stat() 939 RETURN_BOOL(S_ISLNK(stat_sb->st_mode)); in php_stat() [all …]
|
H A D | ftp_fopen_wrapper.c | 788 …ssb->sb.st_mode = 0644; /* FTP won't give us a valid mode, so approximate one based on bei… in php_stream_ftp_url_stat() 792 ssb->sb.st_mode |= S_IFREG; in php_stream_ftp_url_stat() 794 ssb->sb.st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH; in php_stream_ftp_url_stat() 811 if (ssb->sb.st_mode & S_IFDIR) { in php_stream_ftp_url_stat()
|
H A D | php_fopen_wrapper.c | 397 if (zend_fstat(fd, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { in php_stream_url_wrap_php()
|
H A D | dir.c | 446 if (S_IFDIR != (s.st_mode & S_IFMT)) { in PHP_FUNCTION()
|
H A D | file.c | 1387 ZVAL_LONG(&stat_mode, stat_ssb.sb.st_mode); in php_fstat() 1514 if (S_ISDIR(src_s.sb.st_mode)) { in php_copy_file_ctx() 1529 if (S_ISDIR(dest_s.sb.st_mode)) { in php_copy_file_ctx()
|
/php-src/ext/standard/tests/file/ |
H A D | bug77552.phpt | 11 // Check lstat on a Windows junction to ensure that st_mode is zero
|
/php-src/ext/pcre/pcre2lib/sljit/allocator_src/ |
H A D | sljitProtExecAllocatorPosix.c | 78 if ((stat(dir, &st) == 0) && S_ISDIR(st.st_mode)) { in create_tempfile()
|
/php-src/ext/zip/ |
H A D | zip_stream.c | 176 ssb->sb.st_mode |= S_IFREG; /* regular file */ in php_zip_ops_stat() 179 ssb->sb.st_mode |= S_IFDIR; /* regular directory */ in php_zip_ops_stat()
|
/php-src/ext/fileinfo/ |
H A D | fileinfo.c | 395 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type() 410 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type()
|
H A D | libmagic.patch | 599 + if (st.sb.st_mode & S_IFDIR) { 1660 - sb->st_mode = S_IFBLK; 1665 - sb->st_mode |= S_IFCHR; 1666 - sb->st_mode &= ~S_IFREG; 1669 - sb->st_mode |= S_IFIFO; 1670 - sb->st_mode &= ~S_IFREG; 1684 switch (sb->st_mode & S_IFMT) { 1965 ms->mode = b.st.st_mode; 2385 - if (S_ISDIR(st.st_mode)) { 2589 - sb.st_mode = S_IFBLK; [all …]
|
/php-src/main/ |
H A D | php_ini.c | 562 if (!((statbuf.st_mode & S_IFMT) == S_IFDIR)) { in php_init_config() 677 if (S_ISREG(sb.st_mode)) { in php_init_config() 767 if (S_ISREG(sb.st_mode)) { in php_parse_user_ini_file()
|
/php-src/main/streams/ |
H A D | plain_wrapper.c | 258 self->is_seekable = !(S_ISFIFO(self->sb.st_mode) || S_ISCHR(self->sb.st_mode)); in detect_is_seekable() 259 self->is_pipe = S_ISFIFO(self->sb.st_mode); in detect_is_seekable() 1175 if ((r == 0 && !S_ISREG(self->sb.st_mode))) { in _php_stream_fopen() 1331 if (VCWD_CHMOD(url_to, sb.st_mode)) { in php_plain_files_rename()
|
H A D | memory.c | 197 ssb->sb.st_mode = ms->mode & TEMP_STREAM_READONLY ? 0444 : 0666; in php_stream_memory_stat() 200 ssb->sb.st_mode |= S_IFREG; /* regular file */ in php_stream_memory_stat()
|
/php-src/Zend/ |
H A D | zend_stream.c | 45 if (!S_ISREG(buf.st_mode)) { in zend_stream_stdio_fsizer()
|
H A D | zend_virtual_cwd.c | 125 if (php_sys_stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode)) in php_is_dir_ok() 136 if (php_sys_stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode)) in php_is_file_ok() 904 if (save && S_ISLNK(st.st_mode)) { in tsrm_realpath_r() 936 directory = S_ISDIR(st.st_mode); in tsrm_realpath_r()
|
/php-src/ext/session/ |
H A D | mod_files.c | 186 …if(PG(open_basedir) && lstat(buf, &sbuf) == 0 && S_ISLNK(sbuf.st_mode) && php_check_open_basedir(b… in ps_files_open()
|