Lines Matching refs:stbuf
468 static int check_perm(const char **mntp, struct stat *stbuf, int *currdir_fd,
475 res = stat(mnt, stbuf);
486 if (S_ISDIR(stbuf->st_mode)) {
500 res = lstat(mnt, stbuf);
507 if ((stbuf->st_mode & S_ISVTX) && stbuf->st_uid != getuid()) {
519 } else if (S_ISREG(stbuf->st_mode)) {
527 res = fstat(*mountpoint_fd, stbuf);
533 if (!S_ISREG(stbuf->st_mode)) {
598 struct stat stbuf;
618 res = check_perm(&real_mnt, &stbuf, &currdir_fd, &mountpoint_fd);
620 res = do_mount(real_mnt, &type, stbuf.st_mode & S_IFMT, fd, opts, dev,