diff options
author | Luke Leighton <lkcl@samba.org> | 1999-12-08 21:43:03 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-12-08 21:43:03 +0000 |
commit | 30c7fdd6ef10ecd35594311c1b250b95ff895489 (patch) | |
tree | 0eef964462f04360126253f57fa326923c1882ef /source/rpcclient | |
parent | 2245b0c6d13c7c5886e81f9137b05df883598c26 (diff) | |
download | samba-30c7fdd6ef10ecd35594311c1b250b95ff895489.tar.gz samba-30c7fdd6ef10ecd35594311c1b250b95ff895489.tar.xz samba-30c7fdd6ef10ecd35594311c1b250b95ff895489.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.
Diffstat (limited to 'source/rpcclient')
-rw-r--r-- | source/rpcclient/cmd_netlogon.c | 2 | ||||
-rw-r--r-- | source/rpcclient/cmd_samr.c | 2 | ||||
-rw-r--r-- | source/rpcclient/cmd_spoolss.c | 2 | ||||
-rw-r--r-- | source/rpcclient/rpcclient.c | 22 |
4 files changed, 14 insertions, 14 deletions
diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c index 9bd398643f1..c518fbb9f5f 100644 --- a/source/rpcclient/cmd_netlogon.c +++ b/source/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/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c index 078d7d2cc3c..9d15699532d 100644 --- a/source/rpcclient/cmd_samr.c +++ b/source/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/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index ad45cb3dc86..43fa9900d40 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/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/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 30fbd4ee9d2..517697a8c5b 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/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; |