/original-bsd/usr.sbin/mtree/ |
H A D | compare.c | 54 if (!S_ISBLK(p->fts_statp->st_mode)) 58 if (!S_ISCHR(p->fts_statp->st_mode)) 62 if (!S_ISDIR(p->fts_statp->st_mode)) 66 if (!S_ISFIFO(p->fts_statp->st_mode)) 70 if (!S_ISREG(p->fts_statp->st_mode)) 74 if (!S_ISLNK(p->fts_statp->st_mode)) 78 if (!S_ISSOCK(p->fts_statp->st_mode)) { 81 ftype(s->type), inotype(p->fts_statp->st_mode)); 115 s->st_mode != (p->fts_statp->st_mode & MBITS)) { 118 tab, s->st_mode, p->fts_statp->st_mode & MBITS); [all …]
|
H A D | create.c | 99 if (S_ISDIR(p->fts_statp->st_mode)) 109 if (!S_ISREG(p->fts_statp->st_mode)) 110 output(&indent, "type=%s", inotype(p->fts_statp->st_mode)); 121 if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) 122 output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS); 131 if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { 179 smode = p->fts_statp->st_mode & MBITS; 225 if (S_ISDIR((*a)->fts_statp->st_mode)) { 226 if (!S_ISDIR((*b)->fts_statp->st_mode)) 228 } else if (S_ISDIR((*b)->fts_statp->st_mode))
|
/original-bsd/usr.bin/biff/ |
H A D | biff.c | 55 (void)printf("is %s\n", sb.st_mode&0100 ? "y" : "n"); 56 exit(sb.st_mode & 0100 ? 0 : 1); 61 if (chmod(name, sb.st_mode & ~0100) < 0) 65 if (chmod(name, sb.st_mode | 0100) < 0) 71 exit(sb.st_mode & 0100 ? 0 : 1);
|
/original-bsd/bin/cp/ |
H A D | utils.c | 69 fs->st_mode & ~(S_ISUID | S_ISGID)); 134 else if (fs->st_mode & (S_ISUID | S_ISGID) && fs->st_uid == myuid) 139 fchmod(to_fd, fs->st_mode & RETAINBITS & ~myumask)) { 184 if (mkfifo(to.p_path, from_stat->st_mode)) { 200 if (mknod(to.p_path, from_stat->st_mode, from_stat->st_rdev)) { 217 fs->st_mode &= S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO; 237 fs->st_mode &= ~(S_ISUID | S_ISGID); 239 if (fd ? fchmod(fd, fs->st_mode) : chmod(to.p_path, fs->st_mode)) {
|
H A D | cp.c | 182 if (r == -1 || !S_ISDIR(to_stat.st_mode)) { 203 if (S_ISDIR(tmp_stat.st_mode) && (Rflag || rflag)) 314 if (S_ISDIR(curr->fts_statp->st_mode)) 318 if (!S_ISDIR(curr->fts_statp->st_mode) && 319 S_ISDIR(to_stat.st_mode)) { 328 switch (curr->fts_statp->st_mode & S_IFMT) { 351 curr->fts_statp->st_mode | S_IRWXU) < 0) 353 } else if (!S_ISDIR(to_stat.st_mode)) { 367 curr->fts_statp->st_mode);
|
/original-bsd/local/local.cmd/ |
H A D | dl.c | 12 #define ISDIR(st) (((st).st_mode&S_IFMT) == S_IFDIR) 13 #define ISLNK(st) (((st).st_mode&S_IFMT) == S_IFLNK) 14 #define ISREG(st) (((st).st_mode&S_IFMT) == S_IFREG) 16 (((st).st_mode&S_IFMT) == S_IFCHR || ((st).st_mode&S_IFMT) == S_IFBLK) 370 if ((buf1.st_mode&S_IFMT) == S_IFDIR) { 390 if ((buf2.st_mode&S_IFMT) == S_IFDIR) { 487 s2.st_mode & MODEBITS, target) == 0) 559 m = umask(~(s1.st_mode & MODEBITS)); 676 (stto.st_mode&S_IFMT) == S_IFDIR) { 704 if ((stto.st_mode&S_IFMT) == S_IFDIR) { [all …]
|
/original-bsd/usr.bin/find/ |
H A D | ls.c | 38 (void)strmode(sb->st_mode, modep); 43 if (S_ISCHR(sb->st_mode) || S_ISBLK(sb->st_mode)) 50 if (S_ISLNK(sb->st_mode))
|
/original-bsd/sbin/mount_umap/ |
H A D | mount_umap.c | 110 if (statbuf.st_mode & S_IWGRP || statbuf.st_mode & S_IWOTH) { 111 strmode(statbuf.st_mode, buf); 157 if (statbuf.st_mode & S_IWGRP || statbuf.st_mode & S_IWOTH) { 158 strmode(statbuf.st_mode, buf);
|
/original-bsd/usr.bin/mesg/ |
H A D | mesg.c | 57 if (sb.st_mode & S_IWGRP) { 67 if (chmod(tty, sb.st_mode | S_IWGRP) < 0) 71 if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0)
|
/original-bsd/usr.bin/file/ |
H A D | file.c | 125 switch (mbuf.st_mode & S_IFMT) { 138 if (mbuf.st_mode & S_ISVTX) 234 if (mbuf.st_mode & S_ISUID) 236 if (mbuf.st_mode & S_ISGID) 238 if (mbuf.st_mode & S_ISVTX) 240 if ((mbuf.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 && 405 if (mbuf.st_mode & S_ISUID) 407 if (mbuf.st_mode & S_ISGID) 409 if (mbuf.st_mode & S_ISVTX) 562 if (sb->st_mode & S_ISUID) [all …]
|
/original-bsd/bin/rm/ |
H A D | rm.c | 219 sb.st_mode = S_IFWHT|S_IWUSR|S_IRUSR; 233 if (S_ISDIR(sb.st_mode) && !dflag) { 238 if (!fflag && !S_ISWHT(sb.st_mode) && !check(f, f, &sb)) 240 if (S_ISWHT(sb.st_mode)) 242 else if (S_ISDIR(sb.st_mode)) 283 if (!S_ISREG(sbp->st_mode)) 329 if (!stdin_ok || S_ISLNK(sp->st_mode) || !access(name, W_OK)) 331 strmode(sp->st_mode, modep);
|
/original-bsd/usr.bin/compress/ |
H A D | compress.c | 173 if (!force && exists && S_ISREG(sb.st_mode) && !permission(out)) 175 isreg = oreg = !exists || S_ISREG(sb.st_mode); 186 if (!S_ISREG(isb.st_mode)) 263 if (!force && exists && S_ISREG(sb.st_mode) && !permission(out)) 265 isreg = oreg = !exists || S_ISREG(sb.st_mode); 281 if (!S_ISREG(sb.st_mode)) 325 fs->st_mode &= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO; 341 fs->st_mode &= ~(S_ISUID|S_ISGID); 343 if (chmod(name, fs->st_mode))
|
/original-bsd/bin/pax/ |
H A D | file_subs.c | 74 file_mode = arcn->sb.st_mode & FILEBITS; 145 arcn->sb.st_mode &= ~(SETBITS); 147 set_pmode(arcn->name, arcn->sb.st_mode); 181 if (S_ISDIR(sb.st_mode)) { 308 if (S_ISDIR(sb.st_mode)) { 377 file_mode = arcn->sb.st_mode & FILEBITS; 460 arcn->sb.st_mode &= ~(SETBITS); 462 set_pmode(arcn->name, arcn->sb.st_mode); 487 ((sb.st_mode & FILEBITS) | S_IRWXU)); 489 arcn->sb.st_mode = sb.st_mode; [all …]
|
H A D | tar.c | 455 arcn->sb.st_mode |= S_IFLNK; 472 arcn->sb.st_mode |= S_IFREG; 487 arcn->sb.st_mode |= S_IFDIR; 496 arcn->sb.st_mode |= S_IFREG; 847 arcn->sb.st_mode |= S_IFIFO; 851 arcn->sb.st_mode |= S_IFDIR; 869 arcn->sb.st_mode |= S_IFBLK; 872 arcn->sb.st_mode |= S_IFCHR; 882 arcn->sb.st_mode |= S_IFLNK; 888 arcn->sb.st_mode |= S_IFREG; [all …]
|
H A D | cpio.c | 107 switch(arcn->sb.st_mode & C_IFMT) { 133 arcn->sb.st_mode = (arcn->sb.st_mode & 0xfff) | C_ISREG; 323 arcn->sb.st_mode = (mode_t)asc_ul(hd->c_mode, sizeof(hd->c_mode), OCT); 350 if (((arcn->sb.st_mode&C_IFMT) != C_ISLNK)||(arcn->sb.st_size == 0)) { 487 ul_asc((u_long)arcn->sb.st_mode, hd->c_mode, sizeof(hd->c_mode), 854 ul_asc((u_long)arcn->sb.st_mode, hd->c_mode, sizeof(hd->c_mode), 991 arcn->sb.st_mode = (mode_t)(RSHRT_EXT(hd->h_mode)); 1006 arcn->sb.st_mode = (mode_t)(SHRT_EXT(hd->h_mode)); 1179 hd->h_mode[0] = CHR_WR_2(arcn->sb.st_mode); 1180 hd->h_mode[1] = CHR_WR_3(arcn->sb.st_mode); [all …]
|
/original-bsd/usr.sbin/sendmail/src/ |
H A D | util.c | 469 bitset(S_IXUSR, stbuf.st_mode)) 472 bitset(S_IXGRP, stbuf.st_mode)) 531 if ((stbuf.st_mode & md) != md) 537 fn, stbuf.st_uid, stbuf.st_mode, 540 st->st_mode = ST_MODE_NOFILE; 568 if (bitset(S_ISUID, st->st_mode)) 577 if (bitset(S_ISGID, st->st_mode)) 610 st->st_uid, st->st_mode, mode); 613 (st->st_mode & mode) == mode) 683 if (stb.st_mode == ST_MODE_NOFILE) [all …]
|
/original-bsd/usr.bin/diff/diff/ |
H A D | diff.c | 145 stb1.st_mode = S_IFREG; 152 stb2.st_mode = S_IFREG; 158 if ((stb1.st_mode & S_IFMT) == S_IFDIR && 159 (stb2.st_mode & S_IFMT) == S_IFDIR) {
|
/original-bsd/bin/ln/ |
H A D | ln.c | 80 if (!S_ISDIR(sb.st_mode)) 103 if (!dirflag && (sb.st_mode & S_IFMT) == S_IFDIR) { 110 if (isdir || (exists = !stat(source, &sb)) && S_ISDIR(sb.st_mode)) {
|
/original-bsd/bin/mv/ |
H A D | mv.c | 78 if (stat(argv[argc - 1], &sb) || !S_ISDIR(sb.st_mode)) { 126 strmode(sb.st_mode, modep); 157 return (S_ISREG(sb.st_mode) ? 176 open(to, O_CREAT | O_TRUNC | O_WRONLY, sbp->st_mode)) < 0) { 202 if (fchmod(to_fd, sbp->st_mode))
|
/original-bsd/local/toolchest/ksh/sh/ |
H A D | suid_exec.c | 109 if((statb.st_mode&S_ISUID)==0 || statb.st_uid 128 if((statb.st_mode&~S_IFMT) != SPECIAL) 168 if(priv && statb.st_mode & S_ISUID) 170 if(priv && statb.st_mode & S_ISGID) 251 if((statb.st_mode&S_IFMT) != S_IFREG || mode != 1) 279 if(statb.st_mode & mode)
|
/original-bsd/bin/ls/ |
H A D | print.c | 76 (void)strmode(sp->st_mode, buf); 83 if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode)) 99 (void)printtype(sp->st_mode); 100 if (S_ISLNK(sp->st_mode)) 194 chcnt += printtype(sp->st_mode);
|
/original-bsd/usr.bin/uucp/uucp/ |
H A D | uucp.c | 276 if ((stbuf.st_mode & ANYREAD) == 0) { 278 file1, (int)stbuf.st_mode); 281 if (statret == 0 && (stbuf1.st_mode & ANYWRITE) == 0) { 283 file2, (int)stbuf.st_mode); 331 if ((stbuf.st_mode & S_IFMT) == S_IFDIR) { 336 if ((stbuf.st_mode & ANYREAD) == 0) { 338 file1, (int)stbuf.st_mode); 365 User, Optns, dfile, (int)stbuf.st_mode & 0777, Nuser);
|
/original-bsd/usr.bin/tail/ |
H A D | forward.c | 68 if (S_ISREG(sbp->st_mode)) { 100 if (S_ISREG(sbp->st_mode)) { 116 if (S_ISREG(sbp->st_mode))
|
/original-bsd/old/games.vax/compat/ |
H A D | unixtraps.c | 257 if (stat32v.st_mode & (S_IEXEC>>6)) 259 if (stat32v.st_mode & (S_IEXEC>>3)) { 265 if (stat32v.st_mode & S_IEXEC) { 275 if ((stat32v.st_mode&S_IFMT) == S_IFDIR) 298 if (stat32v.st_mode & S_ISGID || stat32v.st_mode & S_ISUID) { 389 statv7.v7st_mode = stat32v.st_mode; 413 v6stat->flags = stat32v.st_mode; 603 chmod(args[0], stat32v.st_mode); 612 ((stat32v.st_mode & S_IFMT) == S_IFDIR) &&
|
/original-bsd/lib/libc/stdio/ |
H A D | makebuf.c | 77 *couldbetty = (st.st_mode & S_IFMT) == S_IFCHR; 90 return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
|