Update to 5.4 release.
This commit is contained in:
parent
7126eb6da8
commit
8d02d8c5df
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ cifs-utils-4.6.tar.bz2
|
|||||||
/cifs-utils-5.1.tar.bz2
|
/cifs-utils-5.1.tar.bz2
|
||||||
/cifs-utils-5.2.tar.bz2
|
/cifs-utils-5.2.tar.bz2
|
||||||
/cifs-utils-5.3.tar.bz2
|
/cifs-utils-5.3.tar.bz2
|
||||||
|
/cifs-utils-5.4.tar.bz2
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
From f6384b4fe1ffdeebee3e9d73dd533a4fbf83b6d8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@samba.org>
|
|
||||||
Date: Thu, 23 Feb 2012 10:42:09 -0500
|
|
||||||
Subject: [PATCH] mount.cifs: fix tests for strtoul success
|
|
||||||
|
|
||||||
The current test just looks to see if errno was 0 after the conversion
|
|
||||||
but we need to do a bit more. According to the strtoul manpage:
|
|
||||||
|
|
||||||
If there were no digits at all, strtoul() stores the original value
|
|
||||||
of nptr in *endptr (and returns 0).
|
|
||||||
|
|
||||||
So, if you pass in a string of letters, strtoul will return 0, but
|
|
||||||
won't actually have converted anything. Luckily, in most cases, /bin/mount
|
|
||||||
papers over this bug by doing uid/gid conversions itself before calling
|
|
||||||
mount.cifs.
|
|
||||||
|
|
||||||
Fix this by also checking to ensure that strtoul() converted the entire
|
|
||||||
string in addition to checking that it didn't set errno. While we're at
|
|
||||||
it, fix the test in backupuid/backupgid options as well which don't
|
|
||||||
currently check whether errno got set.
|
|
||||||
|
|
||||||
Reported-by: Kyle Squizzato <ksquizza@redhat.com>
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@samba.org>
|
|
||||||
---
|
|
||||||
mount.cifs.c | 12 +++++++-----
|
|
||||||
1 files changed, 7 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mount.cifs.c b/mount.cifs.c
|
|
||||||
index a46a22c..824cd3a 100644
|
|
||||||
--- a/mount.cifs.c
|
|
||||||
+++ b/mount.cifs.c
|
|
||||||
@@ -1032,7 +1032,7 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
|
|
||||||
got_uid = 1;
|
|
||||||
errno = 0;
|
|
||||||
uid = strtoul(value, &ep, 10);
|
|
||||||
- if (errno == 0)
|
|
||||||
+ if (errno == 0 && *ep == '\0')
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
pw = getpwnam(value);
|
|
||||||
@@ -1051,7 +1051,7 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
|
|
||||||
got_cruid = 1;
|
|
||||||
errno = 0;
|
|
||||||
cruid = strtoul(value, &ep, 10);
|
|
||||||
- if (errno == 0)
|
|
||||||
+ if (errno == 0 && *ep == '\0')
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
pw = getpwnam(value);
|
|
||||||
@@ -1069,7 +1069,7 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
|
|
||||||
got_gid = 1;
|
|
||||||
errno = 0;
|
|
||||||
gid = strtoul(value, &ep, 10);
|
|
||||||
- if (errno == 0)
|
|
||||||
+ if (errno == 0 && *ep == '\0')
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
gr = getgrnam(value);
|
|
||||||
@@ -1175,8 +1175,9 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
got_bkupuid = 1;
|
|
||||||
+ errno = 0;
|
|
||||||
bkupuid = strtoul(value, &ep, 10);
|
|
||||||
- if (!strlen(ep))
|
|
||||||
+ if (errno == 0 && *ep == '\0')
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
pw = getpwnam(value);
|
|
||||||
@@ -1193,8 +1194,9 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
got_bkupgid = 1;
|
|
||||||
+ errno = 0;
|
|
||||||
bkupgid = strtoul(value, &ep, 10);
|
|
||||||
- if (!strlen(ep))
|
|
||||||
+ if (errno == 0 && *ep == '\0')
|
|
||||||
goto nocopy;
|
|
||||||
|
|
||||||
gr = getgrnam(value);
|
|
||||||
--
|
|
||||||
1.7.7.6
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
|||||||
%define pre_release %nil
|
%define pre_release %nil
|
||||||
|
|
||||||
Name: cifs-utils
|
Name: cifs-utils
|
||||||
Version: 5.3
|
Version: 5.4
|
||||||
Release: 4%{pre_release}%{?dist}
|
Release: 1%{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,7 +12,6 @@ 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: 0001-mount.cifs-fix-tests-for-strtoul-success.patch
|
|
||||||
|
|
||||||
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake libwbclient-devel
|
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake libwbclient-devel
|
||||||
Requires: keyutils
|
Requires: keyutils
|
||||||
@ -27,7 +26,6 @@ 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
|
||||||
@ -62,6 +60,9 @@ rm -rf %{buildroot}
|
|||||||
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
|
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 18 2012 Jeff Layton <jlayton@redhat.com> 5.4-1
|
||||||
|
- update to 5.4
|
||||||
|
|
||||||
* Mon Mar 19 2012 Jeff Layton <jlayton@redhat.com> 5.3-4
|
* Mon Mar 19 2012 Jeff Layton <jlayton@redhat.com> 5.3-4
|
||||||
- fix tests for strtoul success (bz# 800621)
|
- fix tests for strtoul success (bz# 800621)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user