Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12b3b8ff authored by Steve French's avatar Steve French
Browse files

[CIFS] Cleanup NTLMSSP session setup handling



Fix to hash NTLMv2 properly will follow.

Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent e3f749c4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
Version 1.41
------------
Fix NTLMv2 security (can be enabled in /proc/fs/cifs) so customers can
configure stronger authentication.  Fix sfu symlinks so they can
be followed (not just recognized).

Version 1.40
------------
Use fsuid (fsgid) more consistently instead of uid (gid). Improve performance
+3 −2
Original line number Diff line number Diff line
/*
 *   fs/cifs/cifsencrypt.c
 *
 *   Copyright (C) International Business Machines  Corp., 2005
 *   Copyright (C) International Business Machines  Corp., 2005,2006
 *   Author(s): Steve French (sfrench@us.ibm.com)
 *
 *   This library is free software; you can redistribute it and/or modify
@@ -36,7 +36,8 @@
extern void mdfour(unsigned char *out, unsigned char *in, int n);
extern void E_md4hash(const unsigned char *passwd, unsigned char *p16);
	
static int cifs_calculate_signature(const struct smb_hdr * cifs_pdu, const char * key, char * signature)
static int cifs_calculate_signature(const struct smb_hdr * cifs_pdu, 
				    const char * key, char * signature)
{
	struct	MD5Context context;

+1 −1
Original line number Diff line number Diff line
@@ -99,5 +99,5 @@ extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);
extern ssize_t	cifs_listxattr(struct dentry *, char *, size_t);
extern int cifs_ioctl (struct inode * inode, struct file * filep,
		       unsigned int command, unsigned long arg);
#define CIFS_VERSION   "1.40"
#define CIFS_VERSION   "1.41"
#endif				/* _CIFSFS_H */
+2 −0
Original line number Diff line number Diff line
@@ -64,6 +64,8 @@ extern int map_smb_to_linux_error(struct smb_hdr *smb);
extern void header_assemble(struct smb_hdr *, char /* command */ ,
			    const struct cifsTconInfo *, int /* length of
			    fixed section (word count) in two byte units */);
extern int small_smb_init_no_tc(int smb_cmd, int wct, struct cifsSesInfo *ses,
				void ** request_buf);
extern __u16 GetNextMid(struct TCP_Server_Info *server);
extern struct oplock_q_entry * AllocOplockQEntry(struct inode *, u16, 
						 struct cifsTconInfo *);
+26 −1
Original line number Diff line number Diff line
/*
 *   fs/cifs/cifssmb.c
 *
 *   Copyright (C) International Business Machines  Corp., 2002,2005
 *   Copyright (C) International Business Machines  Corp., 2002,2006
 *   Author(s): Steve French (sfrench@us.ibm.com)
 *
 *   Contains the routines for constructing the SMB PDUs themselves
@@ -187,6 +187,31 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,

	return rc;
}  
int
small_smb_init_no_tcon(int smb_command, int wct, struct cifsSesInfo *ses,
		       void **request_buf)
{
	int rc;
	struct smb_hdr * buffer;

	rc = small_smb_init(smb_command, wct, 0, request_buf);
	if(rc)
		return rc;

	buffer->Mid = GetNextMid(ses->server);
	if (ses->capabilities & CAP_UNICODE)
		buffer->Flags2 |= SMBFLG2_UNICODE;
	if (ses->capabilities & CAP_STATUS32) {
		buffer->Flags2 |= SMBFLG2_ERR_STATUS;

	/* uid, tid can stay at zero as set in header assemble */

	/* BB add support for turning on the signing when 
	this function is used after 1st of session setup requests */

	return rc;
}


/* If the return code is zero, this function must fill in request_buf pointer */
static int
Loading