more access fixes for group enumeration in LDAP; bug 281
[jra/samba/.git] / source3 / rpc_server / srv_pipe_hnd.c
index 9297278764d7bd3e9b626efdef109193ac4030ab..a9fd9ec652f90640cc9fdcf3d7645d49e522b5f2 100644 (file)
@@ -342,7 +342,7 @@ static void *make_internal_rpc_pipe_p(char *pipe_name,
        
        /* Store the session key and NT_TOKEN */
        if (vuser) {
-               memcpy(p->session_key, vuser->session_key, sizeof(p->session_key));
+               p->session_key = data_blob(vuser->session_key.data, vuser->session_key.length);
                p->pipe_user.nt_user_token = dup_nt_token(vuser->nt_user_token);
        }
 
@@ -541,7 +541,7 @@ static ssize_t unmarshall_rpc_header(pipes_struct *p)
 void free_pipe_context(pipes_struct *p)
 {
        if (p->mem_ctx) {
-               DEBUG(3,("free_pipe_context: destroying talloc pool of size %lu\n", talloc_pool_size((unsigned long)p->mem_ctx) ));
+               DEBUG(3,("free_pipe_context: destroying talloc pool of size %lu\n", (unsigned long)talloc_pool_size(p->mem_ctx) ));
                talloc_destroy_pool(p->mem_ctx);
        } else {
                p->mem_ctx = talloc_init("pipe %s %p", p->name, p);