diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-07-14 12:44:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:57:36 -0500 |
commit | 5779a7da9aecb7329eb47e93000dc8b9de96d9ae (patch) | |
tree | fbd35fe57d724e4219adf61f86ffe68a0a9657bf /source4/smb_server/service.c | |
parent | f607197054436a8195e3d0a695fe31574b418059 (diff) | |
download | samba-5779a7da9aecb7329eb47e93000dc8b9de96d9ae.tar.gz samba-5779a7da9aecb7329eb47e93000dc8b9de96d9ae.tar.bz2 samba-5779a7da9aecb7329eb47e93000dc8b9de96d9ae.zip |
r1499: combine struct user_struct and struct smbsrv_user
to a struct smbsrv_session that the same as cli_session for the client
we need a gensec_security pointer there
(spnego support will follow)
prefix some related functions with smbsrv_
metze
(This used to be commit f276378157bb9994c4c91ce46150a510de5c33f8)
Diffstat (limited to 'source4/smb_server/service.c')
-rw-r--r-- | source4/smb_server/service.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c index 0a06e2edfa..9eb28ff079 100644 --- a/source4/smb_server/service.c +++ b/source4/smb_server/service.c @@ -277,17 +277,22 @@ void close_cnum(struct smbsrv_tcon *tcon) NTSTATUS tcon_backend(struct smbsrv_request *req, union smb_tcon *con) { NTSTATUS status; + uint16_t vuid = UID_FIELD_INVALID; /* can only do bare tcon in share level security */ - if (req->user_ctx == NULL && lp_security() != SEC_SHARE) { + if (req->session == NULL && lp_security() != SEC_SHARE) { return NT_STATUS_ACCESS_DENIED; } + if (req->session) { + vuid = req->session->vuid; + } + if (con->generic.level == RAW_TCON_TCON) { DATA_BLOB password; password = data_blob(con->tcon.in.password, strlen(con->tcon.in.password) + 1); - status = make_connection(req, con->tcon.in.service, password, con->tcon.in.dev, req->user_ctx->vuid); + status = make_connection(req, con->tcon.in.service, password, con->tcon.in.dev, vuid); if (!NT_STATUS_IS_OK(status)) { return status; @@ -300,7 +305,7 @@ NTSTATUS tcon_backend(struct smbsrv_request *req, union smb_tcon *con) } status = make_connection(req, con->tconx.in.path, con->tconx.in.password, - con->tconx.in.device, req->user_ctx->vuid); + con->tconx.in.device, vuid); if (!NT_STATUS_IS_OK(status)) { return status; } |