Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 01:31:57 +0000 (18:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 01:31:57 +0000 (18:31 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (25 commits)
  [CIFS] Fix authentication choice so we do not force NTLMv2 unless the
  [CIFS] Fix alignment of unicode strings in previous patch
  [CIFS] Fix allocation of buffers for new session setup routine to allow
  [CIFS] Remove calls to to take f_owner.lock
  [CIFS] remove some redundant null pointer checks
  [CIFS] Fix compile warning when CONFIG_CIFS_EXPERIMENTAL is off
  [CIFS] Enable sec flags on mount for cifs (part one)
  [CIFS] Fix suspend/resume problem which causes EIO on subsequent access to
  [CIFS] fix minor compile warning when config_cifs_weak_security is off
  [CIFS] NTLMv2 support part 5
  [CIFS] Add support for readdir to legacy servers
  [CIFS] NTLMv2 support part 4
  [CIFS] NTLMv2 support part 3
  [CIFS] NTLMv2 support part 2
  [CIFS] Fix mask so can set new cifs security flags properly
  CIFS] Support for older servers which require plaintext passwords - part 2
  [CIFS] Support for older servers which require plaintext passwords
  [CIFS] Fix mapping of old SMB return code Invalid Net Name so it is
  [CIFS] Missing brace
  [CIFS] Do not overwrite aops
  ...

1  2 
fs/Kconfig
fs/cifs/cifsfs.c

diff --combined fs/Kconfig
index 6c5051802bd285bebefc266a282cf3539846850f,467f7ae5f092717745cbc93fe7f41e5fc77181c7..00aa3d5c5a832f32ccc633e4973a418f261d29b0
@@@ -776,8 -776,7 +776,8 @@@ endmen
  menu "Pseudo filesystems"
  
  config PROC_FS
 -      bool "/proc file system support"
 +      bool "/proc file system support" if EMBEDDED
 +      default y
        help
          This is a virtual file system providing information about the status
          of the system. "Virtual" means that it doesn't take up any space on
@@@ -1371,19 -1370,11 +1371,19 @@@ config UFS_F
  
  config UFS_FS_WRITE
        bool "UFS file system write support (DANGEROUS)"
 -      depends on UFS_FS && EXPERIMENTAL && BROKEN
 +      depends on UFS_FS && EXPERIMENTAL
        help
          Say Y here if you want to try writing to UFS partitions. This is
          experimental, so you should back up your UFS partitions beforehand.
  
 +config UFS_DEBUG
 +      bool "UFS debugging"
 +      depends on UFS_FS
 +      help
 +        If you are experiencing any problems with the UFS filesystem, say
 +        Y here.  This will result in _many_ additional debugging messages to be
 +        written to the system log.
 +
  endmenu
  
  menu "Network File Systems"
@@@ -1490,12 -1481,7 +1490,12 @@@ config NFS
        select LOCKD
        select SUNRPC
        select EXPORTFS
 -      select NFS_ACL_SUPPORT if NFSD_V3_ACL || NFSD_V2_ACL
 +      select NFSD_V2_ACL if NFSD_V3_ACL
 +      select NFS_ACL_SUPPORT if NFSD_V2_ACL
 +      select NFSD_TCP if NFSD_V4
 +      select CRYPTO_MD5 if NFSD_V4
 +      select CRYPTO if NFSD_V4
 +      select FS_POSIX_ACL if NFSD_V4
        help
          If you want your Linux box to act as an NFS *server*, so that other
          computers on your local network which support NFS can access certain
@@@ -1533,6 -1519,7 +1533,6 @@@ config NFSD_V
  config NFSD_V3_ACL
        bool "Provide server support for the NFSv3 ACL protocol extension"
        depends on NFSD_V3
 -      select NFSD_V2_ACL
        help
          Implement the NFSv3 ACL protocol extension for manipulating POSIX
          Access Control Lists on exported file systems. NFS clients should
  config NFSD_V4
        bool "Provide NFSv4 server support (EXPERIMENTAL)"
        depends on NFSD_V3 && EXPERIMENTAL
 -      select NFSD_TCP
 -      select CRYPTO_MD5
 -      select CRYPTO
 -      select FS_POSIX_ACL
        help
          If you would like to include the NFSv4 server as well as the NFSv2
          and NFSv3 servers, say Y here.  This feature is experimental, and
@@@ -1722,7 -1713,7 +1722,7 @@@ config CIFS_STAT
          mounted by the cifs client to be displayed in /proc/fs/cifs/Stats
  
  config CIFS_STATS2
-       bool "CIFS extended statistics"
+       bool "Extended statistics"
        depends on CIFS_STATS
        help
          Enabling this option will allow more detailed statistics on SMB
          Unless you are a developer or are doing network performance analysis
          or tuning, say N.
  
+ config CIFS_WEAK_PW_HASH
+       bool "Support legacy servers which use weaker LANMAN security"
+       depends on CIFS
+       help
+         Modern CIFS servers including Samba and most Windows versions
+         (since 1997) support stronger NTLM (and even NTLMv2 and Kerberos)
+         security mechanisms. These hash the password more securely
+         than the mechanisms used in the older LANMAN version of the
+           SMB protocol needed to establish sessions with old SMB servers.
+         Enabling this option allows the cifs module to mount to older
+         LANMAN based servers such as OS/2 and Windows 95, but such
+         mounts may be less secure than mounts using NTLM or more recent
+         security mechanisms if you are on a public network.  Unless you
+         have a need to access old SMB servers (and are on a private 
+         network) you probably want to say N.  Even if this support
+         is enabled in the kernel build, they will not be used
+         automatically. At runtime LANMAN mounts are disabled but
+         can be set to required (or optional) either in
+         /proc/fs/cifs (see fs/cifs/README for more detail) or via an
+         option on the mount command. This support is disabled by 
+         default in order to reduce the possibility of a downgrade
+         attack.
+  
+         If unsure, say N.
  config CIFS_XATTR
          bool "CIFS extended attributes"
          depends on CIFS
@@@ -1763,6 -1780,16 +1789,16 @@@ config CIFS_POSI
          (such as Samba 3.10 and later) which can negotiate
          CIFS POSIX ACL support.  If unsure, say N.
  
+ config CIFS_DEBUG2
+       bool "Enable additional CIFS debugging routines"
+       help
+          Enabling this option adds a few more debugging routines
+          to the cifs code which slightly increases the size of
+          the cifs module and can cause additional logging of debug
+          messages in some error paths, slowing performance. This
+          option can be turned off unless you are debugging
+          cifs problems.  If unsure, say N.
+          
  config CIFS_EXPERIMENTAL
          bool "CIFS Experimental Features (EXPERIMENTAL)"
          depends on CIFS && EXPERIMENTAL
            If unsure, say N.
  
  config CIFS_UPCALL
-         bool "CIFS Kerberos/SPNEGO advanced session setup (EXPERIMENTAL)"
+         bool "Kerberos/SPNEGO advanced session setup (EXPERIMENTAL)"
          depends on CIFS_EXPERIMENTAL
          select CONNECTOR
          help
diff --combined fs/cifs/cifsfs.c
index 8b4de6eaabd0ee11bf329e02fa1060cd32a44d0c,f2e285457bee7df03dbadef3e6a00f22840fd3e5..c28ede599946842568356378cec5ed3eaff3f139
@@@ -56,8 -56,8 +56,8 @@@ unsigned int experimEnabled = 0
  unsigned int linuxExtEnabled = 1;
  unsigned int lookupCacheEnabled = 1;
  unsigned int multiuser_mount = 0;
- unsigned int extended_security = 0;
- unsigned int ntlmv2_support = 0;
+ unsigned int extended_security = CIFSSEC_DEF;
+ /* unsigned int ntlmv2_support = 0; */
  unsigned int sign_CIFS_PDUs = 1;
  extern struct task_struct * oplockThread; /* remove sparse warning */
  struct task_struct * oplockThread = NULL;
@@@ -403,14 -403,12 +403,14 @@@ static struct quotactl_ops cifs_quotact
  #endif
  
  #ifdef CONFIG_CIFS_EXPERIMENTAL
 -static void cifs_umount_begin(struct super_block * sblock)
 +static void cifs_umount_begin(struct vfsmount * vfsmnt, int flags)
  {
        struct cifs_sb_info *cifs_sb;
        struct cifsTconInfo * tcon;
  
 -      cifs_sb = CIFS_SB(sblock);
 +      if (!(flags & MNT_FORCE))
 +              return;
 +      cifs_sb = CIFS_SB(vfsmnt->mnt_sb);
        if(cifs_sb == NULL)
                return;
  
@@@ -908,7 -906,7 +908,7 @@@ static int cifs_dnotify_thread(void * d
        struct cifsSesInfo *ses;
  
        do {
-               if(try_to_freeze())
+               if (try_to_freeze())
                        continue;
                set_current_state(TASK_INTERRUPTIBLE);
                schedule_timeout(15*HZ);