summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_use.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-12-08 21:43:03 +0000
committerLuke Leighton <lkcl@samba.org>1999-12-08 21:43:03 +0000
commit4ab9d91428b66bd2fe407b0dba94f4130160b576 (patch)
tree2733683a3097225f44e459d2fe73e1ac880b7aba /source3/rpc_client/cli_use.c
parenta0ba234cf9b40adf6b5390e4e67730163a42883f (diff)
downloadsamba-4ab9d91428b66bd2fe407b0dba94f4130160b576.tar.gz
samba-4ab9d91428b66bd2fe407b0dba94f4130160b576.tar.bz2
samba-4ab9d91428b66bd2fe407b0dba94f4130160b576.zip
ABOUT TIME!!!!!!!!
damn, this one is bad. started, at least two days ago, to add an authentication mechanism to the smbd<->msrpc redirector/relay, such that sufficient unix / nt information could be transferred across the unix socket to do a become_user() on the other side of the socket. it is necessary that the msrpc daemon inherit the same unix and nt credentials as the smbd process from which it was spawned, until such time as the msrpc daemon receives an authentication request of its own, whereupon the msrpc daemon is responsible for authenticating the new credentials and doing yet another become_user() etc sequence. (This used to be commit 30c7fdd6ef10ecd35594311c1b250b95ff895489)
Diffstat (limited to 'source3/rpc_client/cli_use.c')
-rw-r--r--source3/rpc_client/cli_use.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c
index 93a85d748d..96122c307d 100644
--- a/source3/rpc_client/cli_use.c
+++ b/source3/rpc_client/cli_use.c
@@ -110,13 +110,14 @@ find client state. server name, user name, domain name and password must all
match.
****************************************************************************/
static struct cli_use *cli_find(const char* srv_name,
- const struct user_credentials *usr_creds)
+ const struct ntuser_creds *usr_creds,
+ BOOL reuse)
{
int i;
const char *sv_name = srv_name;
- struct user_credentials null_usr;
+ struct ntuser_creds null_usr;
- copy_user_creds(&null_usr, usr_creds);
+ copy_nt_creds(&null_usr, usr_creds);
usr_creds = &null_usr;
if (strnequal("\\\\", sv_name, 2))
@@ -156,7 +157,7 @@ static struct cli_use *cli_find(const char* srv_name,
{
continue;
}
- if (!usr_creds->reuse &&
+ if (!reuse &&
!pwd_compare(&usr_creds->pwd, &c->cli->usr.pwd))
{
DEBUG(100,("password doesn't match\n"));
@@ -179,7 +180,7 @@ static struct cli_use *cli_find(const char* srv_name,
create a new client state from user credentials
****************************************************************************/
static struct cli_use *cli_use_get(const char* srv_name,
- const struct user_credentials *usr_creds)
+ const struct ntuser_creds *usr_creds)
{
struct cli_use *cli = (struct cli_use*)malloc(sizeof(*cli));
@@ -206,8 +207,9 @@ static struct cli_use *cli_use_get(const char* srv_name,
init client state
****************************************************************************/
struct cli_state *cli_net_use_add(const char* srv_name,
- const struct user_credentials *usr_creds,
- BOOL redir)
+ const struct ntuser_creds *usr_creds,
+ BOOL redir,
+ BOOL reuse)
{
struct nmb_name calling;
struct nmb_name called;
@@ -215,7 +217,7 @@ struct cli_state *cli_net_use_add(const char* srv_name,
fstring dest_host;
struct in_addr ip;
- struct cli_use *cli = cli_find(srv_name, usr_creds);
+ struct cli_use *cli = cli_find(srv_name, usr_creds, reuse);
if (cli != NULL)
{
@@ -224,7 +226,7 @@ struct cli_state *cli_net_use_add(const char* srv_name,
}
/* reuse an existing connection requested, and one was not found */
- if (usr_creds != NULL && usr_creds->reuse && !redir)
+ if (usr_creds != NULL && reuse && !redir)
{
return False;
}
@@ -277,7 +279,7 @@ struct cli_state *cli_net_use_add(const char* srv_name,
delete a client state
****************************************************************************/
BOOL cli_net_use_del(const char* srv_name,
- const struct user_credentials *usr_creds,
+ const struct ntuser_creds *usr_creds,
BOOL force_close,
BOOL *connection_closed)
{