Remove p->vuid
authorVolker Lendecke <vl@samba.org>
Tue, 24 Jun 2008 13:24:08 +0000 (15:24 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 26 Jun 2008 11:13:23 +0000 (13:13 +0200)
The users can use p->server_info.

Now pipes_struct is decoupled from the SMB transport.
(This used to be commit d4cf5a131919530317cd457006b4df5af2c69fa7)

source3/include/ntdomain.h
source3/rpc_server/srv_lsa_hnd.c
source3/rpc_server/srv_lsa_nt.c
source3/rpc_server/srv_pipe_hnd.c

index d582d50c97c71160167c67fff784c9eb253ef3ad..1829b19c772dff3cfc3581a05c3ac5ef3f5ee58e 100644 (file)
@@ -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;
index 78b891e071e55d6ee9433172e10d64c132963e79..377ed505b4e2448380c6027cdffb5ffc12342b40 100644 (file)
@@ -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;
                }
        }
index 7be139d3727d79ffc5c481ed99fd23527ba4f559..95e10ac28e298eca91d590400e65fb6f8b216b7a 100644 (file)
@@ -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);
index f2b2919f43fdafae006759414bc64b338c37421c..c0b525c06bf0a3ccb15852582e2e7e631f623192 100644 (file)
@@ -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));
 }
 
 /****************************************************************************