[linux-cifs-client] [PATCH 3/5] [CIFS] change cifs_setup_session to take a unc string arg

Jeff Layton jlayton at redhat.com
Tue Oct 30 16:45:56 GMT 2007


On Tue, 30 Oct 2007 19:30:18 +0300
"Q (Igor Mammedov)" <qwerty0987654321 at mail.ru> wrote:

> Jeff Layton wrote:
> > +
> >  int cifs_setup_session(unsigned int xid, struct cifsSesInfo
> > *pSesInfo,
> > -					   struct nls_table
> > *nls_info)
> > +			struct nls_table *nls_info, const char
> > *unc) {
> >  	int rc = 0;
> >  	char ntlm_session_key[CIFS_SESS_KEY_SIZE];
> >  	int ntlmv2_flag = FALSE;
> >  	int first_time = 0;
> > +	char *hostname;
> > +
> > +	hostname = extract_hostname_from_unc(unc);
> 
> We already have server's IP and userspace helper could easily do
> reverse lookup to find out server name.
> Benefits:
>     1. readability, simplicity: no need in adding additional argument 
> and function (less changes)
>     2. security: force administrators to do correct dns
> configuration. ( 	FQDN -> IP -> FQDN )
> 

That was my thought too, but Simo seems to believe that that won't be
reliable enough and that admins may not have control of their
in-addr.arpa domains.

Simo, care to comment?

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list