Hello community,
here is the log from the commit of package cifs-utils for openSUSE:Factory
checked in at Tue Aug 3 15:27:32 CEST 2010.
--------
--- cifs-utils/cifs-utils.changes 2010-07-07 17:19:45.000000000 +0200
+++ cifs-utils/cifs-utils.changes 2010-08-02 10:57:40.000000000 +0200
@@ -1,0 +2,9 @@
+Mon Aug 2 08:33:32 UTC 2010 - sjayaraman@suse.de
+
+- Update to cifs-utils 4.6.
+ + adds documentation for the fsc option.
+ + mount.cifs deals with the _netdev, mand, and nomand options correctly now.
+ + changes how mount.cifs handles the MS_MANDLOCK flag.
+ + makes cifs.upcall prefer the creduid= upcall option to uid=
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
cifs-fix-cred-option-parsing
cifs-utils-4.5.tar.bz2
New:
----
cifs-utils-4.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cifs-utils.spec ++++++
--- /var/tmp/diff_new_pack.ce95gR/_old 2010-08-03 15:26:45.000000000 +0200
+++ /var/tmp/diff_new_pack.ce95gR/_new 2010-08-03 15:26:45.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package cifs-utils (Version 4.5)
+# spec file for package cifs-utils (Version 4.6)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@
Summary: Utilities for doing and managing mounts of the Linux CIFS filesystem
Name: cifs-utils
-Version: 4.5
-Release: 2
+Version: 4.6
+Release: 1
License: GPLv3+
Group: System/Filesystems
Url: http://www.samba.org/linux-cifs/cifs-utils/
@@ -28,7 +28,6 @@
Source1: cifs.init
Source2: mkinitrd_scripts_boot-cifs.sh
Source3: mkinitrd_scripts_setup-cifs.sh
-Patch1: cifs-fix-cred-option-parsing
%if 0%{?suse_version}
PreReq: insserv %{?fillup_prereq} mkinitrd
%else
@@ -54,7 +53,6 @@
%prep
%setup -q
-%patch1 -p1
%build
%{?suse_update_config:%{suse_update_config -f}}
++++++ cifs-utils-4.5.tar.bz2 -> cifs-utils-4.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/Makefile.am new/cifs-utils-4.6/Makefile.am
--- old/cifs-utils-4.5/Makefile.am 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/Makefile.am 2010-07-30 14:17:01.000000000 +0200
@@ -1,4 +1,4 @@
-AM_CFLAGS = -Wall
+AM_CFLAGS = -Wall -Wextra
ACLOCAL_AMFLAGS = -I aclocal
root_sbindir = "/sbin"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/Makefile.in new/cifs-utils-4.6/Makefile.in
--- old/cifs-utils-4.5/Makefile.in 2010-05-21 22:06:15.000000000 +0200
+++ new/cifs-utils-4.6/Makefile.in 2010-07-30 14:20:42.000000000 +0200
@@ -203,7 +203,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CFLAGS = -Wall
+AM_CFLAGS = -Wall -Wextra
ACLOCAL_AMFLAGS = -I aclocal
root_sbindir = "/sbin"
mount_cifs_SOURCES = mount.cifs.c mtab.c util.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/autom4te.cache/output.0 new/cifs-utils-4.6/autom4te.cache/output.0
--- old/cifs-utils-4.5/autom4te.cache/output.0 2010-05-21 22:06:12.000000000 +0200
+++ new/cifs-utils-4.6/autom4te.cache/output.0 2010-07-30 14:20:39.000000000 +0200
@@ -1,6 +1,6 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.63 for cifs-utils 4.5.
+@%:@ Generated by GNU Autoconf 2.63 for cifs-utils 4.6.
@%:@
@%:@ Report bugs to .
@%:@
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='cifs-utils'
PACKAGE_TARNAME='cifs-utils'
-PACKAGE_VERSION='4.5'
-PACKAGE_STRING='cifs-utils 4.5'
+PACKAGE_VERSION='4.6'
+PACKAGE_STRING='cifs-utils 4.6'
PACKAGE_BUGREPORT='cifs-utils@samba.org'
ac_unique_file="replace.h"
@@ -1294,7 +1294,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures cifs-utils 4.5 to adapt to many kinds of systems.
+\`configure' configures cifs-utils 4.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1360,7 +1360,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cifs-utils 4.5:";;
+ short | recursive ) echo "Configuration of cifs-utils 4.6:";;
esac
cat <<\_ACEOF
@@ -1454,7 +1454,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cifs-utils configure 4.5
+cifs-utils configure 4.6
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1468,7 +1468,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cifs-utils $as_me 4.5, which was
+It was created by cifs-utils $as_me 4.6, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2324,7 +2324,7 @@
# Define the identity of the package.
PACKAGE='cifs-utils'
- VERSION='4.5'
+ VERSION='4.6'
cat >>confdefs.h <<_ACEOF
@@ -8334,7 +8334,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cifs-utils $as_me 4.5, which was
+This file was extended by cifs-utils $as_me 4.6, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8397,7 +8397,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-cifs-utils config.status 4.5
+cifs-utils config.status 4.6
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/autom4te.cache/output.1 new/cifs-utils-4.6/autom4te.cache/output.1
--- old/cifs-utils-4.5/autom4te.cache/output.1 2010-05-21 22:06:15.000000000 +0200
+++ new/cifs-utils-4.6/autom4te.cache/output.1 2010-07-30 14:20:42.000000000 +0200
@@ -1,6 +1,6 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.63 for cifs-utils 4.5.
+@%:@ Generated by GNU Autoconf 2.63 for cifs-utils 4.6.
@%:@
@%:@ Report bugs to .
@%:@
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='cifs-utils'
PACKAGE_TARNAME='cifs-utils'
-PACKAGE_VERSION='4.5'
-PACKAGE_STRING='cifs-utils 4.5'
+PACKAGE_VERSION='4.6'
+PACKAGE_STRING='cifs-utils 4.6'
PACKAGE_BUGREPORT='cifs-utils@samba.org'
ac_unique_file="replace.h"
@@ -1294,7 +1294,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures cifs-utils 4.5 to adapt to many kinds of systems.
+\`configure' configures cifs-utils 4.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1360,7 +1360,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cifs-utils 4.5:";;
+ short | recursive ) echo "Configuration of cifs-utils 4.6:";;
esac
cat <<\_ACEOF
@@ -1454,7 +1454,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cifs-utils configure 4.5
+cifs-utils configure 4.6
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1468,7 +1468,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cifs-utils $as_me 4.5, which was
+It was created by cifs-utils $as_me 4.6, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2324,7 +2324,7 @@
# Define the identity of the package.
PACKAGE='cifs-utils'
- VERSION='4.5'
+ VERSION='4.6'
cat >>confdefs.h <<_ACEOF
@@ -8334,7 +8334,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cifs-utils $as_me 4.5, which was
+This file was extended by cifs-utils $as_me 4.6, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8397,7 +8397,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-cifs-utils config.status 4.5
+cifs-utils config.status 4.6
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/autom4te.cache/traces.1 new/cifs-utils-4.6/autom4te.cache/traces.1
--- old/cifs-utils-4.5/autom4te.cache/traces.1 2010-05-21 22:06:15.000000000 +0200
+++ new/cifs-utils-4.6/autom4te.cache/traces.1 2010-07-30 14:20:42.000000000 +0200
@@ -1,5 +1,5 @@
m4trace:aclocal.m4:993: -1- m4_include([aclocal/libcap.m4])
-m4trace:configure.ac:4: -1- AC_INIT([cifs-utils], [4.5], [cifs-utils@samba.org], [cifs-utils], [http://linux-cifs.samba.org/cifs-utils/])
+m4trace:configure.ac:4: -1- AC_INIT([cifs-utils], [4.6], [cifs-utils@samba.org], [cifs-utils], [http://linux-cifs.samba.org/cifs-utils/])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/cifs.upcall.8 new/cifs-utils-4.6/cifs.upcall.8
--- old/cifs-utils-4.5/cifs.upcall.8 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/cifs.upcall.8 2010-07-30 14:17:01.000000000 +0200
@@ -22,7 +22,7 @@
cifs.upcall \- Userspace upcall helper for Common Internet File System (CIFS)
.SH "SYNOPSIS"
.HP \w'\ 'u
-cifs\&.upcall [\-\-trust\-dns|\-t] [\-\-version|\-v] {keyid}
+cifs\&.upcall [\-\-trust\-dns|\-t] [\-\-version|\-v] [\-\-legacy\-uid|\-l] {keyid}
.SH "DESCRIPTION"
.PP
This tool is part of the cifs-utils suite\&.
@@ -45,6 +45,13 @@
This is less secure than not trusting DNS\&. When using this option, it\'s possible that an attacker could get control of DNS and trick the client into mounting a different server altogether\&. It\'s preferable to instead add server principals to the KDC for every possible hostname, but this option exists for cases where that isn\'t possible\&. The default is to not trust reverse hostname lookups in this fashion\&.
.RE
.PP
+\-\-legacy\-uid|\-l
+.RS 4
+Traditionally, the kernel has sent only a single uid= parameter to the upcall for the SPNEGO upcall that\'s used to determine what user's credential cache to use. This parameter is affected by the uid= mount option, which also governs the ownership of files on the mount\&.
+.sp
+Newer kernels send a creduid= option as well, which contains what uid it thinks actually owns the credentials that it\'s looking for\&. At mount time, this is generally set to the real uid of the user doing the mount. For multisession mounts, it's set to the fsuid of the mount user. Set this option if you want cifs.upcall to use the older uid= parameter instead of the creduid= parameter\&.
+.RE
+.PP
\-\-version|\-v
.RS 4
Print version number and exit\&.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/cifs.upcall.c new/cifs-utils-4.6/cifs.upcall.c
--- old/cifs-utils-4.5/cifs.upcall.c 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/cifs.upcall.c 2010-07-30 14:17:01.000000000 +0200
@@ -258,7 +258,7 @@
krb5_keyblock *tokb;
krb5_context context;
krb5_ccache ccache;
- krb5_creds in_creds = { }, *out_creds;
+ krb5_creds in_creds, *out_creds;
krb5_data apreq_pkt, in_data;
krb5_auth_context auth_context = NULL;
@@ -275,6 +275,8 @@
goto out_free_context;
}
+ memset(&in_creds, 0, sizeof(in_creds));
+
ret = krb5_cc_get_principal(context, ccache, &in_creds.client);
if (ret) {
syslog(LOG_DEBUG, "%s: unable to get client principal name",
@@ -389,6 +391,7 @@
#define DKD_HAVE_IP 0x8
#define DKD_HAVE_UID 0x10
#define DKD_HAVE_PID 0x20
+#define DKD_HAVE_CREDUID 0x40
#define DKD_MUSTHAVE_SET (DKD_HAVE_HOSTNAME|DKD_HAVE_VERSION|DKD_HAVE_SEC)
struct decoded_args {
@@ -396,6 +399,7 @@
char *hostname;
char *ip;
uid_t uid;
+ uid_t creduid;
pid_t pid;
sectype_t sec;
};
@@ -461,6 +465,16 @@
} else {
retval |= DKD_HAVE_UID;
}
+ } else if (strncmp(tkn, "creduid=", 8) == 0) {
+ errno = 0;
+ arg->creduid = strtol(tkn + 8, NULL, 16);
+ if (errno != 0) {
+ syslog(LOG_ERR, "Invalid creduid format: %s",
+ strerror(errno));
+ return 1;
+ } else {
+ retval |= DKD_HAVE_CREDUID;
+ }
} else if (strncmp(tkn, "ver=", 4) == 0) { /* if version */
errno = 0;
arg->ver = strtol(tkn + 4, NULL, 16);
@@ -584,12 +598,13 @@
static void usage(void)
{
- syslog(LOG_INFO, "Usage: %s [-t] [-v] key_serial", prog);
- fprintf(stderr, "Usage: %s [-t] [-v] key_serial\n", prog);
+ syslog(LOG_INFO, "Usage: %s [-t] [-v] [-l] key_serial", prog);
+ fprintf(stderr, "Usage: %s [-t] [-v] [-l] key_serial\n", prog);
}
const struct option long_options[] = {
{"trust-dns", 0, NULL, 't'},
+ {"legacy-uid", 0, NULL, 'l'},
{"version", 0, NULL, 'v'},
{NULL, 0, NULL, 0}
};
@@ -603,10 +618,10 @@
size_t datalen;
unsigned int have;
long rc = 1;
- int c, try_dns = 0;
+ int c, try_dns = 0, legacy_uid = 0;
char *buf, *princ = NULL, *ccname = NULL;
char hostbuf[NI_MAXHOST], *host;
- struct decoded_args arg = { };
+ struct decoded_args arg;
const char *oid;
hostbuf[0] = '\0';
@@ -621,6 +636,9 @@
case 't':
try_dns++;
break;
+ case 'l':
+ legacy_uid++;
+ break;
case 'v':
printf("version: %s\n", VERSION);
goto out;
@@ -661,6 +679,8 @@
goto out;
}
+ memset(&arg, 0, sizeof(arg));
+
have = decode_key_description(buf, &arg);
SAFE_FREE(buf);
if ((have & DKD_MUSTHAVE_SET) != DKD_MUSTHAVE_SET) {
@@ -677,14 +697,25 @@
goto out;
}
- if (have & DKD_HAVE_UID) {
+ if (!legacy_uid && (have & DKD_HAVE_CREDUID)) {
+ rc = setuid(arg.creduid);
+ if (rc == -1) {
+ syslog(LOG_ERR, "setuid: %s", strerror(errno));
+ goto out;
+ }
+ ccname = find_krb5_cc(CIFS_DEFAULT_KRB5_DIR, arg.creduid);
+ } else if (have & DKD_HAVE_UID) {
rc = setuid(arg.uid);
if (rc == -1) {
syslog(LOG_ERR, "setuid: %s", strerror(errno));
goto out;
}
-
ccname = find_krb5_cc(CIFS_DEFAULT_KRB5_DIR, arg.uid);
+ } else {
+ /* no uid= or creduid= parm -- something is wrong */
+ syslog(LOG_ERR, "No uid= or creduid= parm specified");
+ rc = 1;
+ goto out;
}
host = arg.hostname;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/configure new/cifs-utils-4.6/configure
--- old/cifs-utils-4.5/configure 2010-05-21 22:06:14.000000000 +0200
+++ new/cifs-utils-4.6/configure 2010-07-30 14:20:40.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for cifs-utils 4.5.
+# Generated by GNU Autoconf 2.63 for cifs-utils 4.6.
#
# Report bugs to .
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='cifs-utils'
PACKAGE_TARNAME='cifs-utils'
-PACKAGE_VERSION='4.5'
-PACKAGE_STRING='cifs-utils 4.5'
+PACKAGE_VERSION='4.6'
+PACKAGE_STRING='cifs-utils 4.6'
PACKAGE_BUGREPORT='cifs-utils@samba.org'
ac_unique_file="replace.h"
@@ -1294,7 +1294,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures cifs-utils 4.5 to adapt to many kinds of systems.
+\`configure' configures cifs-utils 4.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1360,7 +1360,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cifs-utils 4.5:";;
+ short | recursive ) echo "Configuration of cifs-utils 4.6:";;
esac
cat <<\_ACEOF
@@ -1454,7 +1454,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cifs-utils configure 4.5
+cifs-utils configure 4.6
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1468,7 +1468,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cifs-utils $as_me 4.5, which was
+It was created by cifs-utils $as_me 4.6, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2324,7 +2324,7 @@
# Define the identity of the package.
PACKAGE='cifs-utils'
- VERSION='4.5'
+ VERSION='4.6'
cat >>confdefs.h <<_ACEOF
@@ -8334,7 +8334,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cifs-utils $as_me 4.5, which was
+This file was extended by cifs-utils $as_me 4.6, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8397,7 +8397,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-cifs-utils config.status 4.5
+cifs-utils config.status 4.6
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/configure.ac new/cifs-utils-4.6/configure.ac
--- old/cifs-utils-4.5/configure.ac 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/configure.ac 2010-07-30 14:17:01.000000000 +0200
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT([cifs-utils], [4.5], [cifs-utils@samba.org], [cifs-utils], [http://linux-cifs.samba.org/cifs-utils/])
+AC_INIT([cifs-utils], [4.6], [cifs-utils@samba.org], [cifs-utils], [http://linux-cifs.samba.org/cifs-utils/])
AC_CONFIG_SRCDIR([replace.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/data_blob.c new/cifs-utils-4.6/data_blob.c
--- old/cifs-utils-4.5/data_blob.c 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/data_blob.c 2010-07-30 14:17:01.000000000 +0200
@@ -141,7 +141,7 @@
**/
_PUBLIC_ char *data_blob_hex_string_lower(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
{
- int i;
+ unsigned int i;
char *hex_string;
hex_string = talloc_array(mem_ctx, char, (blob->length*2)+1);
@@ -161,7 +161,7 @@
_PUBLIC_ char *data_blob_hex_string_upper(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
{
- int i;
+ unsigned int i;
char *hex_string;
hex_string = talloc_array(mem_ctx, char, (blob->length*2)+1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/doc/mount.cifs.8.xml new/cifs-utils-4.6/doc/mount.cifs.8.xml
--- old/cifs-utils-4.5/doc/mount.cifs.8.xml 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/doc/mount.cifs.8.xml 2010-07-30 14:17:01.000000000 +0200
@@ -534,6 +534,26 @@
maximum wsize currently allowed by CIFS is 57344 (fourteen
4096 byte pages)</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term>fsc</term>
+
+ <listitem><para>Enable local disk caching using FS-Cache
+ for cifs. This option could be useful to improve performance
+ on a slow link, heavily loaded server and/or network
+ where reading from the disk is faster than reading from the
+ server (over the network). This could also impact the
+ scalability positively as the number of calls to the server
+ are reduced. But, be warned that local caching is not suitable
+ for all workloads, for e.g., read-once type workloads. So
+ you need to consider carefully the situation/workload before
+ using this option. Currently, local disk caching is enabled
+ for CIFS files opened as read-only.
+ NOTE: This feature is available only in the recent kernels
+ that have been built with the kernel config option
+ CONFIG_CIFS_FSCACHE. You also need to have cachefilesd daemon
+ installed and running to make the cache operational.
+ </para></listitem>
+ </varlistentry>
<varlistentry>
<term>--verbose</term>
<listitem><para>Print additional debugging information for the mount. Note that this parameter must be specified before the -o. For example:</para><para>mount -t cifs //server/share /mnt --verbose -o user=username</para></listitem>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/mount.cifs.8 new/cifs-utils-4.6/mount.cifs.8
--- old/cifs-utils-4.5/mount.cifs.8 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/mount.cifs.8 2010-07-30 14:17:01.000000000 +0200
@@ -389,6 +389,13 @@
default network write size (default 57344) maximum wsize currently allowed by CIFS is 57344 (fourteen 4096 byte pages)
.RE
.PP
+fsc
+.RS 4
+Enable local disk caching using FS-Cache for CIFS\&. This option could be useful to improve performance on a slow link, heavily loaded server and/or network where reading from the disk is faster than reading from the server (over the network)\&. This could also impact the scalability positively as the number of calls to the server are reduced\&. But, be warned that local caching is not suitable for all workloads, for e.g., read-once type workloads\&. So, you need to consider carefully the situation/workload before using this option\&. Currently, local disk caching is enabled for CIFS files opened as read-only\&.
+.sp
+NOTE: This feature is available only in the recent kernels that have been built with the kernel config option CONFIG_CIFS_FSCACHE. You also need to have cachefilesd daemon installed and running to make the cache operational\&.
+.RE
+.PP
\-\-verbose
.RS 4
Print additional debugging information for the mount\&. Note that this parameter must be specified before the \-o\&. For example:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/mount.cifs.c new/cifs-utils-4.6/mount.cifs.c
--- old/cifs-utils-4.5/mount.cifs.c 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/mount.cifs.c 2010-07-30 14:17:01.000000000 +0200
@@ -41,7 +41,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#ifdef HAVE_LIBCAP_NG
@@ -133,6 +133,7 @@
* Values for parsing command line options.
*/
#define OPT_ERROR -1
+#define OPT_IGNORE 0
#define OPT_USERS 1
#define OPT_USER 2
#define OPT_USER_XATTR 3
@@ -159,6 +160,8 @@
#define OPT_RO 24
#define OPT_RW 25
#define OPT_REMOUNT 26
+#define OPT_MAND 27
+#define OPT_NOMAND 28
/* struct for holding parsed mount info for use by privleged process */
@@ -212,9 +215,9 @@
struct mntent *mnt;
/* make sure this mount is listed in /etc/fstab */
- fstab = setmntent(_PATH_FSTAB, "r");
+ fstab = setmntent(_PATH_MNTTAB, "r");
if (!fstab) {
- fprintf(stderr, "Couldn't open %s for reading!\n", _PATH_FSTAB);
+ fprintf(stderr, "Couldn't open %s for reading!\n", _PATH_MNTTAB);
return EX_FILEIO;
}
@@ -226,7 +229,7 @@
if (mnt == NULL || strcmp(mnt->mnt_fsname, devname)) {
fprintf(stderr, "%s: permission denied: no match for "
- "%s found in %s\n", progname, mountpoint, _PATH_FSTAB);
+ "%s found in %s\n", progname, mountpoint, _PATH_MNTTAB);
return EX_USAGE;
}
@@ -265,7 +268,7 @@
fprintf(stream,
"\n\tmapchars,nomapchars,nolock,servernetbiosname=");
fprintf(stream,
- "\n\tdirectio,nounix,cifsacl,sec=<authentication mechanism>,sign");
+ "\n\tdirectio,nounix,cifsacl,sec=<authentication mechanism>,sign,fsc");
fprintf(stream,
"\n\nOptions not needed for servers supporting CIFS Unix extensions");
fprintf(stream,
@@ -800,6 +803,8 @@
return OPT_UNC;
if (strncmp(token, "dom", 3) == 0 || strncmp(token, "workg", 5) == 0)
return OPT_DOM;
+ if (strncmp(token, "cred", 4) == 0)
+ return OPT_CRED;
if (strncmp(token, "uid", 3) == 0)
return OPT_UID;
if (strncmp(token, "gid", 3) == 0)
@@ -810,7 +815,7 @@
return OPT_FILE_MODE;
if (strncmp(token, "dmask", 5) == 0)
return OPT_DMASK;
- if (strncmp(token, "dir_mode", 8) == 0)
+ if (strncmp(token, "dir_mode", 4) == 0 || strncmp(token, "dirm", 4) == 0)
return OPT_DIR_MODE;
if (strncmp(token, "nosuid", 6) == 0)
return OPT_NO_SUID;
@@ -820,6 +825,10 @@
return OPT_NO_DEV;
if (strncmp(token, "nobrl", 5) == 0 || strncmp(token, "nolock", 6) == 0)
return OPT_NO_LOCK;
+ if (strncmp(token, "mand", 4) == 0)
+ return OPT_MAND;
+ if (strncmp(token, "nomand", 6) == 0)
+ return OPT_NOMAND;
if (strncmp(token, "dev", 3) == 0)
return OPT_DEV;
if (strncmp(token, "noexec", 6) == 0)
@@ -834,6 +843,8 @@
return OPT_RW;
if (strncmp(token, "remount", 7) == 0)
return OPT_REMOUNT;
+ if (strncmp(token, "_netdev", 7) == 0)
+ return OPT_IGNORE;
return OPT_ERROR;
}
@@ -1104,6 +1115,12 @@
case OPT_NO_LOCK:
*filesys_flags &= ~MS_MANDLOCK;
break;
+ case OPT_MAND:
+ *filesys_flags |= MS_MANDLOCK;
+ goto nocopy;
+ case OPT_NOMAND:
+ *filesys_flags &= ~MS_MANDLOCK;
+ goto nocopy;
case OPT_DEV:
*filesys_flags &= ~MS_NODEV;
break;
@@ -1126,6 +1143,8 @@
case OPT_REMOUNT:
*filesys_flags |= MS_REMOUNT;
break;
+ case OPT_IGNORE:
+ goto nocopy;
}
/* check size before copying option to buffer */
@@ -1728,8 +1747,6 @@
return EX_SYSERR;
}
- parsed_info->flags = MS_MANDLOCK;
-
/* add sharename in opts string as unc= parm */
while ((c = getopt_long(argc, argv, "?fhno:rvVw",
longopts, NULL)) != -1) {
@@ -1951,7 +1968,7 @@
}
if (!parsed_info->nomtab)
- rc = add_mtab(dev_name, mountpoint, parsed_info->flags, fstype);
+ rc = add_mtab(orig_dev, mountpoint, parsed_info->flags, fstype);
mount_exit:
if (parsed_info) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cifs-utils-4.5/mtab.c new/cifs-utils-4.6/mtab.c
--- old/cifs-utils-4.5/mtab.c 2010-05-21 22:04:14.000000000 +0200
+++ new/cifs-utils-4.6/mtab.c 2010-07-30 14:17:01.000000000 +0200
@@ -51,12 +51,12 @@
static int signals_have_been_setup = 0;
static void
-handler (int sig) {
+handler (int sig __attribute__((unused))) {
exit(EX_USER);
}
static void
-setlkw_timeout (int sig) {
+setlkw_timeout (int sig __attribute__((unused))) {
/* nothing, fcntl will fail anyway */
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org