MNT_USER?

From: Danny Braniss <danny_at_cs.huji.ac.il>
Date: Mon, 02 May 2005 11:14:38 +0300
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;
}
Received on Mon May 02 2005 - 06:14:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:33 UTC