summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-04-06 22:54:44 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-04-14 16:23:44 +1000
commit5095d7b1c84e7e37f553867d699a1983f74d4314 (patch)
tree5c15a82c9519554c13f37de5f69da5d608572337 /libcli
parenteed0c4f6c9aac5a260f65c05cc809bf5f72cf210 (diff)
downloadsamba-5095d7b1c84e7e37f553867d699a1983f74d4314.tar.gz
samba-5095d7b1c84e7e37f553867d699a1983f74d4314.tar.bz2
samba-5095d7b1c84e7e37f553867d699a1983f74d4314.zip
Rework Samba4 to use the new common libcli/auth code
In particular, this is the rename from creds_ to netlogon_creds_, as well as other links to use the new common crypto. Andrew Bartlett
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/libcli_auth.h5
-rw-r--r--libcli/auth/smbencrypt.c5
-rw-r--r--libcli/samsync/decrypt.c12
-rw-r--r--libcli/samsync/samsync.h2
4 files changed, 14 insertions, 10 deletions
diff --git a/libcli/auth/libcli_auth.h b/libcli/auth/libcli_auth.h
index f278ee539e..be43007d85 100644
--- a/libcli/auth/libcli_auth.h
+++ b/libcli/auth/libcli_auth.h
@@ -24,4 +24,9 @@
#include "libcli/auth/proto.h"
#include "libcli/auth/msrpc_parse.h"
+#define NTLMSSP_NAME_TYPE_SERVER 0x01
+#define NTLMSSP_NAME_TYPE_DOMAIN 0x02
+#define NTLMSSP_NAME_TYPE_SERVER_DNS 0x03
+#define NTLMSSP_NAME_TYPE_DOMAIN_DNS 0x04
+
#endif /* __LIBCLI_AUTH_H__ */
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index f5a73feadc..7659446b75 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -23,10 +23,9 @@
#include "includes.h"
#include "system/time.h"
-#include "auth/ntlmssp/ntlmssp.h"
-#include "auth/ntlmssp/msrpc_parse.h"
+#include "../libcli/auth/msrpc_parse.h"
#include "../lib/crypto/crypto.h"
-#include "libcli/auth/libcli_auth.h"
+#include "../libcli/auth/libcli_auth.h"
void SMBencrypt_hash(const uint8_t lm_hash[16], const uint8_t *c8, uint8_t p24[24])
{
diff --git a/libcli/samsync/decrypt.c b/libcli/samsync/decrypt.c
index 2181c6ff6b..92479e8618 100644
--- a/libcli/samsync/decrypt.c
+++ b/libcli/samsync/decrypt.c
@@ -35,7 +35,7 @@
*/
static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
- struct creds_CredentialState *creds,
+ struct netlogon_creds_CredentialState *creds,
enum netr_SamDatabaseID database_id,
struct netr_DELTA_ENUM *delta)
{
@@ -75,7 +75,7 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
enum ndr_err_code ndr_err;
data.data = user->user_private_info.SensitiveData;
data.length = user->user_private_info.DataLength;
- creds_arcfour_crypt(creds, data.data, data.length);
+ netlogon_creds_arcfour_crypt(creds, data.data, data.length);
user->user_private_info.SensitiveData = data.data;
user->user_private_info.DataLength = data.length;
@@ -124,15 +124,15 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
* The writes decrypted secrets back into the structure
*/
static NTSTATUS fix_secret(TALLOC_CTX *mem_ctx,
- struct creds_CredentialState *creds,
+ struct netlogon_creds_CredentialState *creds,
enum netr_SamDatabaseID database,
struct netr_DELTA_ENUM *delta)
{
struct netr_DELTA_SECRET *secret = delta->delta_union.secret;
- creds_arcfour_crypt(creds, secret->current_cipher.cipher_data,
+ netlogon_creds_arcfour_crypt(creds, secret->current_cipher.cipher_data,
secret->current_cipher.maxlen);
- creds_arcfour_crypt(creds, secret->old_cipher.cipher_data,
+ netlogon_creds_arcfour_crypt(creds, secret->old_cipher.cipher_data,
secret->old_cipher.maxlen);
return NT_STATUS_OK;
@@ -144,7 +144,7 @@ static NTSTATUS fix_secret(TALLOC_CTX *mem_ctx,
*/
NTSTATUS samsync_fix_delta(TALLOC_CTX *mem_ctx,
- struct creds_CredentialState *creds,
+ struct netlogon_creds_CredentialState *creds,
enum netr_SamDatabaseID database_id,
struct netr_DELTA_ENUM *delta)
{
diff --git a/libcli/samsync/samsync.h b/libcli/samsync/samsync.h
index 19c797816a..dad3427f36 100644
--- a/libcli/samsync/samsync.h
+++ b/libcli/samsync/samsync.h
@@ -21,6 +21,6 @@
*/
NTSTATUS samsync_fix_delta(TALLOC_CTX *mem_ctx,
- struct creds_CredentialState *creds,
+ struct netlogon_creds_CredentialState *creds,
enum netr_SamDatabaseID database_id,
struct netr_DELTA_ENUM *delta);