mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
Allow the logon level to be passed to cli_netlogon_sam_logon() rather than
the validation level. (This used to be commit c79e94ea27aab31423b1bdc34e9cff25688dbe5f)
This commit is contained in:
parent
f441ccd484
commit
35e44b3a83
@ -266,14 +266,14 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
|
|||||||
{
|
{
|
||||||
unsigned char trust_passwd[16];
|
unsigned char trust_passwd[16];
|
||||||
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||||
int validation_level = 3;
|
int logon_type = NET_LOGON_TYPE;
|
||||||
char *username, *password;
|
char *username, *password;
|
||||||
|
|
||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
|
|
||||||
if (argc < 3 || argc > 4) {
|
if (argc < 3 || argc > 4) {
|
||||||
fprintf(stderr, "Usage: samlogon <username> <password> "
|
fprintf(stderr, "Usage: samlogon <username> <password> "
|
||||||
"[validation level]\n");
|
"[logon_type]\n");
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
|
|||||||
password = argv[2];
|
password = argv[2];
|
||||||
|
|
||||||
if (argc == 4)
|
if (argc == 4)
|
||||||
sscanf(argv[3], "%i", &validation_level);
|
sscanf(argv[3], "%i", &logon_type);
|
||||||
|
|
||||||
/* Authenticate ourselves with the domain controller */
|
/* Authenticate ourselves with the domain controller */
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
|
|||||||
/* Perform the sam logon */
|
/* Perform the sam logon */
|
||||||
|
|
||||||
result = cli_netlogon_sam_logon(cli, mem_ctx, username, password,
|
result = cli_netlogon_sam_logon(cli, mem_ctx, username, password,
|
||||||
validation_level);
|
logon_type);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result))
|
if (!NT_STATUS_IS_OK(result))
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user