1 Index: nfs-utils-1.1.2/utils/mount/fstab.c
2 ===================================================================
3 --- nfs-utils-1.1.2.orig/utils/mount/fstab.c
4 +++ nfs-utils-1.1.2/utils/mount/fstab.c
5 @@ -52,7 +52,7 @@ mtab_does_not_exist(void) {
6 return var_mtab_does_not_exist;
11 mtab_is_a_symlink(void) {
13 return var_mtab_is_a_symlink;
14 Index: nfs-utils-1.1.2/utils/mount/fstab.h
15 ===================================================================
16 --- nfs-utils-1.1.2.orig/utils/mount/fstab.h
17 +++ nfs-utils-1.1.2/utils/mount/fstab.h
19 #define _PATH_FSTAB "/etc/fstab"
22 +int mtab_is_a_symlink(void);
23 int mtab_is_writable(void);
24 int mtab_does_not_exist(void);
26 Index: nfs-utils-1.1.2/utils/mount/mount.c
27 ===================================================================
28 --- nfs-utils-1.1.2.orig/utils/mount/mount.c
29 +++ nfs-utils-1.1.2/utils/mount/mount.c
30 @@ -257,6 +257,13 @@ static int add_mtab(char *spec, char *mo
34 + /* Avoid writing if the mtab is a symlink to /proc/mounts, since
35 + that would create a file /proc/mounts in case the proc filesystem
36 + is not mounted, and the fchmod below would also fail. */
37 + if (mtab_is_a_symlink()) {
43 mtab = nfs_setmntent(MOUNTED, "a+");