1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-12 23:33:18 +03:00

Add GenericInfo level for SamLogon calls from the WSPP IDL.

Andrew Bartlett
(This used to be commit ea58b650a8)
This commit is contained in:
Andrew Bartlett
2008-08-12 17:46:01 +10:00
parent dd5cdf3c99
commit b5a3f45f64
2 changed files with 46 additions and 19 deletions

View File

@@ -123,12 +123,31 @@ interface netlogon
netr_ChallengeResponse lm; netr_ChallengeResponse lm;
} netr_NetworkInfo; } netr_NetworkInfo;
typedef [public,switch_type(uint16)] union { typedef [flag(NDR_PAHEX)] struct {
[case(1)] netr_PasswordInfo *password; netr_IdentityInfo identity_info;
[case(2)] netr_NetworkInfo *network; lsa_String package_name;
[case(3)] netr_PasswordInfo *password; uint32 length;
[case(5)] netr_PasswordInfo *password; [size_is(length),length_is(length)] uint8 *data;
[case(6)] netr_NetworkInfo *network; } netr_GenericInfo;
typedef enum {
NetlogonInteractiveInformation = 1,
NetlogonNetworkInformation = 2,
NetlogonServiceInformation = 3,
NetlogonGenericInformation = 4,
NetlogonInteractiveTransitiveInformation = 5,
NetlogonNetworkTransitiveInformation = 6,
NetlogonServiceTransitiveInformation = 7
} netr_LogonInfoClass;
typedef [public,switch_type(netr_LogonInfoClass)] union {
[case(NetlogonInteractiveInformation)] netr_PasswordInfo *password;
[case(NetlogonNetworkInformation)] netr_NetworkInfo *network;
[case(NetlogonServiceInformation)] netr_PasswordInfo *password;
[case(NetlogonGenericInformation)] netr_GenericInfo *generic;
[case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
[case(NetlogonNetworkTransitiveInformation)] netr_NetworkInfo *network;
[case(NetlogonServiceTransitiveInformation)] netr_PasswordInfo *password;
} netr_LogonLevel; } netr_LogonLevel;
typedef [public,flag(NDR_PAHEX)] struct { typedef [public,flag(NDR_PAHEX)] struct {
@@ -239,15 +258,15 @@ interface netlogon
} netr_Authenticator; } netr_Authenticator;
NTSTATUS netr_LogonSamLogon( NTSTATUS netr_LogonSamLogon(
[in,unique] [string,charset(UTF16)] uint16 *server_name, [in,unique] [string,charset(UTF16)] uint16 *server_name,
[in,unique] [string,charset(UTF16)] uint16 *computer_name, [in,unique] [string,charset(UTF16)] uint16 *computer_name,
[in,unique] netr_Authenticator *credential, [in,unique] netr_Authenticator *credential,
[in,out,unique] netr_Authenticator *return_authenticator, [in,out,unique] netr_Authenticator *return_authenticator,
[in] uint16 logon_level, [in] netr_LogonInfoClass logon_level,
[in] [switch_is(logon_level)] netr_LogonLevel logon, [in] [switch_is(logon_level)] netr_LogonLevel logon,
[in] uint16 validation_level, [in] uint16 validation_level,
[out] [switch_is(validation_level)] netr_Validation validation, [out] [switch_is(validation_level)] netr_Validation validation,
[out] uint8 authoritative [out] uint8 authoritative
); );

View File

@@ -421,9 +421,10 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
user_info->remote_host = NULL; user_info->remote_host = NULL;
switch (r->in.logon_level) { switch (r->in.logon_level) {
case 1: case NetlogonInteractiveInformation:
case 3: case NetlogonServiceInformation:
case 5: case NetlogonInteractiveTransitiveInformation:
case NetlogonServiceTransitiveInformation:
if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) { if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
creds_arcfour_crypt(creds, creds_arcfour_crypt(creds,
r->in.logon.password->lmpassword.hash, r->in.logon.password->lmpassword.hash,
@@ -460,8 +461,8 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
*user_info->password.hash.nt = r->in.logon.password->ntpassword; *user_info->password.hash.nt = r->in.logon.password->ntpassword;
break; break;
case 2: case NetlogonNetworkInformation:
case 6: case NetlogonNetworkTransitiveInformation:
/* TODO: we need to deny anonymous access here */ /* TODO: we need to deny anonymous access here */
nt_status = auth_context_create(mem_ctx, nt_status = auth_context_create(mem_ctx,
@@ -483,6 +484,13 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
user_info->password.response.nt = data_blob_talloc(mem_ctx, r->in.logon.network->nt.data, r->in.logon.network->nt.length); user_info->password.response.nt = data_blob_talloc(mem_ctx, r->in.logon.network->nt.data, r->in.logon.network->nt.length);
break; break;
case NetlogonGenericInformation:
{
/* Until we get enough information for an implemetnation */
return NT_STATUS_INVALID_PARAMETER;
}
default: default:
return NT_STATUS_INVALID_PARAMETER; return NT_STATUS_INVALID_PARAMETER;
} }