Danny Braniss danny at
Mon May 2 01:14:41 PDT 2005

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) {
	return -1;
    printf("FLAGS: 0x%08X\n", stbuf.f_flags);
    if (stbuf.f_flags & MNT_NOEXEC)
    return 0;

More information about the freebsd-stable mailing list