Re: mutiuser request_key in both ntlmssp and krb5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shyam Prasad N <nspmangalore@xxxxxxxxx> writes:
> 1. For ntlmssp, I see that the credentials are stored in the keyring
> with IPv4 or IPv6 address as the key. Suppose the mount was initially
> done using hostname, and IP address changes (more likely in Azure
> scenario), we may end up looking for credentials with the wrong key.

Yes I thought the same thing.. I'm not sure why the decision to use IP
was made.

> 2. For ntlmssp, if I add another user credentials to the keyring using
> cifscreds, doesn’t that overwrite the prev user’s credentials? Or is
> there a way to store multiple credentials for the same server?

IIRC the keyring used is the session one, so each user gets a different keyring.

> 3. For krb5, and multiuser mount, how should cifs.ko get the username
> for a user? Currently, I don’t think we read the username from
> anywhere.

Remember that all code running in cifs.ko is always in the context of a
process (or a kthread which is also using struct task). It's the process
who does some syscall that calls cifs.ko. So within the kernel code you
can always access the calling process task via the 'current' pointer.

We use current_fsuid() to get the current uid.

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux