summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-02 00:31:54 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-02 00:31:54 +0000
commit06ae42483582ee76c3f6848697cf61cc142dd86a (patch)
tree959408cf7ba1e90e05a4e30278e71445ebc5cf32 /source4/libcli
parent8b30b0071cb7668f49b2ea5951d1180bf90371e3 (diff)
downloadsamba-06ae42483582ee76c3f6848697cf61cc142dd86a.tar.gz
samba-06ae42483582ee76c3f6848697cf61cc142dd86a.tar.bz2
samba-06ae42483582ee76c3f6848697cf61cc142dd86a.zip
* netr_ServerPasswordSet() now works - the test suite changes the
machine account password. * neater handling on value() options in IDL. The auto-print code will now display the right value so you don't need to initialise it in your C code (This used to be commit 3dd978b12bb5571fba4e1839c0f7ee60cf729aa2)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/credentials.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/libcli/auth/credentials.c b/source4/libcli/auth/credentials.c
index 80ea2e9583..1749037e8f 100644
--- a/source4/libcli/auth/credentials.c
+++ b/source4/libcli/auth/credentials.c
@@ -109,3 +109,14 @@ void creds_authenticator(struct netr_CredentialState *creds,
next->cred = creds->cred2;
next->timestamp = creds->sequence;
}
+
+
+/*
+ encrypt a 16 byte password buffer using the session key
+*/
+void creds_encrypt(struct netr_CredentialState *creds, struct netr_Password *pass)
+{
+ struct netr_Password tmp;
+ cred_hash3(tmp.data, pass->data, creds->session_key, 1);
+ *pass = tmp;
+}