diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-10 16:34:45 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-10 16:34:45 +0000 |
commit | 15eddd925db762657fae2131d3d9d33888760757 (patch) | |
tree | a3870badbccb1a08593f4adb3a9ff8b02387a4bc /user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch | |
parent | adcc7ec8dc023dfdfddf74cf9b36f6fac518f61e (diff) | |
download | packages-15eddd925db762657fae2131d3d9d33888760757.tar.gz packages-15eddd925db762657fae2131d3d9d33888760757.tar.bz2 packages-15eddd925db762657fae2131d3d9d33888760757.tar.xz packages-15eddd925db762657fae2131d3d9d33888760757.zip |
user/nfs-utils: new package
Diffstat (limited to 'user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch')
-rw-r--r-- | user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch b/user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch new file mode 100644 index 000000000..c9e60afc7 --- /dev/null +++ b/user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch @@ -0,0 +1,39 @@ +ripped from Debian + +--- nfs-utils-1.1.4/utils/mount/fstab.c ++++ nfs-utils-1.1.4/utils/mount/fstab.c +@@ -57,7 +57,7 @@ mtab_does_not_exist(void) { + return var_mtab_does_not_exist; + } + +-static int ++int + mtab_is_a_symlink(void) { + get_mtab_info(); + return var_mtab_is_a_symlink; +--- nfs-utils-1.1.4/utils/mount/fstab.h ++++ nfs-utils-1.1.4/utils/mount/fstab.h +@@ -7,6 +7,7 @@ + #define _PATH_FSTAB "/etc/fstab" + #endif + ++int mtab_is_a_symlink(void); + int mtab_is_writable(void); + int mtab_does_not_exist(void); + void reset_mtab_info(void); +--- nfs-utils-1.1.4/utils/mount/mount.c ++++ nfs-utils-1.1.4/utils/mount/mount.c +@@ -230,6 +230,13 @@ create_mtab (void) { + int flags; + mntFILE *mfp; + ++ /* Avoid writing if the mtab is a symlink to /proc/mounts, since ++ that would create a file /proc/mounts in case the proc filesystem ++ is not mounted, and the fchmod below would also fail. */ ++ if (mtab_is_a_symlink()) { ++ return EX_SUCCESS; ++ } ++ + lock_mtab(); + + mfp = nfs_setmntent (MOUNTED, "a+"); |