Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f36b018 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6

parents 648bf4fb 47c886b3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
Version 1.40
------------
Use fsuid (fsgid) more consistently instead of uid (gid). Improve performance
of readpages by eliminating one extra memcpy. Allow update of file size
from remote server even if file is open for write as long as mount is
directio.  Recognize share mode security and send NTLM encrypted password
on tree connect if share mode negotiated.

Version 1.39
------------
Defer close of a file handle slightly if pending writes depend on that handle
@@ -7,6 +15,8 @@ Fix SFU style symlinks and mknod needed for servers which do not support the
CIFS Unix Extensions.  Fix setfacl/getfacl on bigendian. Timeout negative
dentries so files that the client sees as deleted but that later get created
on the server will be recognized.  Add client side permission check on setattr.
Timeout stuck requests better (where server has never responded or sent corrupt
responses)

Version 1.38
------------
+11 −1
Original line number Diff line number Diff line
@@ -436,6 +436,16 @@ A partial list of the supported mount options follows:
		SFU does).  In the future the bottom 9 bits of the mode
		mode also will be emulated using queries of the security
		descriptor (ACL).
sec		Security mode.  Allowed values are:
			none	attempt to connection as a null user (no name)
			krb5    Use Kerberos version 5 authentication
			krb5i   Use Kerberos authentication and packet signing
			ntlm    Use NTLM password hashing (default)
			ntlmi   Use NTLM password hashing with signing (if
				/proc/fs/cifs/PacketSigningEnabled on or if
				server requires signing also can be the default) 
			ntlmv2  Use NTLMv2 password hashing      
			ntlmv2i Use NTLMv2 password hashing with packet signing

The mount.cifs mount helper also accepts a few mount options before -o
including:
+31 −20
Original line number Diff line number Diff line
@@ -219,6 +219,10 @@ cifs_stats_write(struct file *file, const char __user *buffer,

        if (c == '1' || c == 'y' || c == 'Y' || c == '0') {
		read_lock(&GlobalSMBSeslock);
#ifdef CONFIG_CIFS_STATS2
		atomic_set(&totBufAllocCount, 0);
		atomic_set(&totSmBufAllocCount, 0);
#endif /* CONFIG_CIFS_STATS2 */
		list_for_each(tmp, &GlobalTreeConnectionList) {
			tcon = list_entry(tmp, struct cifsTconInfo,
					cifsConnectionList);
@@ -276,6 +280,14 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
			smBufAllocCount.counter,cifs_min_small);
	length += item_length;
	buf += item_length;
#ifdef CONFIG_CIFS_STATS2
        item_length = sprintf(buf, "Total Large %d Small %d Allocations\n",
				atomic_read(&totBufAllocCount),
		                atomic_read(&totSmBufAllocCount));
	length += item_length;
	buf += item_length;
#endif /* CONFIG_CIFS_STATS2 */

	item_length = 
		sprintf(buf,"Operations (MIDs): %d\n",
			midCount.counter);
@@ -389,8 +401,8 @@ static read_proc_t ntlmv2_enabled_read;
static write_proc_t ntlmv2_enabled_write;
static read_proc_t packet_signing_enabled_read;
static write_proc_t packet_signing_enabled_write;
static read_proc_t quotaEnabled_read;
static write_proc_t quotaEnabled_write;
static read_proc_t experimEnabled_read;
static write_proc_t experimEnabled_write;
static read_proc_t linuxExtensionsEnabled_read;
static write_proc_t linuxExtensionsEnabled_write;

@@ -430,9 +442,9 @@ cifs_proc_init(void)
		pde->write_proc = oplockEnabled_write;

	pde = create_proc_read_entry("Experimental", 0, proc_fs_cifs,
				quotaEnabled_read, NULL);
				experimEnabled_read, NULL);
	if (pde)
		pde->write_proc = quotaEnabled_write;
		pde->write_proc = experimEnabled_write;

	pde = create_proc_read_entry("LinuxExtensionsEnabled", 0, proc_fs_cifs,
				linuxExtensionsEnabled_read, NULL);
@@ -574,14 +586,13 @@ oplockEnabled_write(struct file *file, const char __user *buffer,
}

static int
quotaEnabled_read(char *page, char **start, off_t off,
experimEnabled_read(char *page, char **start, off_t off,
                   int count, int *eof, void *data)
{
        int len;

        len = sprintf(page, "%d\n", experimEnabled);
/* could also check if quotas are enabled in kernel
	as a whole first */

        len -= off;
        *start = page + off;

@@ -596,7 +607,7 @@ quotaEnabled_read(char *page, char **start, off_t off,
        return len;
}
static int
quotaEnabled_write(struct file *file, const char __user *buffer,
experimEnabled_write(struct file *file, const char __user *buffer,
                    unsigned long count, void *data)
{
	char c;
@@ -609,6 +620,8 @@ quotaEnabled_write(struct file *file, const char __user *buffer,
		experimEnabled = 0;
	else if (c == '1' || c == 'y' || c == 'Y')
		experimEnabled = 1;
	else if (c == '2')
		experimEnabled = 2;

	return count;
}
@@ -620,8 +633,6 @@ linuxExtensionsEnabled_read(char *page, char **start, off_t off,
        int len;

        len = sprintf(page, "%d\n", linuxExtEnabled);
/* could also check if quotas are enabled in kernel
	as a whole first */
        len -= off;
        *start = page + off;

+3 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#define CIFS_MOUNT_POSIX_PATHS	0x40 /* Negotiate posix pathnames if possible. */
#define CIFS_MOUNT_UNX_EMUL	0x80 /* Network compat with SFUnix emulation */
#define CIFS_MOUNT_NO_BRL	0x100 /* No sending byte range locks to srv */
#define CIFS_MOUNT_CIFS_ACL	0x200 /* send ACL requests to non-POSIX srv */

struct cifs_sb_info {
	struct cifsTconInfo *tcon;	/* primary mount */

fs/cifs/cifsacl.h

0 → 100644
+38 −0
Original line number Diff line number Diff line
/*
 *   fs/cifs/cifsacl.h
 *
 *   Copyright (c) International Business Machines  Corp., 2005
 *   Author(s): Steve French (sfrench@us.ibm.com)
 *
 *   This library is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published
 *   by the Free Software Foundation; either version 2.1 of the License, or
 *   (at your option) any later version.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 *   the GNU Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public License
 *   along with this library; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef _CIFSACL_H
#define _CIFSACL_H

struct cifs_sid {
	__u8 revision; /* revision level */
	__u8 num_subauths;
	__u8 authority[6];
	__u32 sub_auth[4];
	/* next sub_auth if any ... */
} __attribute__((packed));

/* everyone */
extern const struct cifs_sid sid_everyone;
/* group users */
extern const struct cifs_sid sid_user;

#endif /* _CIFSACL_H */
Loading