diff options
-rw-r--r-- | util-linux/mount.c | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index f94b6e643..1dd4c0c43 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -820,31 +820,31 @@ enum { | |||
820 | */ | 820 | */ |
821 | 821 | ||
822 | struct nfs2_fh { | 822 | struct nfs2_fh { |
823 | char data[32]; | 823 | char data[32]; |
824 | }; | 824 | }; |
825 | struct nfs3_fh { | 825 | struct nfs3_fh { |
826 | unsigned short size; | 826 | unsigned short size; |
827 | unsigned char data[64]; | 827 | unsigned char data[64]; |
828 | }; | 828 | }; |
829 | 829 | ||
830 | struct nfs_mount_data { | 830 | struct nfs_mount_data { |
831 | int version; /* 1 */ | 831 | int version; /* 1 */ |
832 | int fd; /* 1 */ | 832 | int fd; /* 1 */ |
833 | struct nfs2_fh old_root; /* 1 */ | 833 | struct nfs2_fh old_root; /* 1 */ |
834 | int flags; /* 1 */ | 834 | int flags; /* 1 */ |
835 | int rsize; /* 1 */ | 835 | int rsize; /* 1 */ |
836 | int wsize; /* 1 */ | 836 | int wsize; /* 1 */ |
837 | int timeo; /* 1 */ | 837 | int timeo; /* 1 */ |
838 | int retrans; /* 1 */ | 838 | int retrans; /* 1 */ |
839 | int acregmin; /* 1 */ | 839 | int acregmin; /* 1 */ |
840 | int acregmax; /* 1 */ | 840 | int acregmax; /* 1 */ |
841 | int acdirmin; /* 1 */ | 841 | int acdirmin; /* 1 */ |
842 | int acdirmax; /* 1 */ | 842 | int acdirmax; /* 1 */ |
843 | struct sockaddr_in addr; /* 1 */ | 843 | struct sockaddr_in addr; /* 1 */ |
844 | char hostname[256]; /* 1 */ | 844 | char hostname[256]; /* 1 */ |
845 | int namlen; /* 2 */ | 845 | int namlen; /* 2 */ |
846 | unsigned int bsize; /* 3 */ | 846 | unsigned int bsize; /* 3 */ |
847 | struct nfs3_fh root; /* 4 */ | 847 | struct nfs3_fh root; /* 4 */ |
848 | }; | 848 | }; |
849 | 849 | ||
850 | /* bits in the flags field */ | 850 | /* bits in the flags field */ |
@@ -859,6 +859,7 @@ enum { | |||
859 | NFS_MOUNT_VER3 = 0x0080, /* 3 */ | 859 | NFS_MOUNT_VER3 = 0x0080, /* 3 */ |
860 | NFS_MOUNT_KERBEROS = 0x0100, /* 3 */ | 860 | NFS_MOUNT_KERBEROS = 0x0100, /* 3 */ |
861 | NFS_MOUNT_NONLM = 0x0200, /* 3 */ | 861 | NFS_MOUNT_NONLM = 0x0200, /* 3 */ |
862 | NFS_MOUNT_NOACL = 0x0800, /* 4 */ | ||
862 | NFS_MOUNT_NORDIRPLUS = 0x4000 | 863 | NFS_MOUNT_NORDIRPLUS = 0x4000 |
863 | }; | 864 | }; |
864 | 865 | ||
@@ -1123,6 +1124,7 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts) | |||
1123 | int noac; | 1124 | int noac; |
1124 | int nordirplus; | 1125 | int nordirplus; |
1125 | int nolock; | 1126 | int nolock; |
1127 | int noacl; | ||
1126 | 1128 | ||
1127 | find_kernel_nfs_mount_version(); | 1129 | find_kernel_nfs_mount_version(); |
1128 | 1130 | ||
@@ -1195,6 +1197,7 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts) | |||
1195 | nolock = 0; | 1197 | nolock = 0; |
1196 | noac = 0; | 1198 | noac = 0; |
1197 | nordirplus = 0; | 1199 | nordirplus = 0; |
1200 | noacl = 0; | ||
1198 | retry = 10000; /* 10000 minutes ~ 1 week */ | 1201 | retry = 10000; /* 10000 minutes ~ 1 week */ |
1199 | tcp = 1; /* nfs-utils uses tcp per default */ | 1202 | tcp = 1; /* nfs-utils uses tcp per default */ |
1200 | 1203 | ||
@@ -1333,7 +1336,8 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts) | |||
1333 | "tcp\0" | 1336 | "tcp\0" |
1334 | "udp\0" | 1337 | "udp\0" |
1335 | "lock\0" | 1338 | "lock\0" |
1336 | "rdirplus\0"; | 1339 | "rdirplus\0" |
1340 | "acl\0"; | ||
1337 | int val = 1; | 1341 | int val = 1; |
1338 | if (!strncmp(opt, "no", 2)) { | 1342 | if (!strncmp(opt, "no", 2)) { |
1339 | val = 0; | 1343 | val = 0; |
@@ -1383,6 +1387,9 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts) | |||
1383 | case 11: //rdirplus | 1387 | case 11: //rdirplus |
1384 | nordirplus = !val; | 1388 | nordirplus = !val; |
1385 | break; | 1389 | break; |
1390 | case 12: // acl | ||
1391 | noacl = !val; | ||
1392 | break; | ||
1386 | default: | 1393 | default: |
1387 | bb_error_msg("unknown nfs mount option: %s%s", val ? "" : "no", opt); | 1394 | bb_error_msg("unknown nfs mount option: %s%s", val ? "" : "no", opt); |
1388 | goto fail; | 1395 | goto fail; |
@@ -1396,7 +1403,8 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts) | |||
1396 | | (posix ? NFS_MOUNT_POSIX : 0) | 1403 | | (posix ? NFS_MOUNT_POSIX : 0) |
1397 | | (nocto ? NFS_MOUNT_NOCTO : 0) | 1404 | | (nocto ? NFS_MOUNT_NOCTO : 0) |
1398 | | (noac ? NFS_MOUNT_NOAC : 0) | 1405 | | (noac ? NFS_MOUNT_NOAC : 0) |
1399 | | (nordirplus ? NFS_MOUNT_NORDIRPLUS : 0); | 1406 | | (nordirplus ? NFS_MOUNT_NORDIRPLUS : 0) |
1407 | | (noacl ? NFS_MOUNT_NOACL : 0); | ||
1400 | if (nfs_mount_version >= 2) | 1408 | if (nfs_mount_version >= 2) |
1401 | data.flags |= (tcp ? NFS_MOUNT_TCP : 0); | 1409 | data.flags |= (tcp ? NFS_MOUNT_TCP : 0); |
1402 | if (nfs_mount_version >= 3) | 1410 | if (nfs_mount_version >= 3) |