diff options
author | Luke Leighton <lkcl@samba.org> | 2000-01-21 02:33:21 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-01-21 02:33:21 +0000 |
commit | d91bfabc5df7226cc1b0da231e18fd16c8807a25 (patch) | |
tree | 89f60e66ddc179fe3ead12f4c05fac6854cbf4fb /source3/lib | |
parent | d85e6f2c9a5ca97f47b3c6b7b86f4ca07a8133c2 (diff) | |
download | samba-d91bfabc5df7226cc1b0da231e18fd16c8807a25.tar.gz samba-d91bfabc5df7226cc1b0da231e18fd16c8807a25.tar.bz2 samba-d91bfabc5df7226cc1b0da231e18fd16c8807a25.zip |
made cvs main up-to-date with samba_tng, with addition of process id to
msrpc loop-back interface.
(This used to be commit adbf97c0a93149e17496b002ecc8ecdb3f360ed5)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/msrpc-client.c | 9 | ||||
-rw-r--r-- | source3/lib/msrpc_use.c | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/source3/lib/msrpc-client.c b/source3/lib/msrpc-client.c index 051a051093..60924ed81c 100644 --- a/source3/lib/msrpc-client.c +++ b/source3/lib/msrpc-client.c @@ -195,7 +195,8 @@ static BOOL msrpc_authenticate(struct msrpc_state *msrpc, command = usr != NULL ? AGENT_CMD_CON : AGENT_CMD_CON_ANON; - if (!create_user_creds(&ps, msrpc->pipe_name, 0x0, command, usr)) + if (!create_user_creds(&ps, msrpc->pipe_name, 0x0, command, + msrpc->pid, usr)) { DEBUG(0,("could not parse credentials\n")); close(sock); @@ -274,11 +275,12 @@ static BOOL msrpc_init_redirect(struct msrpc_state *msrpc, } BOOL msrpc_connect_auth(struct msrpc_state *msrpc, + uint32 pid, const char* pipename, const struct user_creds *usr) { ZERO_STRUCTP(msrpc); - if (!msrpc_initialise(msrpc)) + if (!msrpc_initialise(msrpc, pid)) { DEBUG(0,("unable to initialise msrpcent connection.\n")); return False; @@ -298,7 +300,7 @@ BOOL msrpc_connect_auth(struct msrpc_state *msrpc, /**************************************************************************** initialise a msrpcent structure ****************************************************************************/ -struct msrpc_state *msrpc_initialise(struct msrpc_state *msrpc) +struct msrpc_state *msrpc_initialise(struct msrpc_state *msrpc, uint32 pid) { if (!msrpc) { msrpc = (struct msrpc_state *)malloc(sizeof(*msrpc)); @@ -323,6 +325,7 @@ struct msrpc_state *msrpc_initialise(struct msrpc_state *msrpc) msrpc->initialised = 1; msrpc_init_creds(msrpc, NULL); + msrpc->pid = pid; return msrpc; } diff --git a/source3/lib/msrpc_use.c b/source3/lib/msrpc_use.c index 13bf7eb5f7..1d0df1872f 100644 --- a/source3/lib/msrpc_use.c +++ b/source3/lib/msrpc_use.c @@ -121,8 +121,8 @@ static struct msrpc_use *msrpc_find(const char* pipe_name, DEBUG(10,("msrpc_find: %s %s %s\n", pipe_name, - usr_creds->ntc.user_name, - usr_creds->ntc.domain)); + usr_creds != NULL ? usr_creds->ntc.user_name : "null", + usr_creds != NULL ? usr_creds->ntc.domain : "null")); for (i = 0; i < num_msrpcs; i++) { @@ -169,6 +169,7 @@ static struct msrpc_use *msrpc_find(const char* pipe_name, create a new client state from user credentials ****************************************************************************/ static struct msrpc_use *msrpc_use_get(const char* pipe_name, + uint32 pid, const struct user_creds *usr_creds) { struct msrpc_use *cli = (struct msrpc_use*)malloc(sizeof(*cli)); @@ -180,7 +181,7 @@ static struct msrpc_use *msrpc_use_get(const char* pipe_name, memset(cli, 0, sizeof(*cli)); - cli->cli = msrpc_initialise(NULL); + cli->cli = msrpc_initialise(NULL, pid); if (cli->cli == NULL) { @@ -196,6 +197,7 @@ static struct msrpc_use *msrpc_use_get(const char* pipe_name, init client state ****************************************************************************/ struct msrpc_state *msrpc_use_add(const char* pipe_name, + uint32 pid, const struct user_creds *usr_creds, BOOL redir) { @@ -221,7 +223,7 @@ struct msrpc_state *msrpc_use_add(const char* pipe_name, * allocate */ - cli = msrpc_use_get(pipe_name, usr_creds); + cli = msrpc_use_get(pipe_name, pid, usr_creds); cli->cli->redirect = redir; if (!msrpc_establish_connection(cli->cli, pipe_name)) |