Home
last modified time | relevance | path

Searched refs:st_mode (Results 1 – 25 of 45) sorted by relevance

12

/PHP-8.0/ext/fileinfo/libmagic/
H A Dfsmagic.c116 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 Dbuffer.c73 if (!S_ISREG(b->st.st_mode)) in buffer_fill()
H A Dmagic.c222 if (unreadable_info(ms, sb.st_mode, inname) == -1) in file_or_stream()
H A Dfuncs.c305 ms->mode = b.st.st_mode; in file_buffer()
/PHP-8.0/ext/phar/
H A Dfunc_interceptors.c499 if (S_ISLNK(stat_sb->st_mode)) { in phar_fancy_stat()
502 switch(stat_sb->st_mode & S_IFMT) { in phar_fancy_stat()
513 RETURN_BOOL((stat_sb->st_mode&xmask)!=0 && !S_ISDIR(stat_sb->st_mode)); in phar_fancy_stat()
515 RETURN_BOOL(S_ISREG(stat_sb->st_mode)); in phar_fancy_stat()
517 RETURN_BOOL(S_ISDIR(stat_sb->st_mode)); in phar_fancy_stat()
519 RETURN_BOOL(S_ISLNK(stat_sb->st_mode)); in phar_fancy_stat()
529 ZVAL_LONG(&stat_mode, stat_sb->st_mode); in phar_fancy_stat()
652 sb.st_mode = 0777; in phar_file_stat()
692 sb.st_mode = 0777; in phar_file_stat()
728 sb.st_mode |= S_IFLNK; in phar_file_stat()
[all …]
H A Dstream.c489 ssb->sb.st_mode = data->flags & PHAR_ENT_PERM_MASK; in phar_dostat()
490 ssb->sb.st_mode |= S_IFREG; /* regular file */ in phar_dostat()
497 ssb->sb.st_mode = data->flags & PHAR_ENT_PERM_MASK; in phar_dostat()
498 ssb->sb.st_mode |= S_IFDIR; /* regular directory */ in phar_dostat()
505 ssb->sb.st_mode = 0777; in phar_dostat()
506 ssb->sb.st_mode |= S_IFDIR; /* regular directory */ in phar_dostat()
512 ssb->sb.st_mode = (ssb->sb.st_mode & 0555) | (ssb->sb.st_mode & ~0777); in phar_dostat()
H A Dutil.c217 if (ssb.sb.st_mode & S_IFDIR) { in phar_mount_entry()
230 entry.flags = ssb.sb.st_mode; in phar_mount_entry()
1322 if ((ssb.sb.st_mode & S_IFDIR) && !dir) { in phar_get_entry_info_dir()
1330 if ((ssb.sb.st_mode & S_IFDIR) == 0 && dir) { in phar_get_entry_info_dir()
/PHP-8.0/ext/standard/
H A Drandom.c179 !(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode)) in php_random_bytes()
181 !S_ISCHR(st.st_mode) in php_random_bytes()
H A Dfilestat.c848 RETURN_LONG((zend_long)ssb.sb.st_mode); in php_stat()
864 if (S_ISLNK(ssb.sb.st_mode)) { in php_stat()
867 switch(ssb.sb.st_mode & S_IFMT) { in php_stat()
877 php_error_docref(NULL, E_NOTICE, "Unknown file type (%d)", ssb.sb.st_mode&S_IFMT); in php_stat()
880 RETURN_BOOL((ssb.sb.st_mode & wmask) != 0); in php_stat()
882 RETURN_BOOL((ssb.sb.st_mode&rmask)!=0); in php_stat()
884 RETURN_BOOL((ssb.sb.st_mode&xmask)!=0); in php_stat()
886 RETURN_BOOL(S_ISREG(ssb.sb.st_mode)); in php_stat()
888 RETURN_BOOL(S_ISDIR(ssb.sb.st_mode)); in php_stat()
890 RETURN_BOOL(S_ISLNK(ssb.sb.st_mode)); in php_stat()
[all …]
H A Dftp_fopen_wrapper.c789 …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()
793 ssb->sb.st_mode |= S_IFREG; in php_stream_ftp_url_stat()
795 ssb->sb.st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH; in php_stream_ftp_url_stat()
812 if (ssb->sb.st_mode & S_IFDIR) { in php_stream_ftp_url_stat()
H A Dphp_fopen_wrapper.c397 if (zend_fstat(fd, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { in php_stream_url_wrap_php()
H A Ddir.c511 if (S_IFDIR != (s.st_mode & S_IFMT)) { in PHP_FUNCTION()
/PHP-8.0/win32/
H A Dioutil.c876 buf->st_mode = _buf.st_mode; in php_win32_ioutil_fstat_int()
922 buf->st_mode = 0; in php_win32_ioutil_fstat_int()
931 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
936 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
943 buf->st_mode |= (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
947 buf->st_mode |= S_IFCHR; in php_win32_ioutil_fstat_int()
950 buf->st_mode |= S_IFIFO; in php_win32_ioutil_fstat_int()
953 buf->st_mode |= S_IFREG; in php_win32_ioutil_fstat_int()
956 …buf->st_mode |= (data->dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREA… in php_win32_ioutil_fstat_int()
1004 buf->st_mode = S_IFLNK; in php_win32_ioutil_stat_ex_w()
[all …]
H A Dglob.c571 !IS_SLASH(pathend[-1])) && (S_ISDIR(sb.st_mode) ||
572 (S_ISLNK(sb.st_mode) &&
574 S_ISDIR(sb.st_mode)))) {
H A Dioutil.h700 unsigned __int32 st_mode; member
/PHP-8.0/ext/standard/tests/file/
H A Dbug77552.phpt11 // Check lstat on a Windows junction to ensure that st_mode is zero
/PHP-8.0/ext/zip/
H A Dzip_stream.c178 ssb->sb.st_mode |= S_IFREG; /* regular file */ in php_zip_ops_stat()
181 ssb->sb.st_mode |= S_IFDIR; /* regular directory */ in php_zip_ops_stat()
/PHP-8.0/ext/fileinfo/
H A Dfileinfo.c463 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type()
478 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type()
H A Dlibmagic.patch2074 - sb->st_mode = S_IFBLK;
2079 - sb->st_mode |= S_IFCHR;
2080 - sb->st_mode &= ~S_IFREG;
2083 - sb->st_mode |= S_IFIFO;
2084 - sb->st_mode &= ~S_IFREG;
2098 switch (sb->st_mode & S_IFMT) {
2466 ms->mode = b.st.st_mode;
2835 - if (S_ISDIR(st.st_mode)) {
3027 - if (okstat && S_ISFIFO(sb.st_mode))
3037 - sb.st_mode = S_IFBLK;
[all …]
/PHP-8.0/main/
H A Dphp_ini.c573 if (!((statbuf.st_mode & S_IFMT) == S_IFDIR)) { in php_init_config()
684 if (S_ISREG(sb.st_mode)) { in php_init_config()
772 if (S_ISREG(sb.st_mode)) { in php_parse_user_ini_file()
/PHP-8.0/main/streams/
H A Dplain_wrapper.c249 self->is_seekable = !(S_ISFIFO(self->sb.st_mode) || S_ISCHR(self->sb.st_mode)); in detect_is_seekable()
250 self->is_pipe = S_ISFIFO(self->sb.st_mode); in detect_is_seekable()
1119 if ((r == 0 && !S_ISREG(self->sb.st_mode))) { in _php_stream_fopen()
1273 if (VCWD_CHMOD(url_to, sb.st_mode)) { in php_plain_files_rename()
H A Dmemory.c206 ssb->sb.st_mode = ms->mode & TEMP_STREAM_READONLY ? 0444 : 0666; in php_stream_memory_stat()
209 ssb->sb.st_mode |= S_IFREG; /* regular file */ in php_stream_memory_stat()
/PHP-8.0/Zend/
H A Dzend_stream.c45 if (!S_ISREG(buf.st_mode)) { in zend_stream_stdio_fsizer()
H A Dzend_virtual_cwd.c125 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()
905 if (save && S_ISLNK(st.st_mode)) { in tsrm_realpath_r()
937 directory = S_ISDIR(st.st_mode); in tsrm_realpath_r()
/PHP-8.0/ext/session/
H A Dmod_files.c188 …if(PG(open_basedir) && lstat(buf, &sbuf) == 0 && S_ISLNK(sbuf.st_mode) && php_check_open_basedir(b… in ps_files_open()

Completed in 142 milliseconds

12