diff options
author | Matthew Macy <[email protected]> | 2019-11-30 15:49:09 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-11-30 15:49:09 -0800 |
commit | 42a826eed32cd428a3f7c796c619a854c1f8f9dd (patch) | |
tree | a7746a7f2bf9b7d9c1ea52493ff083972fb490b2 /include | |
parent | 758699b6f1d37e75f10b40e3ebafeaa231d88acd (diff) |
Add FreeBSD required defines to mntent.h
Linux and FreeBSD use different names for suid / setuid.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9632
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/mntent.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sys/mntent.h b/include/sys/mntent.h index fac751b46..8d578f67b 100644 --- a/include/sys/mntent.h +++ b/include/sys/mntent.h @@ -29,6 +29,8 @@ #ifndef _SYS_MNTENT_H #define _SYS_MNTENT_H +#define MNTMAXSTR 128 + #define MNTTYPE_ZFS "zfs" /* ZFS file system */ #define MOUNT_SUCCESS 0x00 /* Success */ @@ -71,8 +73,15 @@ #define MNTOPT_STRICTATIME "strictatime" /* strict access time updates */ #define MNTOPT_NOSTRICTATIME "nostrictatime" /* No strict access time updates */ #define MNTOPT_LAZYTIME "lazytime" /* Defer access time writing */ +#ifdef __linux__ #define MNTOPT_SETUID "suid" /* Both setuid and devices allowed */ #define MNTOPT_NOSETUID "nosuid" /* Neither setuid nor devices allowed */ +#elif defined(__FreeBSD__) +#define MNTOPT_SETUID "setuid" /* Set uid allowed */ +#define MNTOPT_NOSETUID "nosetuid" /* Set uid not allowed */ +#else +#error "unknown OS" +#endif #define MNTOPT_OWNER "owner" /* allow owner mount */ #define MNTOPT_NOOWNER "noowner" /* do not allow owner mount */ #define MNTOPT_REMOUNT "remount" /* change mount options */ |