mount.cifs: fix check_newline retcode check (bz# 726717)
This commit is contained in:
parent
158ad7785a
commit
bd243bf708
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: cifs-utils
|
Name: cifs-utils
|
||||||
Version: 5.0
|
Version: 5.0
|
||||||
Release: 1%{pre_release}%{?dist}
|
Release: 2%{pre_release}%{?dist}
|
||||||
Summary: Utilities for mounting and managing CIFS mounts
|
Summary: Utilities for mounting and managing CIFS mounts
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -12,6 +12,7 @@ URL: http://linux-cifs.samba.org/cifs-utils/
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2
|
Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2
|
||||||
|
Patch0: mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch
|
||||||
|
|
||||||
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake samba-winbind-devel
|
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake samba-winbind-devel
|
||||||
Requires: keyutils
|
Requires: keyutils
|
||||||
@ -26,6 +27,7 @@ file system.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{pre_release}
|
%setup -q -n %{name}-%{version}%{pre_release}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --prefix=/usr
|
%configure --prefix=/usr
|
||||||
@ -49,6 +51,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/man8/mount.cifs.8.gz
|
%{_mandir}/man8/mount.cifs.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 29 2011 Jeff Layton <jlayton@redhat.com> 5.0-2
|
||||||
|
- mount.cifs: fix check_newline retcode check (bz# 726717)
|
||||||
|
|
||||||
* Wed Jun 01 2011 Jeff Layton <jlayton@redhat.com> 5.0-1
|
* Wed Jun 01 2011 Jeff Layton <jlayton@redhat.com> 5.0-1
|
||||||
- update to 5.0
|
- update to 5.0
|
||||||
|
|
||||||
|
28
mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch
Normal file
28
mount.cifs-check_newline-returns-EX_USAGE-on-error-n.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 1e7a32924b22d1f786b6f490ce8590656f578f91 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeff Layton <jlayton@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@redhat.com>
|
||||||
|
Signed-off-by: Jeff Layton <jlayton@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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user