diff options
author | root <root@rshg054.dnsready.net> | 2011-08-27 23:14:39 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-27 23:14:39 +0000 |
commit | a4c358009dd89183b4124505c694ea7f5fcdbeec (patch) | |
tree | 2b157b1e89ca7df45bd35f6a72c39b26af558827 /testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch | |
parent | d7d02f7c02a5c761e8a64df49598ae976640e450 (diff) |
Sat Aug 27 23:14:39 UTC 2011
Diffstat (limited to 'testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch')
-rw-r--r-- | testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch b/testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch new file mode 100644 index 000000000..c9e60afc7 --- /dev/null +++ b/testing/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+"); |