- mount.nfs was not returning a non-zero exit value on failed mounts (bz

206705)
This commit is contained in:
Steve Dickson 2006-09-27 00:32:15 +00:00
parent 538c985837
commit 53f8365639
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,40 @@
--- nfs-utils-1.0.9/utils/mount/mount.c.orig 2006-09-26 11:32:13.000000000 -0400
+++ nfs-utils-1.0.9/utils/mount/mount.c 2006-09-26 20:23:50.000000000 -0400
@@ -476,21 +476,24 @@
}
}
- if (!mnt_err && !fake) {
- if(!(flags & MS_REMOUNT)) {
- mnt_err = do_mount_syscall(spec, mount_point,
- nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
-
- if(mnt_err) {
- mount_error(mount_point);
- exit(-1);
- }
- }
- if(!nomtab) {
- add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
- flags, extra_opts, 0, 0);
+ if (fake)
+ return 0;
+ if (mnt_err)
+ exit(EX_FAIL);
+
+ if(!(flags & MS_REMOUNT)) {
+ mnt_err = do_mount_syscall(spec, mount_point,
+ nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
+
+ if(mnt_err) {
+ mount_error(mount_point);
+ exit(EX_FAIL);
}
}
+ if(!nomtab) {
+ add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
+ flags, extra_opts, 0, 0);
+ }
return 0;
}

View File

@ -32,6 +32,7 @@ Patch57: nfs-utils-1.0.9-mount-fsc.patch
Patch58: nfs-utils-1.0.9-krb5-memory.patch
Patch59: nfs-utils-1.0.9-mount-sloppy.patch
Patch60: nfs-utils-1.0.9-mount-man-nfs.patch
Patch61: nfs-utils-1.0.9-return-mount-error.patch
Patch100: nfs-utils-1.0.9-compile.patch
@ -84,6 +85,7 @@ This package also contains the mount.nfs and umount.nfs program.
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
# Do the magic to get things to compile
%patch100 -p1
@ -257,6 +259,10 @@ fi
%endif
%changelog
* Tue Sep 26 2006 Steve Dickson <steved@redhat.com> 1.0.9-8
- mount.nfs was not returning a non-zero exit value
on failed mounts (bz 206705)
* Wed Sep 20 2006 Karel Zak <kzak@redhat.com> 1.0.9-7
- Added support for the mount -s (sloppy) option (#205038)
- Added nfs.5 man page from util-linux