summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-24 15:24:08 +0200
committerVolker Lendecke <vl@samba.org>2008-06-26 13:13:23 +0200
commitaa02c3fcd580a9e53b87d885fb87fb71f138bb7d (patch)
treeeb7d6746b6948dfe3d2afbed9e5082432a557f3a
parent8a9881c30b97671719f5859d54e7d66b1f08f2ef (diff)
downloadsamba-aa02c3fcd580a9e53b87d885fb87fb71f138bb7d.tar.gz
samba-aa02c3fcd580a9e53b87d885fb87fb71f138bb7d.tar.bz2
samba-aa02c3fcd580a9e53b87d885fb87fb71f138bb7d.zip
Remove p->vuid
The users can use p->server_info. Now pipes_struct is decoupled from the SMB transport. (This used to be commit d4cf5a131919530317cd457006b4df5af2c69fa7)
-rw-r--r--source3/include/ntdomain.h2
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c8
-rw-r--r--source3/rpc_server/srv_lsa_nt.c10
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c6
4 files changed, 6 insertions, 20 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index d582d50c97..1829b19c77 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -213,8 +213,6 @@ typedef struct pipes_struct {
char client_address[INET6_ADDRSTRLEN];
- uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
-
struct auth_serversupplied_info *server_info;
fstring name;
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 78b891e071..377ed505b4 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -256,19 +256,13 @@ bool pipe_access_check(pipes_struct *p)
anonymous > 0 */
if (lp_restrict_anonymous() > 0) {
- user_struct *user = get_valid_user_struct(p->vuid);
/* schannel, so we must be ok */
if (p->pipe_bound && (p->auth.auth_type == PIPE_AUTH_TYPE_SCHANNEL)) {
return True;
}
- if (!user) {
- DEBUG(3, ("invalid vuid %d\n", p->vuid));
- return False;
- }
-
- if (user->server_info->guest) {
+ if (p->server_info->guest) {
return False;
}
}
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 7be139d372..95e10ac28e 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -1463,14 +1463,10 @@ NTSTATUS _lsa_GetUserName(pipes_struct *p,
struct lsa_GetUserName *r)
{
const char *username, *domname;
- user_struct *vuser = get_valid_user_struct(p->vuid);
struct lsa_String *account_name = NULL;
struct lsa_String *authority_name = NULL;
- if (vuser == NULL)
- return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
-
- if (vuser->server_info->guest) {
+ if (p->server_info->guest) {
/*
* I'm 99% sure this is not the right place to do this,
* global_sid_Anonymous should probably be put into the token
@@ -1481,8 +1477,8 @@ NTSTATUS _lsa_GetUserName(pipes_struct *p,
return NT_STATUS_NO_MEMORY;
}
} else {
- username = vuser->server_info->sanitized_username;
- domname = pdb_get_domain(vuser->server_info->sam_account);
+ username = p->server_info->sanitized_username;
+ domname = pdb_get_domain(p->server_info->sam_account);
}
account_name = TALLOC_ZERO_P(p->mem_ctx, struct lsa_String);
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index f2b2919f43..c0b525c06b 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -328,8 +328,6 @@ static void *make_internal_rpc_pipe_p(const char *pipe_name,
memcpy(p->client_address, conn->client_address,
sizeof(p->client_address));
- p->vuid = vuid;
-
p->endian = RPC_LITTLE_ENDIAN;
ZERO_STRUCT(p->pipe_user);
@@ -366,8 +364,8 @@ static void set_incoming_fault(pipes_struct *p)
p->in_data.pdu_needed_len = 0;
p->in_data.pdu_received_len = 0;
p->fault_state = True;
- DEBUG(10,("set_incoming_fault: Setting fault state on pipe %s : vuid = 0x%x\n",
- p->name, p->vuid ));
+ DEBUG(10, ("set_incoming_fault: Setting fault state on pipe %s\n",
+ p->name));
}
/****************************************************************************