Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 May 2005 11:14:38 +0300
From:      Danny Braniss <danny@cs.huji.ac.il>
To:        current@freebsd.org
Cc:        stable@freebsd.org
Subject:   MNT_USER?
Message-ID:  <E1DSW4c-00041V-Ll@cs1.cs.huji.ac.il>

next in thread | raw e-mail | index | archive | help

after doing a mount_nfs as root (from the console or via su), statfs reports
that MNT_USER flags is set! this is also true with 5.4.

is this a bug or feature?

the problem can be seen with:

#include <stdio.h>
#include <fcntl.h>
#include <sys/param.h>
#include <sys/mount.h>

int main(int argc, char *argv[])
{
    struct statfs stbuf;
    int	fd;

    if (argc != 2) {
	fprintf(stderr, "Usage: noexec directory\n");
	return -1;
    }
    if (statfs(argv[1], &stbuf) != 0) {
	perror("statfs");
	return -1;
    }
    printf("FLAGS: 0x%08X\n", stbuf.f_flags);
    if (stbuf.f_flags & MNT_NOEXEC)
	printf("MNT_NOEXEC\n");
    return 0;
}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1DSW4c-00041V-Ll>