Accepting request 123240 from network:samba:STABLE

- BuildRequire libwbclient-devel for CentOS, Fedora, and RHEL builds too.
- Do not call autoreconf while build.
- BuildIgnore libtalloc to prevent a package conflict on Fedora systems.
- BuildRequire libtalloc-devel unconditionally.
- Update to cifs-utils 5.5.
  + mount.cifs: don't pass credentials= option to the kernel
  + doc: update mailing list
  + mount.cifs: don't send a mandatory ver= option to the kernel
  + mount.cifs: remove smb2 multicall binary code
  + doc: remove old XML sources for mount.cifs.8 and cifs.upcall.8
  + mount.cifs: unused variables

OBS-URL: https://build.opensuse.org/request/show/123240
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cifs-utils?expand=0&rev=23
This commit is contained in:
Stephan Kulow 2012-06-06 14:05:49 +00:00 committed by Git OBS Bridge
commit 35f15f5010
9 changed files with 37 additions and 199 deletions

View File

@ -1,70 +0,0 @@
commit 8c6268cbbd4202631e5c4b30297adc0088a1d568
Author: Jeff Layton <jlayton@samba.org>
Date: Thu Apr 19 07:29:46 2012 -0400
mount.cifs: fix up some -D_FORTIFY_SOURCE=2 warnings
...and add -D_FORTIFY_SOURCE=2 to the default $CFLAGS.
Acked-by: Acked-by: Suresh Jayaraman <sjayaraman@suse.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
diff --git a/Makefile.am b/Makefile.am
index d95142a..05729ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS = -Wall -Wextra -Werror
+AM_CFLAGS = -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2
ACLOCAL_AMFLAGS = -I aclocal
root_sbindir = $(ROOTSBINDIR)
diff --git a/mount.cifs.c b/mount.cifs.c
index f0b073e..2c481d8 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -927,11 +927,11 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
return EX_USAGE;
}
} else {
- /* domain/username%password */
- const int max = MAX_DOMAIN_SIZE +
- MAX_USERNAME_SIZE +
- MOUNT_PASSWD_SIZE + 2;
- if (strnlen(value, max + 1) >= max + 1) {
+ /* domain/username%password + NULL term. */
+ const size_t max = MAX_DOMAIN_SIZE +
+ MAX_USERNAME_SIZE +
+ MOUNT_PASSWD_SIZE + 2 + 1;
+ if (strnlen(value, max) >= max) {
fprintf(stderr, "username too long\n");
return EX_USAGE;
}
@@ -1603,8 +1603,10 @@ add_mtab(char *devname, char *mountpoint, unsigned long flags, const char *fstyp
mountent.mnt_passno = 0;
rc = addmntent(pmntfile, &mountent);
if (rc) {
+ int ignore __attribute__((unused));
+
fprintf(stderr, "unable to add mount entry to mtab\n");
- ftruncate(fd, statbuf.st_size);
+ ignore = ftruncate(fd, statbuf.st_size);
rc = EX_FILEIO;
}
tmprc = my_endmntent(pmntfile, statbuf.st_size);
diff --git a/mtab.c b/mtab.c
index de545b7..3d42ac0 100644
--- a/mtab.c
+++ b/mtab.c
@@ -271,8 +271,10 @@ my_endmntent(FILE *stream, off_t size)
/* truncate file back to "size" -- best effort here */
if (rc) {
+ int ignore __attribute__((unused));
+
rc = errno;
- ftruncate(fd, size);
+ ignore = ftruncate(fd, size);
}
endmntent(stream);

View File

@ -1,21 +0,0 @@
Author: Lars Mueller <lmuelle@suse.com>
Subject: cifs-utils build warns bkupuid and bkupgid may be used uninitialized
Bugzilla: na
Upstream-Reported: http://permalink.gmane.org/gmane.linux.kernel.cifs/5931
Upstream-Acknowledged: Yes
Index: cifs-utils-5.4/mount.cifs.c
===================================================================
--- cifs-utils-5.4.orig/mount.cifs.c
+++ cifs-utils-5.4/mount.cifs.c
@@ -863,8 +863,8 @@ parse_options(const char *data, struct p
int got_uid = 0;
int got_cruid = 0;
int got_gid = 0;
- uid_t uid, cruid = 0, bkupuid;
- gid_t gid, bkupgid;
+ uid_t uid, cruid = 0, bkupuid = 0;
+ gid_t gid, bkupgid = 0;
char *ep;
struct passwd *pw;
struct group *gr;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f6c267e4cfb111ab47a6e85a802373475edaab31d76eab4e7927ea6fe82e7f7b
size 381416

3
cifs-utils-5.5.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82719a7988025eec87846d581a7b913368419d33deaafbecafd519fcb194d5c6
size 377435

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Fri Jun 1 18:30:07 UTC 2012 - lmuelle@suse.com
- BuildRequire libwbclient-devel for CentOS, Fedora, and RHEL builds too.
-------------------------------------------------------------------
Fri Jun 1 11:26:13 UTC 2012 - lmuelle@suse.com
- Do not call autoreconf while build.
-------------------------------------------------------------------
Fri Jun 1 09:06:29 UTC 2012 - lmuelle@suse.com
- BuildIgnore libtalloc to prevent a package conflict on Fedora systems.
-------------------------------------------------------------------
Thu May 31 11:49:37 UTC 2012 - lmuelle@suse.com
- BuildRequire libtalloc-devel unconditionally.
-------------------------------------------------------------------
Wed May 30 11:09:43 UTC 2012 - lmuelle@suse.com
- Update to cifs-utils 5.5.
+ mount.cifs: don't pass credentials= option to the kernel
+ doc: update mailing list
+ mount.cifs: don't send a mandatory ver= option to the kernel
+ mount.cifs: remove smb2 multicall binary code
+ doc: remove old XML sources for mount.cifs.8 and cifs.upcall.8
+ mount.cifs: unused variables
-------------------------------------------------------------------
Wed May 16 16:29:18 UTC 2012 - lmuelle@suse.com

View File

@ -17,7 +17,7 @@
Name: cifs-utils
Version: 5.4
Version: 5.5
Release: 0
Summary: Utilities for doing and managing mounts of the Linux CIFS filesyste
License: GPL-3.0+
@ -27,11 +27,6 @@ Source: %{name}-%{version}.tar.bz2
Source1: cifs.init
Source2: mkinitrd_scripts_boot-cifs.sh
Source3: mkinitrd_scripts_setup-cifs.sh
Patch: 8c6268cbbd4202631e5c4b30297adc0088a1d568.diff
Patch1: bkup-uid-gid-uninitialized.diff
Patch2: krb5_auth_con_set_req_cksumtype-implicit-declaration.diff
Patch3: mount.cifs-toggle_dac_capability-return-stored-returncode.diff
Patch4: mount.cifs-toggle_dac_capability-remove-check.diff
%if 0%{?suse_version}
PreReq: insserv %{?fillup_prereq} mkinitrd
%else
@ -53,18 +48,15 @@ BuildRequires: libcap-ng-devel
%else
BuildRequires: libcap-devel
%endif
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1210
BuildRequires: libtalloc2-devel
%else
#!BuildIgnore: libtalloc
BuildRequires: libtalloc-devel
%endif
%if 0%{?suse_version} > 1110
BuildRequires: fdupes
%endif
%if 0%{?mandriva_version}
BuildRequires: libkeyutils-devel
%endif
%if 0%{?suse_version} > 1020
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
BuildRequires: libwbclient-devel
%endif
%if 0%{?suse_version} > 1020
@ -72,9 +64,6 @@ BuildRequires: pkg-config
%else
BuildRequires: pkgconfig
%endif
%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version}
BuildRequires: samba-winbind-devel
%endif
Requires: keyutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -84,14 +73,8 @@ the Linux CIFS filesystem.
%prep
%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie"
export LDFLAGS="-pie"
%{configure}

View File

@ -1,40 +0,0 @@
Author: Lars Mueller <lmuelle@suse.com>
Subject: cifs-utils build breaks with krb5 < 1.7
Bugzilla: na
Inspiration: https://bugzilla.samba.org/show_bug.cgi?id=6918
Upstream-Reported: http://permalink.gmane.org/gmane.linux.kernel.cifs/5932
Upstream-Acknowledged: Yes
Index: cifs-utils-5.4/configure.ac
===================================================================
--- cifs-utils-5.4.orig/configure.ac
+++ cifs-utils-5.4/configure.ac
@@ -178,6 +178,9 @@ if test $enable_cifsupcall != "no"; then
AC_CHECK_FUNCS([krb5_auth_con_setaddrs krb5_auth_con_set_req_cksumtype])
fi
+# MIT krb5 < 1.7 does not have this declaration but does have the symbol
+AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include <krb5.h>])
+
LIBS=$cu_saved_libs
AM_CONDITIONAL(CONFIG_CIFSUPCALL, [test "$enable_cifsupcall" != "no"])
Index: cifs-utils-5.4/cifs.upcall.c
===================================================================
--- cifs-utils-5.4.orig/cifs.upcall.c
+++ cifs-utils-5.4/cifs.upcall.c
@@ -415,6 +415,14 @@ cifs_krb5_get_req(const char *host, cons
*/
in_data.data = discard_const_p(char, gss_cksum);
in_data.length = 24;
+
+ /* MIT krb5 < 1.7 is missing the prototype, but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+ krb5_error_code krb5_auth_con_set_req_cksumtype(
+ krb5_context context,
+ krb5_auth_context auth_context,
+ krb5_cksumtype cksumtype);
+#endif
ret = krb5_auth_con_set_req_cksumtype(context, auth_context, 0x8003);
if (ret) {
syslog(LOG_DEBUG, "%s: unable to set 0x8003 checksum",

View File

@ -1,26 +0,0 @@
I'm not sure what I was thinking when I added that check in, but it's
been there since the inception. We shouldn't care at all what the
real uid is when we call toggle_dac_capability and indeed we don't
care with the libcap-ng version. Remove that check.
Signed-off-by: Jeff Layton <jlayton@samba.org>
---
mount.cifs.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/mount.cifs.c b/mount.cifs.c
index 06715dd..c90ce3e 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -552,9 +552,6 @@ toggle_dac_capability(int writable, int enable)
cap_t caps;
cap_value_t capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH;
- if (getuid() != 0)
- return 0;
-
caps = cap_get_proc();
if (caps == NULL) {
fprintf(stderr, "Unable to get current capability set: %s\n",
--
1.7.7.6

View File

@ -1,19 +0,0 @@
Author: Lars Mueller <lmuelle@suse.com>
Subject: cifs-utils don't make use of stored return code
Bugzilla: na
Upstream-Reported: http://permalink.gmane.org/gmane.linux.kernel.cifs/5935
Upstream-Acknowledged: Yes
Index: cifs-utils-5.4/mount.cifs.c
===================================================================
--- cifs-utils-5.4.orig/mount.cifs.c
+++ cifs-utils-5.4/mount.cifs.c
@@ -577,7 +577,7 @@ toggle_dac_capability(int writable, int
}
free_caps:
cap_free(caps);
- return 0;
+ return rc;
}
#else /* HAVE_LIBCAP */
static int