[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Tue Jul 12 01:31:02 MDT 2011
The branch, master has been updated
via 7b73b6f s3:libsmb: remove unused cli->privileges
via aca920b s3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2
via 00cd9ca s3:loadparm: use PROTOCOL_SMB2_02 instead of PROTOCOL_SMB2
via cc2a5d2 libcli/smb: add PROTOCOL_SMB2_02 constant
from f5d320a s3:smb2_create: use smbd_calculate_access_mask() instead of smbd_check_open_rights()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7b73b6f964471b613c27aabea6550a1d51c75e96
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 11 22:08:10 2011 +0200
s3:libsmb: remove unused cli->privileges
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Tue Jul 12 09:30:49 CEST 2011 on sn-devel-104
commit aca920b27c15c2c90f7baf41042a66fa556abe80
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 11 22:23:56 2011 +0200
s3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2
metze
commit 00cd9ca64a5d41295c53f9013186864e4394880b
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 11 22:22:49 2011 +0200
s3:loadparm: use PROTOCOL_SMB2_02 instead of PROTOCOL_SMB2
metze
commit cc2a5d23ae895a07d6f5f25a7273beaa721bb788
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 11 22:21:43 2011 +0200
libcli/smb: add PROTOCOL_SMB2_02 constant
metze
-----------------------------------------------------------------------
Summary of changes:
libcli/smb/smb_constants.h | 3 ++-
source3/include/client.h | 1 -
source3/libsmb/clirap.c | 5 ++++-
source3/param/loadparm.c | 5 +++--
source3/smbd/negprot.c | 2 +-
source3/smbd/process.c | 2 +-
source3/smbd/smb2_negprot.c | 2 +-
7 files changed, 12 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index ed7f6ff..0dd79e8 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -31,8 +31,9 @@ enum protocol_types {
PROTOCOL_LANMAN1,
PROTOCOL_LANMAN2,
PROTOCOL_NT1,
- PROTOCOL_SMB2
+ PROTOCOL_SMB2_02
};
+#define PROTOCOL_SMB2 PROTOCOL_SMB2_02
/* NT Flags2 bits - cifs6.txt section 3.1.2 */
#define FLAGS2_LONG_PATH_COMPONENTS 0x0001
diff --git a/source3/include/client.h b/source3/include/client.h
index eada792..b5b9bfc 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -60,7 +60,6 @@ struct cli_state {
int sec_mode;
int rap_error;
NTSTATUS raw_status; /* maybe via NT_STATUS_DOS() */
- int privileges;
char *desthost;
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 96003c1..b6cbec4 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -140,7 +140,10 @@ bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
if (cli->rap_error == 0) {
DEBUG(4,("NetWkstaUserLogon success\n"));
- cli->privileges = SVAL(p, 24);
+ /*
+ * The cli->privileges = SVAL(p, 24); field was set here
+ * but it was not use anywhere else.
+ */
/* The cli->eff_name field used to be set here
but it wasn't used anywhere else. */
} else {
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index e339a91..79f1b23 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -312,7 +312,8 @@ static void add_to_file_list(const char *fname, const char *subfname);
static bool lp_set_cmdline_helper(const char *pszParmName, const char *pszParmValue, bool store_values);
static const struct enum_list enum_protocol[] = {
- {PROTOCOL_SMB2, "SMB2"},
+ {PROTOCOL_SMB2_02, "SMB2"},
+ {PROTOCOL_SMB2_02, "SMB2_02"},
{PROTOCOL_NT1, "NT1"},
{PROTOCOL_LANMAN2, "LANMAN2"},
{PROTOCOL_LANMAN1, "LANMAN1"},
@@ -5321,7 +5322,7 @@ static FN_GLOBAL_INTEGER(_lp_maxprotocol, maxprotocol)
int lp_maxprotocol(void)
{
int ret = _lp_maxprotocol();
- if ((ret == PROTOCOL_SMB2) && (lp_security() == SEC_SHARE)) {
+ if ((ret >= PROTOCOL_SMB2_02) && (lp_security() == SEC_SHARE)) {
DEBUG(2,("WARNING!!: \"security = share\" is incompatible "
"with the SMB2 protocol. Resetting to SMB1.\n" ));
lp_do_parameter(-1, "max protocol", "NT1");
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index a6d7cc0..f1d2fc2 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -510,7 +510,7 @@ static const struct {
void (*proto_reply_fn)(struct smb_request *req, uint16 choice);
int protocol_level;
} supported_protocols[] = {
- {"SMB 2.002", "SMB2", reply_smb2002, PROTOCOL_SMB2},
+ {"SMB 2.002", "SMB2_02", reply_smb2002, PROTOCOL_SMB2_02},
{"NT LANMAN 1.0", "NT1", reply_nt1, PROTOCOL_NT1},
{"NT LM 0.12", "NT1", reply_nt1, PROTOCOL_NT1},
{"POSIX 2", "NT1", reply_nt1, PROTOCOL_NT1},
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 339d005..d3957fe 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2836,7 +2836,7 @@ void smbd_process(struct smbd_server_connection *sconn)
char *rhost;
int ret;
- if (lp_maxprotocol() == PROTOCOL_SMB2) {
+ if (lp_maxprotocol() >= PROTOCOL_SMB2_02) {
/*
* We're not making the decision here,
* we're just allowing the client
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index f639503..5ae9163 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -113,7 +113,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- set_Protocol(PROTOCOL_SMB2);
+ set_Protocol(PROTOCOL_SMB2_02);
if (get_remote_arch() != RA_SAMBA) {
set_remote_arch(RA_VISTA);
--
Samba Shared Repository
More information about the samba-cvs
mailing list