1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

r1590: Small fixes from Günther Deschner

This commit is contained in:
Volker Lendecke
2004-07-26 10:08:03 +00:00
committed by Gerald (Jerry) Carter
parent 269f075087
commit 2d68fdf06b

View File

@ -266,10 +266,10 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
username = argv[1];
password = argv[2];
if (argc == 4)
if (argc >= 4)
sscanf(argv[3], "%i", &logon_type);
if (argc == 5)
if (argc >= 5)
sscanf(argv[4], "%i", &neg_flags);
if (argc == 6)
@ -283,10 +283,6 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &ret_creds);
result = cli_netlogon_sam_logon(cli, mem_ctx, &ret_creds, username, password, logon_type);
clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &ret_creds);
if (!NT_STATUS_IS_OK(result))
goto done;
@ -339,7 +335,7 @@ struct cmd_set netlogon_commands[] = {
{ "samsync", RPC_RTYPE_NTSTATUS, cmd_netlogon_sam_sync, NULL, PI_NETLOGON, "Sam Synchronisation", "" },
{ "samdeltas", RPC_RTYPE_NTSTATUS, cmd_netlogon_sam_deltas, NULL, PI_NETLOGON, "Query Sam Deltas", "" },
{ "samlogon", RPC_RTYPE_NTSTATUS, cmd_netlogon_sam_logon, NULL, PI_NETLOGON, "Sam Logon", "" },
{ "samlogon", RPC_RTYPE_NTSTATUS, cmd_netlogon_change_trust_pw, NULL, PI_NETLOGON, "Change Trust Account Password", "" },
{ "change_trust_pw", RPC_RTYPE_NTSTATUS, cmd_netlogon_change_trust_pw, NULL, PI_NETLOGON, "Change Trust Account Password", "" },
{ NULL }
};