From: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Shirish Pargaonkar
<shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Simo Sorce <simo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 2/4] cifs: Split ntlm and ntlmv2 authentication methods off CIFS_SessSetup()
Date: Fri, 02 May 2014 14:17:03 +0100 [thread overview]
Message-ID: <1399036623.3970.3.camel@sachin-laptop> (raw)
In-Reply-To: <CADT32e+VHgmUJoZfR0FJfhBGMLHzG0EfsFDAP+Ex2ikT9353LA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 2014-05-01 at 15:01 -0500, Shirish Pargaonkar wrote:
> On Thu, May 1, 2014 at 11:26 AM, Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > On Thu, 2014-05-01 at 10:31 -0500, Shirish Pargaonkar wrote:
> >
> >> > +
> >> > +out:
> >> > + sess_data->result = rc;
> >> > + sess_data->func = NULL;
> >> > + sess_free_buffer(sess_data);
> >> > + sess_establish_session(sess_data);
> >> > + kfree(ses->auth_key.response);
> >> > + ses->auth_key.response = NULL;
> >> > +}
> >>
> >> In all three sess_auth_* functions (ntlm, ntlmv2, and lanman (in
> >> previous patch),
> >> we will end up calling sess_establish_session() even if there is an error i.e.
> >> sess_data->result is not 0.
> >
> > We check for any errors within sess_establish_session() before we
> > attempt to establish session.
> >
> > static int
> > sess_establish_session(struct sess_data *sess_data)
> > {
> > ..
> > if (!sess_data->result) {
> > //Establish Session.
> > }
> > ..
> > }
> >
> > This isn't a technical issue but maybe considered a style issue.
>
> Sure, would have preferred to call the function before goto lables, but will
> leave at that.
>
Having given it another thought, I agree with you. I've made the
required modifications and tested the new patches. I'll send them to the
list shortly.
Sachin Prabhu
> >
> >
> >> > + if (phase == NtLmChallenge) {
> >> > + rc = decode_ntlmssp_challenge(bcc_ptr, blob_len, ses);
> >> > + /* now goto beginning for ntlmssp authenticate phase */
> >>
> >> I think this comment should move to after if statement
> >> (it was at wrong place to begin with) i.e. go to authenticate phase
> >> only if rc is NULL.
> >
> > I agree. The comment is actually not required.
> >
> > Sachin Prabhu
> >
next prev parent reply other threads:[~2014-05-02 13:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 12:41 [PATCH 0/4 v2] Split CIFS_SessSetup() Sachin Prabhu
[not found] ` <1398948065-23265-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 12:41 ` [PATCH 1/4] cifs: Split lanman auth from CIFS_SessSetup() Sachin Prabhu
[not found] ` <1398948065-23265-2-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 15:00 ` Shirish Pargaonkar
2014-05-01 12:41 ` [PATCH 2/4] cifs: Split ntlm and ntlmv2 authentication methods off CIFS_SessSetup() Sachin Prabhu
[not found] ` <1398948065-23265-3-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 15:31 ` Shirish Pargaonkar
[not found] ` <CADT32e+uuZbXhGyCujnZ2Ed+2nihJeRMduZvqD21yCH=_i-YhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-01 16:26 ` Sachin Prabhu
2014-05-01 20:01 ` Shirish Pargaonkar
[not found] ` <CADT32e+VHgmUJoZfR0FJfhBGMLHzG0EfsFDAP+Ex2ikT9353LA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-02 13:17 ` Sachin Prabhu [this message]
2014-05-01 12:41 ` [PATCH 3/4] cifs: Split Kerberos authentication " Sachin Prabhu
[not found] ` <1398948065-23265-4-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 22:02 ` Shirish Pargaonkar
2014-05-01 12:41 ` [PATCH 4/4] cifs: Separate rawntlmssp auth from CIFS_SessSetup() Sachin Prabhu
[not found] ` <1398948065-23265-5-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 22:01 ` Shirish Pargaonkar
2014-05-01 12:57 ` [PATCH 0/4 v2] Split CIFS_SessSetup() Simo
-- strict thread matches above, loose matches on Subject: below --
2014-05-02 13:21 [PATCH 0/4 v3] " Sachin Prabhu
[not found] ` <1399036891-15689-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-02 13:21 ` [PATCH 2/4] cifs: Split ntlm and ntlmv2 authentication methods off CIFS_SessSetup() Sachin Prabhu
[not found] ` <1399036891-15689-3-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-02 19:26 ` Jeff Layton
2014-04-28 14:12 [PATCH 0/4] RFC: Split CIFS_SessSetup() Sachin Prabhu
[not found] ` <1398694350-8526-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-04-28 14:12 ` [PATCH 2/4] cifs: Split ntlm and ntlmv2 authentication methods off CIFS_SessSetup() Sachin Prabhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399036623.3970.3.camel@sachin-laptop \
--to=sprabhu-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=simo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox