[cifs-utils/f14] mount.cifs: fix check_newline retcode check (bz# 726717)
Jeff Layton
jlayton at fedoraproject.org
Fri Jul 29 17:44:46 UTC 2011
commit 9db0c851590934677b33e751fdecb1cba51b95cd
Author: Jeff Layton <jlayton at redhat.com>
Date: Fri Jul 29 13:44:18 2011 -0400
mount.cifs: fix check_newline retcode check (bz# 726717)
cifs-utils.spec | 15 +++++++---
...check_newline-returns-EX_USAGE-on-error-n.patch | 28 ++++++++++++++++++++
2 files changed, 38 insertions(+), 5 deletions(-)
---
diff --git a/cifs-utils.spec b/cifs-utils.spec
index 44c51af..704c4b9 100644
--- a/cifs-utils.spec
+++ b/cifs-utils.spec
@@ -3,7 +3,7 @@
Name: cifs-utils
Version: 4.8.1
-Release: 6%{pre_release}%{?dist}
+Release: 7%{pre_release}%{?dist}
Summary: Utilities for mounting and managing CIFS mounts
Group: System Environment/Daemons
@@ -16,10 +16,11 @@ Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake
Requires: keyutils
-Patch0: mount.cifs-don-t-try-to-alter-mtab-if-it-s-a-symlink.patch
-Patch1: mount.cifs-reacquire-CAP_DAC_READ_SEARCH-before-call.patch
-Patch2: 0001-mount.cifs-Use-original-device-string-all-the-way.patch
-Patch3: 0001-mtab-handle-ENOSPC-EFBIG-condition-properly-when-alt.patch
+Patch0: mount.cifs-don-t-try-to-alter-mtab-if-it-s-a-symlink.patch
+Patch1: mount.cifs-reacquire-CAP_DAC_READ_SEARCH-before-call.patch
+Patch2: 0001-mount.cifs-Use-original-device-string-all-the-way.patch
+Patch3: 0001-mtab-handle-ENOSPC-EFBIG-condition-properly-when-alt.patch
+Patch4: mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch
%description
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
@@ -35,6 +36,7 @@ file system.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
%configure --prefix=/usr
@@ -56,6 +58,9 @@ rm -rf %{buildroot}
%{_mandir}/man8/mount.cifs.8.gz
%changelog
+* Fri Jul 29 2011 Jeff Layton <jlayton at redhat.com> 4.8.1-7
+- mount.cifs: fix check_newline retcode check (bz# 726717)
+
* Tue Jul 12 2011 Jeff Layton <jlayton at redhat.com> 4.8.1-6
- mount.cifs: don't allow mount.cifs to leave corrupt mtab (bz# 699040)
diff --git a/mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch b/mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch
new file mode 100644
index 0000000..f01b83e
--- /dev/null
+++ b/mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch
@@ -0,0 +1,28 @@
+From 1e7a32924b22d1f786b6f490ce8590656f578f91 Mon Sep 17 00:00:00 2001
+From: Jeff Layton <jlayton at samba.org>
+Date: Fri, 29 Jul 2011 07:12:48 -0400
+Subject: [PATCH] mount.cifs: check_newline returns EX_USAGE on error, not -1
+
+Reported-by: Jan Lieskovsky <jlieskov at redhat.com>
+Signed-off-by: Jeff Layton <jlayton at samba.org>
+---
+ mount.cifs.c | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+diff --git a/mount.cifs.c b/mount.cifs.c
+index 107a5a5..aa4581f 100644
+--- a/mount.cifs.c
++++ b/mount.cifs.c
+@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name)
+ static int check_mtab(const char *progname, const char *devname,
+ const char *dir)
+ {
+- if (check_newline(progname, devname) == -1 ||
+- check_newline(progname, dir) == -1)
++ if (check_newline(progname, devname) || check_newline(progname, dir))
+ return EX_USAGE;
+ return 0;
+ }
+--
+1.7.6
+
More information about the scm-commits
mailing list