Skip to content

Split CIFS_SessSetup()

Sachin Prabhu linux-cifs 4 versions – Applied

Status from this message: merged into cifs-2.6.git

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 9 repliesApplied
  2. v34 patches 4 repliesSuperseded
  3. v24 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches6 repliesSuperseded

Changes in v4 from the cover letter

- reordered elements of struct sess_data as asked by jlayton
- Use free_rsp_buf() to clean buffer.
- Clean up the rawntlmssp case further and break the calls into separate functions.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5cifs: replace code with free_rsp_buf()fs/cifs/cifsproto.h fs/cifs/cifssmb.c fs/cifs/misc.c +1 more+14 -262 replies
2/5cifs: Split lanman auth from CIFS_SessSetup()fs/cifs/sess.c+258 -451 reply
3/5cifs: Split ntlm and ntlmv2 authentication methods off CIFS_SessSetup()fs/cifs/sess.c+232 -841 reply
4/5cifs: Split Kerberos authentication off CIFS_SessSetup()fs/cifs/sess.c+153 -621 reply
5/5cifs: Separate rawntlmssp auth from CIFS_SessSetup()fs/cifs/sess.c+263 -2272 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchShirish Pargaonkar
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH 0/5 v4] Split CIFS_SessSetup()

I am investigating the possibility of adding support for gss-proxy in the cifs client module. As part of that investigation, I was looking at the CIFS_SessSetup() function. This is a long function which handles multiple auths using if conditions and switch statements. The code struction makes it difficult to modify or add support for new authentication mechanisms.

The proposal is to split the various authentication code into its own separate functions. This increases the lines of code but will simplify maintenance and addition of new auth methods.

The short term goal is to add gss-proxy support for kerberos authentication. This will require to and fro communication with the gss-proxy module over a unix socket.

Further long term goals are
1) Add support for NTLMSSP using SPNEGO,
2) Allow clients to negotiate which authentication mechanism to use using SPNEGO.

V2:
- Ensure that sess_data allocated on intermediate patches are freed.
- Remove ifdef-endif blocks from the switch statement in CIFS_SessSetup().

V3:
- Fix whitespace errors in some patches.
- Change sess_establish_session to return errors. Call this function only in case of successful establish session calls to the server.
- Delete an incorrect comment in case of rawntlmssp authentication.
- Delete an if statement before kfree(ntlmssp) in rawntlmssp authentication.

v4:
- reordered elements of struct sess_data as asked by jlayton
- Use free_rsp_buf() to clean buffer.
- Clean up the rawntlmssp case further and break the calls into separate functions.

Sachin Prabhu (5):
cifs: replace code with free_rsp_buf()
cifs: Split lanman auth from CIFS_SessSetup()
cifs: Split ntlm and ntlmv2 authentication methods off
CIFS_SessSetup()
cifs: Split Kerberos authentication off CIFS_SessSetup()
cifs: Separate rawntlmssp auth from CIFS_SessSetup()

 fs/cifs/cifsproto.h |    1 +
 fs/cifs/cifssmb.c   |   20 +-
 fs/cifs/misc.c      |    9 +
 fs/cifs/sess.c      | 1192 ++++++++++++++++++++++++++++++++++++---------------
 fs/cifs/smb2pdu.c   |   10 -
 5 files changed, 854 insertions(+), 378 deletions(-)
Signature · 1 line
1.9.3