]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cifs: remove legacy MultiuserMount option
authorJeff Layton <jlayton@redhat.com>
Wed, 16 May 2012 11:13:17 +0000 (07:13 -0400)
committerSteve French <sfrench@us.ibm.com>
Thu, 17 May 2012 01:13:31 +0000 (20:13 -0500)
We've now warned about this for two releases. Remove it for 3.5.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
fs/cifs/README
fs/cifs/cifs_debug.c
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/misc.c

index b7d782bab79731694adc8d55489d8e258aace167..22ab7b5b8da7eda6bf38d19aff3415eade104c5c 100644 (file)
@@ -608,11 +608,6 @@ Stats                      Lists summary resource usage information as well as per
                        in the kernel configuration.
 
 Configuration pseudo-files:
-MultiuserMount         If set to one, more than one CIFS session to 
-                       the same server ip address can be established
-                       if more than one uid accesses the same mount
-                       point and if the uids user/password mapping
-                       information is available. (default is 0)
 PacketSigningEnabled   If set to one, cifs packet signing is enabled
                        and will be used if the server requires 
                        it.  If set to two, cifs packet signing is
index 2704646294166bec7edf9c006c98d5229a1eaab9..8aae8e28038c34b248b0f38cc5f1242051bf6c2e 100644 (file)
@@ -420,7 +420,6 @@ static struct proc_dir_entry *proc_fs_cifs;
 static const struct file_operations cifsFYI_proc_fops;
 static const struct file_operations cifs_lookup_cache_proc_fops;
 static const struct file_operations traceSMB_proc_fops;
-static const struct file_operations cifs_multiuser_mount_proc_fops;
 static const struct file_operations cifs_security_flags_proc_fops;
 static const struct file_operations cifs_linux_ext_proc_fops;
 
@@ -440,8 +439,6 @@ cifs_proc_init(void)
        proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops);
        proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs,
                    &cifs_linux_ext_proc_fops);
-       proc_create("MultiuserMount", 0, proc_fs_cifs,
-                   &cifs_multiuser_mount_proc_fops);
        proc_create("SecurityFlags", 0, proc_fs_cifs,
                    &cifs_security_flags_proc_fops);
        proc_create("LookupCacheEnabled", 0, proc_fs_cifs,
@@ -460,7 +457,6 @@ cifs_proc_clean(void)
 #ifdef CONFIG_CIFS_STATS
        remove_proc_entry("Stats", proc_fs_cifs);
 #endif
-       remove_proc_entry("MultiuserMount", proc_fs_cifs);
        remove_proc_entry("SecurityFlags", proc_fs_cifs);
        remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs);
        remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
@@ -617,52 +613,6 @@ static const struct file_operations traceSMB_proc_fops = {
        .write          = traceSMB_proc_write,
 };
 
-static int cifs_multiuser_mount_proc_show(struct seq_file *m, void *v)
-{
-       seq_printf(m, "%d\n", multiuser_mount);
-       return 0;
-}
-
-static int cifs_multiuser_mount_proc_open(struct inode *inode, struct file *fh)
-{
-       return single_open(fh, cifs_multiuser_mount_proc_show, NULL);
-}
-
-static ssize_t cifs_multiuser_mount_proc_write(struct file *file,
-               const char __user *buffer, size_t count, loff_t *ppos)
-{
-       char c;
-       int rc;
-       static bool warned;
-
-       rc = get_user(c, buffer);
-       if (rc)
-               return rc;
-       if (c == '0' || c == 'n' || c == 'N')
-               multiuser_mount = 0;
-       else if (c == '1' || c == 'y' || c == 'Y') {
-               multiuser_mount = 1;
-               if (!warned) {
-                       warned = true;
-                       printk(KERN_WARNING "CIFS VFS: The legacy multiuser "
-                               "mount code is scheduled to be deprecated in "
-                               "3.5. Please switch to using the multiuser "
-                               "mount option.");
-               }
-       }
-
-       return count;
-}
-
-static const struct file_operations cifs_multiuser_mount_proc_fops = {
-       .owner          = THIS_MODULE,
-       .open           = cifs_multiuser_mount_proc_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-       .write          = cifs_multiuser_mount_proc_write,
-};
-
 static int cifs_security_flags_proc_show(struct seq_file *m, void *v)
 {
        seq_printf(m, "0x%x\n", global_secflags);
index 541ef81f6ae8ffe99ebcfa9c303f9c15975dd8c7..c45f170c28d02f643000cf53dce8cd3d417c469c 100644 (file)
@@ -56,7 +56,6 @@ int traceSMB = 0;
 bool enable_oplocks = true;
 unsigned int linuxExtEnabled = 1;
 unsigned int lookupCacheEnabled = 1;
-unsigned int multiuser_mount = 0;
 unsigned int global_secflags = CIFSSEC_DEF;
 /* unsigned int ntlmv2_support = 0; */
 unsigned int sign_CIFS_PDUs = 1;
index 4ff6313f0a9158958fbf0f63e4b21464b281c996..a867d9923d7d917704778733e60d96eee0670622 100644 (file)
@@ -1042,12 +1042,7 @@ GLOBAL_EXTERN atomic_t smBufAllocCount;
 GLOBAL_EXTERN atomic_t midCount;
 
 /* Misc globals */
-GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions
-                               to be established on existing mount if we
-                               have the uid/password or Kerberos credential
-                               or equivalent for current user */
-/* enable or disable oplocks */
-GLOBAL_EXTERN bool enable_oplocks;
+GLOBAL_EXTERN bool enable_oplocks; /* enable or disable oplocks */
 GLOBAL_EXTERN unsigned int lookupCacheEnabled;
 GLOBAL_EXTERN unsigned int global_secflags;    /* if on, session setup sent
                                with more secure ntlmssp2 challenge/resp */
index c29d1aa2c54f30a76c25aa6ba843008b567ca96f..d2bb1e75ee9601026d90a171116a3543c88e5839 100644 (file)
@@ -306,8 +306,6 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
                const struct cifs_tcon *treeCon, int word_count
                /* length of fixed section (word count) in two byte units  */)
 {
-       struct list_head *temp_item;
-       struct cifs_ses *ses;
        char *temp = (char *) buffer;
 
        memset(temp, 0, 256); /* bigger than MAX_CIFS_HDR_SIZE */
@@ -337,51 +335,6 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
                        /* Uid is not converted */
                        buffer->Uid = treeCon->ses->Suid;
                        buffer->Mid = GetNextMid(treeCon->ses->server);
-                       if (multiuser_mount != 0) {
-               /* For the multiuser case, there are few obvious technically  */
-               /* possible mechanisms to match the local linux user (uid)    */
-               /* to a valid remote smb user (smb_uid):                      */
-               /*      1) Query Winbind (or other local pam/nss daemon       */
-               /*        for userid/password/logon_domain or credential      */
-               /*      2) Query Winbind for uid to sid to username mapping   */
-               /*         and see if we have a matching password for existing*/
-               /*         session for that user perhas getting password by   */
-               /*         adding a new pam_cifs module that stores passwords */
-               /*         so that the cifs vfs can get at that for all logged*/
-               /*         on users                                           */
-               /*      3) (Which is the mechanism we have chosen)            */
-               /*         Search through sessions to the same server for a   */
-               /*         a match on the uid that was passed in on mount     */
-               /*         with the current processes uid (or euid?) and use  */
-               /*         that smb uid.   If no existing smb session for     */
-               /*         that uid found, use the default smb session ie     */
-               /*         the smb session for the volume mounted which is    */
-               /*         the same as would be used if the multiuser mount   */
-               /*         flag were disabled.  */
-
-               /*  BB Add support for establishing new tCon and SMB Session  */
-               /*      with userid/password pairs found on the smb session   */
-               /*      for other target tcp/ip addresses               BB    */
-                               if (current_fsuid() != treeCon->ses->linux_uid) {
-                                       cFYI(1, "Multiuser mode and UID "
-                                                "did not match tcon uid");
-                                       spin_lock(&cifs_tcp_ses_lock);
-                                       list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) {
-                                               ses = list_entry(temp_item, struct cifs_ses, smb_ses_list);
-                                               if (ses->linux_uid == current_fsuid()) {
-                                                       if (ses->server == treeCon->ses->server) {
-                                                               cFYI(1, "found matching uid substitute right smb_uid");
-                                                               buffer->Uid = ses->Suid;
-                                                               break;
-                                                       } else {
-                               /* BB eventually call cifs_setup_session here */
-                                                               cFYI(1, "local UID found but no smb sess with this server exists");
-                                                       }
-                                               }
-                                       }
-                                       spin_unlock(&cifs_tcp_ses_lock);
-                               }
-                       }
                }
                if (treeCon->Flags & SMB_SHARE_IS_IN_DFS)
                        buffer->Flags2 |= SMBFLG2_DFS;