[linux-cifs-client] [PATCH 2/2] cifs.spnego helper in samba: helper source code

simo idra at samba.org
Mon Nov 12 08:03:46 GMT 2007


On Wed, 2007-11-07 at 14:02 +0300, Q (Igor Mammedov) wrote:
> +       // do mech specific authorization
> +       switch(sectype){
> +               case KRB5:{
> +                       char* princ;
> +                       size_t len;
> +
> +                       /* for "cifs/" service name + terminating 0*/
> +                       len = strlen(hostname)+6;
> +                       princ = malloc(len);
> +                       if ( !princ ) {
> +                               rc = 1;
> +                               break;
> +                       }
> +                       strncpy(princ,"cifs/",len);
> +                       strncpy(princ+5,hostname,len-5);
> +

Aren't we missing the REALM here ?

And of course a good question is also .. how do we determine the realm ?
I am thinking of cases where the server is in another realm and there is
a trust between the server realm and the user realm.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <ssorce at redhat.com>



More information about the linux-cifs-client mailing list