diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-20 13:26:31 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-20 13:26:31 +0000 |
commit | 32101155d4a0c80faf392f56a6baa7b91847dd99 (patch) | |
tree | f5aea9ed9913002f0a0932f7b7e7e8e0dda25684 /source3/rpc_server/srv_pipe_hnd.c | |
parent | 3871e970b58b917381f9bd68a7cee2c5c64332a9 (diff) | |
download | samba-32101155d4a0c80faf392f56a6baa7b91847dd99.tar.gz samba-32101155d4a0c80faf392f56a6baa7b91847dd99.tar.xz samba-32101155d4a0c80faf392f56a6baa7b91847dd99.zip |
Kill off another ugly wart from the side of the passdb subsystem.
This time its the pdb_getsampwuid() function - which was only being used by the
SAMR rpc subsystem to gain a 'user session key'. This 'user session key' is
actually generated at login time, and the other changes here simply move that
data around.
This also means that (when I check some details) we will be able to use the
user session key, even when we are not actually the DC, becouse its one of the
components of the info3 struct returned on logon.
Andrew Bartlett
(This used to be commit 799ac01fe08a338e4e94289f5d6767ebf905c1fa)
Diffstat (limited to 'source3/rpc_server/srv_pipe_hnd.c')
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index a98bcdc6bbe..1b3d66bf497 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -252,9 +252,15 @@ static void *make_internal_rpc_pipe_p(char *pipe_name, connection_struct *conn, uint16 vuid) { pipes_struct *p; + user_struct *vuser = get_valid_user_struct(vuid); DEBUG(4,("Create pipe requested %s\n", pipe_name)); + if (!vuser && vuid != UID_FIELD_INVALID) { + DEBUG(0,("ERROR! vuid %d did not map to a valid vuser struct!\n", vuid)); + return NULL; + } + p = (pipes_struct *)malloc(sizeof(*p)); if (!p) @@ -308,6 +314,11 @@ static void *make_internal_rpc_pipe_p(char *pipe_name, p->pipe_user.uid = (uid_t)-1; p->pipe_user.gid = (gid_t)-1; + /* Store the session key */ + if (vuser) { + memcpy(p->session_key, vuser->session_key, sizeof(p->session_key)); + } + /* * Initialize the incoming RPC struct. */ |