summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_creds.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-07 06:20:46 +0000
committerGerald Carter <jerry@samba.org>2000-07-07 06:20:46 +0000
commitd2b40a7de259377d937492acedd39988ddd108a4 (patch)
treef0849ba6679575e80500b43b8989b3dddf16e2a4 /source3/rpc_parse/parse_creds.c
parent9de93aa8188293671a92e84b2b9dc104cc7eb64c (diff)
downloadsamba-d2b40a7de259377d937492acedd39988ddd108a4.tar.gz
samba-d2b40a7de259377d937492acedd39988ddd108a4.tar.bz2
samba-d2b40a7de259377d937492acedd39988ddd108a4.zip
More rpcclient merge issues:
* fixes some readline bugs from the merge * first attempt at commands (spoolenum almost works) * no changes to existing functions in HEAD; only additions of new functions. I'll weed out what I can as I go. --jerry (This used to be commit 61d2aad5dc2b212b11c981f1eca47efa627e9fc8)
Diffstat (limited to 'source3/rpc_parse/parse_creds.c')
-rw-r--r--source3/rpc_parse/parse_creds.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_creds.c b/source3/rpc_parse/parse_creds.c
index 46fdc5b78f..672b9f28e0 100644
--- a/source3/rpc_parse/parse_creds.c
+++ b/source3/rpc_parse/parse_creds.c
@@ -425,6 +425,30 @@ void copy_unix_sec_creds(CREDS_UNIX_SEC *to, const CREDS_UNIX_SEC *from)
}
};
+void create_ntc_from_cli_state (CREDS_NT *to, const struct cli_state *cli_from)
+{
+ /*
+ * NULL credentials --
+ * if this gets executed, it is a programming error.
+ * fall through to copy_nt_creds()
+ */
+ if (cli_from == NULL)
+ {
+ copy_nt_creds (to, cli_from);
+ return;
+ }
+
+ safe_strcpy(to->domain , cli_from->domain , sizeof(cli_from->domain )-1);
+ safe_strcpy(to->user_name, cli_from->user_name, sizeof(cli_from->user_name)-1);
+ memcpy(&to->pwd, &cli_from->pwd, sizeof(cli_from->pwd));
+ to->ntlmssp_flags = cli_from->ntlmssp_flags;
+ DEBUG(10,("create_ntc_fromcli_state: user %s domain %s flgs: %x\n",
+ to->user_name, to->domain,
+ to->ntlmssp_flags));
+
+};
+
+
void copy_nt_creds(struct ntuser_creds *to,
const struct ntuser_creds *from)
{