/illumos-gate/usr/src/cmd/oamuser/lib/ |
H A D | file.c | 32 check_perm( statbuf, uid, gid, perm ) in check_perm() argument 33 struct stat statbuf; in check_perm() 41 if( S_ISDIR( statbuf.st_mode )) { 47 if( (statbuf.st_uid == uid) && 48 (statbuf.st_mode & (perm << 6)) == (perm << 6) ) 51 if( (statbuf.st_gid == gid) && 52 (statbuf.st_mode & (perm << 3)) == (perm << 3) ) 55 if( (statbuf.st_mode & perm) == perm )
|
/illumos-gate/usr/src/lib/libpkg/common/ |
H A D | isdir.c | 94 struct stat statbuf; in isdir() local 98 if (stat(path, &statbuf) != 0) { in isdir() 104 if ((statbuf.st_mode & S_IFMT) != S_IFDIR) { in isdir() 127 struct stat statbuf; in isfile() local 139 if (stat(file, &statbuf) != 0) { in isfile() 145 if ((statbuf.st_mode & S_IFMT) == S_IFDIR) { in isfile() 243 struct stat statbuf; in isPathRemote() local 245 r = lstat(a_path, &statbuf); in isPathRemote() 250 return (isFstypeRemote(statbuf.st_fstype)); in isPathRemote() 268 struct stat statbuf; in isFdRemote() local [all …]
|
H A D | vfpops.c | 158 struct stat statbuf; in vfpOpen() local 218 if (fstat(fileno(fp), &statbuf) != 0) { in vfpOpen() 246 vfp->_vfpMapSize = statbuf.st_size; in vfpOpen() 305 vfp->_vfpSize = statbuf.st_size+pagesize; in vfpOpen() 320 if (statbuf.st_size != 0) { in vfpOpen() 322 statbuf.st_size); in vfpOpen() 323 if (rlen != statbuf.st_size) { in vfpOpen() 881 if (stat(a_path, &statbuf) != 0) { in vfpCheckpointFile() 1018 if (stat(a_path, &statbuf) != 0) { in vfpCheckpointOpen() 1032 (statbuf.st_ino != cpVfp->_vfpCkIno) || in vfpCheckpointOpen() [all …]
|
/illumos-gate/usr/src/common/ficl/ficlplatform/ |
H A D | unix.c | 62 struct stat statbuf; in ficlFileStatus() local 64 if (stat(filename, &statbuf) == 0) { in ficlFileStatus() 65 *status = statbuf.st_mode; in ficlFileStatus() 75 struct stat statbuf; in ficlFileSize() local 80 statbuf.st_size = -1; in ficlFileSize() 81 if (fstat(fileno(ff->f), &statbuf) != 0) in ficlFileSize() 84 return (statbuf.st_size); in ficlFileSize()
|
/illumos-gate/usr/src/lib/libtecla/common/ |
H A D | pathutil.c | 371 struct stat statbuf; /* The file-statistics return buffer */ in _pu_path_is_dir() local 375 if(stat(pathname, &statbuf) < 0) in _pu_path_is_dir() 380 return S_ISDIR(statbuf.st_mode) != 0; in _pu_path_is_dir() 394 struct stat statbuf; /* The file-statistics return buffer */ in _pu_path_is_file() local 398 if(stat(pathname, &statbuf) < 0) in _pu_path_is_file() 403 return S_ISREG(statbuf.st_mode) != 0; in _pu_path_is_file() 421 if(stat(pathname, &statbuf) < 0) in _pu_path_is_exe() 426 return S_ISREG(statbuf.st_mode) != 0 && in _pu_path_is_exe() 427 (statbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)) && in _pu_path_is_exe() 535 struct stat statbuf; in _pu_file_exists() local [all …]
|
/illumos-gate/usr/src/cmd/oamuser/user/ |
H A D | movedir.c | 58 struct stat statbuf; in move_dir() local 85 if (stat(from, &statbuf) == 0) { in move_dir() 86 chmod(to, statbuf.st_mode); in move_dir() 87 times.actime = statbuf.st_atime; in move_dir() 88 times.modtime = statbuf.st_mtime; in move_dir()
|
/illumos-gate/usr/src/cmd/ttymon/ |
H A D | tmutil.c | 57 struct stat statbuf; in check_device() local 68 if (stat(device, &statbuf) < 0) { in check_device() 72 if ((statbuf.st_mode & S_IFMT) != S_IFCHR) { in check_device() 92 struct stat statbuf; in check_cmd() local 107 if (stat(tp, &statbuf) < 0) { in check_cmd() 111 if (!(statbuf.st_mode & 0111)) { in check_cmd() 115 if ((statbuf.st_mode & S_IFMT) != S_IFREG) { in check_cmd()
|
/illumos-gate/usr/src/lib/libcurses/screen/ |
H A D | scr_ll_dump.c | 53 struct stat statbuf; in scr_ll_dump() local 60 statbuf.st_mtime = 0; in scr_ll_dump() 62 (void) stat(thistty, &statbuf); in scr_ll_dump() 64 if (fwrite((char *) &(statbuf.st_mtime), sizeof (time_t), in scr_ll_dump()
|
/illumos-gate/usr/src/test/zfs-tests/tests/functional/exec/ |
H A D | mmap_exec.c | 44 struct stat statbuf; in main() local 59 if (fstat(fd, &statbuf) < 0) { in main() 64 if (mmap(0, statbuf.st_size, in main()
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | nlspath_checks.c | 83 nls_safe_open(const char *path, struct stat64 *statbuf, int *trust, int safe) in nls_safe_open() argument 104 if (fstat64(fd, statbuf) == -1) { in nls_safe_open() 141 if (statbuf->st_uid == 0 || statbuf->st_uid == 2) { in nls_safe_open() 148 if ((statbuf->st_mode & (S_IWOTH)) == 0 && in nls_safe_open() 149 ((statbuf->st_mode & (S_IWGRP)) == 0 || in nls_safe_open() 150 (statbuf->st_gid < 4 && statbuf->st_gid != 1))) { in nls_safe_open()
|
H A D | catopen.c | 283 struct stat64 statbuf; in file_open() local 289 fd = nls_safe_open(name, &statbuf, &trust, safe); in file_open() 295 addr = mmap(0, (size_t)statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0); in file_open() 305 (void) munmap(addr, (size_t)statbuf.st_size); in file_open() 312 (void) munmap(addr, statbuf.st_size); in file_open() 316 tmp_catd->__size = (int)statbuf.st_size; in file_open()
|
/illumos-gate/usr/src/cmd/svr4pkg/pkgproto/ |
H A D | main.c | 446 struct stat statbuf; in findlink() local 451 if (lstat(path, &statbuf)) { in findlink() 455 if ((statbuf.st_mode & S_IFMT) == S_IFLNK) { in findlink() 473 if (stat(path, &statbuf)) in findlink() 475 if (statbuf.st_nlink <= 1) in findlink() 479 if ((statbuf.st_ino == link->ino) && in findlink() 480 (statbuf.st_dev == link->dev)) { in findlink() 501 new->ino = statbuf.st_ino; in findlink() 502 new->dev = statbuf.st_dev; in findlink()
|
/illumos-gate/usr/src/lib/libcryptoutil/common/ |
H A D | keyfile.c | 50 struct stat statbuf; in pkcs11_read_data() local 65 if (fstat(fd, &statbuf) == -1) { in pkcs11_read_data() 71 if (S_ISREG(statbuf.st_mode)) { in pkcs11_read_data() 73 filesize = statbuf.st_size; in pkcs11_read_data()
|
/illumos-gate/usr/src/lib/brand/solaris10/s10_replacefile/ |
H A D | s10_replacefile.c | 80 struct stat statbuf; in main() local 109 if (stat(argv[4], &statbuf) == 0 && (statbuf.st_mode & S_IFREG)) { in main()
|
/illumos-gate/usr/src/lib/libsec/common/ |
H A D | aclutils.c | 111 struct stat64 statbuf; in cacl_get() local 173 stat_error = stat64(fname, &statbuf); in cacl_get() 177 stat_error = fstat64(fd, &statbuf); in cacl_get() 192 (S_ISDIR(statbuf.st_mode) ? ACL_IS_DIR : 0); in cacl_get() 253 struct stat64 statbuf; in cacl_set() local 259 stat_error = stat64(acl_inp->file, &statbuf); in cacl_set() 264 stat_error = fstat64(acl_inp->fd, &statbuf); in cacl_set() 281 isdir = S_ISDIR(statbuf.st_mode); in cacl_set() 284 statbuf.st_uid, statbuf.st_gid)) != 0) { in cacl_set() 399 struct stat64 statbuf; in acl_strip() local [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/sbin/dhcpagent/ |
H A D | defaults.c | 170 struct stat statbuf; in df_get_string() local 178 if (stat(DHCP_AGENT_DEFAULTS, &statbuf) != 0) { in df_get_string() 191 if (statbuf.st_mtime != df_statbuf.st_mtime || in df_get_string() 192 statbuf.st_size != df_statbuf.st_size) { in df_get_string() 193 df_statbuf = statbuf; in df_get_string()
|
/illumos-gate/usr/src/cmd/svr4pkg/pkgmk/ |
H A D | mkpkgmap.c | 364 struct stat statbuf; in findfile() local 401 if (stat(temp, &statbuf) || in findfile() 402 !(statbuf.st_mode & S_IFREG)) { in findfile() 415 if ((stat(host, &statbuf) == 0) && in findfile() 416 (statbuf.st_mode & S_IFREG)) { in findfile() 430 if ((stat(host, &statbuf) == 0) && in findfile() 431 (statbuf.st_mode & S_IFREG)) { in findfile() 438 if ((stat(host, &statbuf) == 0) && (statbuf.st_mode & S_IFREG)) in findfile() 807 struct stat statbuf; in srchroot() local 818 if (stat(copy, &statbuf) || !(statbuf.st_mode & S_IFREG)) { in srchroot()
|
/illumos-gate/usr/src/cmd/zinject/ |
H A D | translate.c | 85 struct stat64 *statbuf) in parse_pathname() argument 107 if (stat64(fullpath, statbuf) != 0) { in parse_pathname() 120 if (makedev(mp.mnt_major, mp.mnt_minor) == statbuf->st_dev) { in parse_pathname() 246 struct stat64 statbuf; in translate_record() local 289 if (parse_pathname(object, dataset, path, &statbuf) != 0) in translate_record() 298 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
|
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | dnsglue.c | 83 struct __res_state statbuf; in krb5int_dns_init() local 108 memset(&statbuf, 0, sizeof(statbuf)); in krb5int_dns_init() 109 ret = res_ninit(&statbuf); in krb5int_dns_init() 128 len = res_nsearch(&statbuf, host, ds->nclass, ds->ntype, in krb5int_dns_init() 159 res_ndestroy(&statbuf); in krb5int_dns_init()
|
/illumos-gate/usr/src/cmd/lp/lib/lp/ |
H A D | next.c | 112 struct stat statbuf; local 116 if (Stat(path, &statbuf) == -1) { 121 return ((statbuf.st_mode & S_IFMT) == what);
|
/illumos-gate/usr/src/lib/libresolv2/common/bsd/ |
H A D | writev.c | 19 struct stat statbuf; in __writev() local 21 if (fstat(fd, &statbuf) < 0) in __writev() 27 if (statbuf.st_mode & S_IFSOCK) { in __writev()
|
/illumos-gate/usr/src/cmd/lp/lib/forms/ |
H A D | putform.c | 53 struct stat statbuf; in putform() local 72 if (Stat(path, &statbuf) == 0) { in putform() 73 if (!S_ISDIR(statbuf.st_mode)) { in putform()
|
/illumos-gate/usr/src/test/os-tests/tests/libtopo/ |
H A D | digraph-test.c | 79 struct stat statbuf = { 0 }; in test_deserialize() local 89 if (fstat(fd, &statbuf) != 0) { in test_deserialize() 93 if ((buf = malloc(statbuf.st_size)) == NULL) { in test_deserialize() 97 if (read(fd, buf, statbuf.st_size) != statbuf.st_size) { in test_deserialize() 103 tdg = topo_digraph_deserialize(thp, buf, statbuf.st_size); in test_deserialize()
|
/illumos-gate/usr/src/lib/libc/port/stdio/ |
H A D | tempnam.c | 57 struct stat64 statbuf; in tempnam() local 64 if (stat64(dir, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) in tempnam()
|
/illumos-gate/usr/src/lib/libnsl/rpc/ |
H A D | rpc_generic.c | 419 struct stat statbuf; in __rpcfd_to_nconf() local 425 if (fstat(fd, &statbuf) == -1) in __rpcfd_to_nconf() 428 fdmajor = major(statbuf.st_rdev); in __rpcfd_to_nconf() 460 if (!stat(nconf->nc_device, &statbuf)) { in __rpcfd_to_nconf() 461 if (fdmajor == major(statbuf.st_rdev)) in __rpcfd_to_nconf() 463 if (fdmajor == minor(statbuf.st_rdev)) in __rpcfd_to_nconf()
|