Acked-by: Igor Mammedov <niallain@xxxxxxxxx> On Fri, Jan 7, 2011 at 5:11 PM, Jeff Layton <jlayton@xxxxxxxxx> wrote: > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxx> > --- > Âcifs.upcall.c |  17 +++++++++++++++++ > Â1 files changed, 17 insertions(+), 0 deletions(-) > > diff --git a/cifs.upcall.c b/cifs.upcall.c > index d83dddf..12df8cc 100644 > --- a/cifs.upcall.c > +++ b/cifs.upcall.c > @@ -444,12 +444,14 @@ handle_krb5_mech(const char *oid, const char *principal, DATA_BLOB * secblob, > Â#define DKD_HAVE_UID      0x10 > Â#define DKD_HAVE_PID      0x20 > Â#define DKD_HAVE_CREDUID    0x40 > +#define DKD_HAVE_USERNAME   Â0x80 > Â#define DKD_MUSTHAVE_SET (DKD_HAVE_HOSTNAME|DKD_HAVE_VERSION|DKD_HAVE_SEC) > > Âstruct decoded_args { >    Âint ver; >    Âchar *hostname; >    Âchar *ip; > +    char *username; >    Âuid_t uid; >    Âuid_t creduid; >    Âpid_t pid; > @@ -495,6 +497,20 @@ decode_key_description(const char *desc, struct decoded_args *arg) >                Âreturn 1; >            Â} >            Âretval |= DKD_HAVE_IP; > +        } else if (strncmp(tkn, "user=", 5) == 0) { > +            if (pos == NULL) > +                len = strlen(tkn); > +            else > +                len = pos - tkn; > + > +            len -= 5; > +            SAFE_FREE(arg->username); > +            arg->username = strndup(tkn + 5, len); > +            if (arg->username == NULL) { > +                syslog(LOG_ERR, "Unable to allocate memory"); > +                return 1; > +            } > +            retval |= DKD_HAVE_USERNAME; >        Â} else if (strncmp(tkn, "pid=", 4) == 0) { >            Âerrno = 0; >            Âarg->pid = strtol(tkn + 4, NULL, 0); > @@ -865,6 +881,7 @@ out: >    ÂSAFE_FREE(ccname); >    ÂSAFE_FREE(arg.hostname); >    ÂSAFE_FREE(arg.ip); > +    SAFE_FREE(arg.username); >    ÂSAFE_FREE(keydata); >    Âreturn rc; > Â} > -- > 1.7.3.4 > > ÿô.nÇ·®+%˱é¥wÿº{.nÇ·¥{±ý¶¡Ü}©²ÆzÚj:+v¨þø®w¥þàÞ¨è&¢)ß«a¶Úÿûz¹ÞúÝjÿwèf