diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-16 21:27:58 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-14 16:23:35 +1000 |
commit | f28f113d8e76824b080359c90efd9c92de533740 (patch) | |
tree | 063c8cf44e1a26adce9128f3e24ee55274292090 /source3/rpc_server | |
parent | fd3be5c4e5e185115eec59752a22f7f354f860ca (diff) | |
download | samba-f28f113d8e76824b080359c90efd9c92de533740.tar.gz samba-f28f113d8e76824b080359c90efd9c92de533740.tar.bz2 samba-f28f113d8e76824b080359c90efd9c92de533740.zip |
Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).
We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server
Andrew Bartlett
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 1 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 19 | ||||
-rw-r--r-- | source3/rpc_server/srv_wkssvc_nt.c | 1 |
3 files changed, 12 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 0c83144a90..c5e2ca7c71 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -25,6 +25,7 @@ /* This is the implementation of the netlogon pipe. */ #include "includes.h" +#include "../libcli/auth/libcli_auth.h" extern userdom_struct current_user_info; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 7881ca62ea..187c721dfb 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -32,6 +32,7 @@ */ #include "includes.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV @@ -3822,7 +3823,7 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx, struct samu *pwd) { char *plaintext_buf = NULL; - uint32 len = 0; + size_t len = 0; uint32_t acct_ctrl; NTSTATUS status; @@ -3849,7 +3850,7 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx, id23->password.data, &plaintext_buf, &len, - STR_UNICODE)) { + CH_UTF16)) { return NT_STATUS_WRONG_PASSWORD; } @@ -3911,7 +3912,7 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx, static bool set_user_info_pw(uint8 *pass, struct samu *pwd) { - uint32 len = 0; + size_t len = 0; char *plaintext_buf = NULL; uint32 acct_ctrl; @@ -3924,7 +3925,7 @@ static bool set_user_info_pw(uint8 *pass, struct samu *pwd) pass, &plaintext_buf, &len, - STR_UNICODE)) { + CH_UTF16)) { return False; } @@ -4223,8 +4224,8 @@ NTSTATUS _samr_SetUserInfo(pipes_struct *p, if (!p->server_info->user_session_key.length) { status = NT_STATUS_NO_USER_SESSION_KEY; } - SamOEMhashBlob(info->info23.password.data, 516, - &p->server_info->user_session_key); + arcfour_crypt_blob(info->info23.password.data, 516, + &p->server_info->user_session_key); dump_data(100, info->info23.password.data, 516); @@ -4236,9 +4237,9 @@ NTSTATUS _samr_SetUserInfo(pipes_struct *p, if (!p->server_info->user_session_key.length) { status = NT_STATUS_NO_USER_SESSION_KEY; } - SamOEMhashBlob(info->info24.password.data, - 516, - &p->server_info->user_session_key); + arcfour_crypt_blob(info->info24.password.data, + 516, + &p->server_info->user_session_key); dump_data(100, info->info24.password.data, 516); diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c index 7071b55e7c..8d2e73b5a5 100644 --- a/source3/rpc_server/srv_wkssvc_nt.c +++ b/source3/rpc_server/srv_wkssvc_nt.c @@ -24,6 +24,7 @@ #include "includes.h" #include "libnet/libnet.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV |