summaryrefslogtreecommitdiff
path: root/source3/rpcclient
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/rpcclient
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/rpcclient')
-rw-r--r--source3/rpcclient/cmd_netlogon.c2
-rw-r--r--source3/rpcclient/cmd_samr.c2
-rw-r--r--source3/rpcclient/cmd_spoolss.c2
-rw-r--r--source3/rpcclient/rpcclient.c22
4 files changed, 14 insertions, 14 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index 9bd398643f..c518fbb9f5 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -33,7 +33,7 @@ extern int DEBUGLEVEL;
#define DEBUG_TESTING
-extern struct user_credentials *usr_creds;
+extern struct ntuser_creds *usr_creds;
extern FILE* out_hnd;
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 078d7d2cc3..9d15699532 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -33,7 +33,7 @@ extern int DEBUGLEVEL;
#define DEBUG_TESTING
-extern struct user_credentials *usr_creds;
+extern struct ntuser_creds *usr_creds;
extern FILE* out_hnd;
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index ad45cb3dc8..43fa9900d4 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -34,7 +34,7 @@ extern int DEBUGLEVEL;
extern FILE* out_hnd;
-extern struct user_credentials *usr_creds;
+extern struct ntuser_creds *usr_creds;
/****************************************************************************
nt spoolss query
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 30fbd4ee9d..517697a8c5 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -48,7 +48,7 @@ static void cmd_quit(struct client_info *info, int argc, char *argv[]);
static void cmd_set (struct client_info *info, int argc, char *argv[]);
static void cmd_net (struct client_info *info, int argc, char *argv[]);
-static struct user_credentials usr;
+static struct ntuser_creds usr;
static struct client_info cli_info;
@@ -1322,7 +1322,7 @@ static char *complete_cmd_null(char *text, int state)
#endif /* HAVE_LIBREADLINE */
-static void set_user_password(struct user_credentials *u,
+static void set_user_password(struct ntuser_creds *u,
BOOL got_pass, char *password)
{
/* set the password cache info */
@@ -1350,19 +1350,19 @@ static void cmd_net(struct client_info *info, int argc, char *argv[])
BOOL net_use = False;
BOOL net_use_add = True;
BOOL force_close = False;
- struct user_credentials u;
+ struct ntuser_creds u;
fstring dest_host;
fstring srv_name;
BOOL null_pwd = False;
BOOL got_pwd = False;
pstring password;
- extern struct user_credentials *usr_creds;
+ extern struct ntuser_creds *usr_creds;
- copy_user_creds(&u, usr_creds);
+ copy_nt_creds(&u, usr_creds);
pstrcpy(dest_host, cli_info.dest_host);
pstrcpy(u.user_name,optarg);
- u.reuse = False;
+ info->reuse = False;
if (argc <= 1)
{
@@ -1494,7 +1494,7 @@ static void cmd_net(struct client_info *info, int argc, char *argv[])
srv_name, u.user_name, u.domain);
report(out_hnd, "Connection:\t");
- if (cli_net_use_add(srv_name, &u, True) != NULL)
+ if (cli_net_use_add(srv_name, &u, True, info->reuse) != NULL)
{
report(out_hnd, "OK\n");
}
@@ -1561,6 +1561,7 @@ static void cmd_set(struct client_info *info, int argc, char *argv[])
static pstring servicesf = CONFIGFILE;
pstring term_code;
pstring password; /* local copy only, if one is entered */
+ info->reuse = False;
#ifdef KANJI
pstrcpy(term_code, KANJI);
@@ -1568,7 +1569,6 @@ static void cmd_set(struct client_info *info, int argc, char *argv[])
*term_code = 0;
#endif /* KANJI */
- usr.reuse = False;
if (argc > 1 && *argv[1] != '-')
{
@@ -1588,7 +1588,7 @@ static void cmd_set(struct client_info *info, int argc, char *argv[])
{
case 'R':
{
- usr.reuse = True;
+ info->reuse = True;
break;
}
@@ -1793,7 +1793,7 @@ static void cmd_set(struct client_info *info, int argc, char *argv[])
}
}
-static void read_user_env(struct user_credentials *u)
+static void read_user_env(struct ntuser_creds *u)
{
pstring password;
@@ -1860,7 +1860,7 @@ void readline_init(void)
****************************************************************************/
int main(int argc,char *argv[])
{
- extern struct user_credentials *usr_creds;
+ extern struct ntuser_creds *usr_creds;
mode_t myumask = 0755;
DEBUGLEVEL = 2;