mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
Renamed get_nt_error_msg() to nt_errstr().
This commit is contained in:
parent
7ba235c0fb
commit
1f007d3ed4
@ -218,7 +218,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
|
|||||||
auth_method->name, user_info->smb_name.str));
|
auth_method->name, user_info->smb_name.str));
|
||||||
} else {
|
} else {
|
||||||
DEBUG(5, ("check_password: %s authentication for user [%s] FAILED with error %s\n",
|
DEBUG(5, ("check_password: %s authentication for user [%s] FAILED with error %s\n",
|
||||||
auth_method->name, user_info->smb_name.str, get_nt_error_msg(nt_status)));
|
auth_method->name, user_info->smb_name.str, nt_errstr(nt_status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
talloc_destroy(mem_ctx);
|
talloc_destroy(mem_ctx);
|
||||||
@ -248,7 +248,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
|
|||||||
pdb_username));
|
pdb_username));
|
||||||
} else {
|
} else {
|
||||||
DEBUG(3, ("check_password: PAM Account for user [%s] FAILED with error %s\n",
|
DEBUG(3, ("check_password: PAM Account for user [%s] FAILED with error %s\n",
|
||||||
pdb_username, get_nt_error_msg(nt_status)));
|
pdb_username, nt_errstr(nt_status)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
|
|||||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||||
DEBUG(2, ("check_password: Authenticaion for user [%s] -> [%s] FAILED with error %s\n",
|
DEBUG(2, ("check_password: Authenticaion for user [%s] -> [%s] FAILED with error %s\n",
|
||||||
user_info->smb_name.str, user_info->internal_username.str,
|
user_info->smb_name.str, user_info->internal_username.str,
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
ZERO_STRUCTP(server_info);
|
ZERO_STRUCTP(server_info);
|
||||||
}
|
}
|
||||||
return nt_status;
|
return nt_status;
|
||||||
|
@ -134,7 +134,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli)));
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \
|
DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \
|
||||||
%s. Error was : %s.\n", remote_machine, get_nt_error_msg(result)));
|
%s. Error was : %s.\n", remote_machine, nt_errstr(result)));
|
||||||
cli_nt_session_close(*cli);
|
cli_nt_session_close(*cli);
|
||||||
cli_ulogoff(*cli);
|
cli_ulogoff(*cli);
|
||||||
cli_shutdown(*cli);
|
cli_shutdown(*cli);
|
||||||
@ -319,7 +319,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
|
|||||||
"for user %s in domain %s to Domain controller %s. "
|
"for user %s in domain %s to Domain controller %s. "
|
||||||
"Error was %s.\n", user_info->smb_name.str,
|
"Error was %s.\n", user_info->smb_name.str,
|
||||||
user_info->domain.str, cli->srv_name_slash,
|
user_info->domain.str, cli->srv_name_slash,
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
} else {
|
} else {
|
||||||
char *dom_user;
|
char *dom_user;
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token,
|
|||||||
tmp_acc_desired = check_ace( ace, token, tmp_acc_desired, status);
|
tmp_acc_desired = check_ace( ace, token, tmp_acc_desired, status);
|
||||||
if (NT_STATUS_V(*status)) {
|
if (NT_STATUS_V(*status)) {
|
||||||
*acc_granted = 0;
|
*acc_granted = 0;
|
||||||
DEBUG(5,("se_access_check: ACE %u denied with status %s.\n", (unsigned int)i, get_nt_error_msg(*status)));
|
DEBUG(5,("se_access_check: ACE %u denied with status %s.\n", (unsigned int)i, nt_errstr(*status)));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1131,14 +1131,14 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
|
|||||||
result = cli_lsa_open_policy(&cli, cli.mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, &lsa_pol);
|
result = cli_lsa_open_policy(&cli, cli.mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, &lsa_pol);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0, ("fetch_domain_sid: Error opening lsa policy handle. %s\n",
|
DEBUG(0, ("fetch_domain_sid: Error opening lsa policy handle. %s\n",
|
||||||
get_nt_error_msg(result) ));
|
nt_errstr(result) ));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = cli_lsa_query_info_policy(&cli, cli.mem_ctx, &lsa_pol, 5, domain, psid);
|
result = cli_lsa_query_info_policy(&cli, cli.mem_ctx, &lsa_pol, 5, domain, psid);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0, ("fetch_domain_sid: Error querying lsa policy handle. %s\n",
|
DEBUG(0, ("fetch_domain_sid: Error querying lsa policy handle. %s\n",
|
||||||
get_nt_error_msg(result) ));
|
nt_errstr(result) ));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli,
|
|||||||
&srv_chal);
|
&srv_chal);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed %s\n",
|
DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed %s\n",
|
||||||
get_nt_error_msg(result)));
|
nt_errstr(result)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -648,7 +648,7 @@ NTSTATUS cli_net_srv_pwset(struct cli_state *cli, TALLOC_CTX *mem_ctx,
|
|||||||
if (!NT_STATUS_IS_OK(r_s.status))
|
if (!NT_STATUS_IS_OK(r_s.status))
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("cli_net_srv_pwset: %s\n", get_nt_error_msg(nt_status)));
|
DEBUG(0,("cli_net_srv_pwset: %s\n", nt_errstr(nt_status)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
|
|||||||
/* check returnet status code */
|
/* check returnet status code */
|
||||||
if (NT_STATUS_IS_ERR(r_o.status)) {
|
if (NT_STATUS_IS_ERR(r_o.status)) {
|
||||||
/* report the error */
|
/* report the error */
|
||||||
DEBUG(0,("WKS_R_QUERY_INFO: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("WKS_R_QUERY_INFO: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return r_o.status;
|
return r_o.status;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ char *cli_errstr(struct cli_state *cli)
|
|||||||
if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
|
if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
|
||||||
NTSTATUS status = NT_STATUS(IVAL(cli->inbuf,smb_rcls));
|
NTSTATUS status = NT_STATUS(IVAL(cli->inbuf,smb_rcls));
|
||||||
|
|
||||||
return get_nt_error_msg(status);
|
return nt_errstr(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
cli_dos_error(cli, &errclass, &errnum);
|
cli_dos_error(cli, &errclass, &errnum);
|
||||||
|
@ -216,7 +216,7 @@ int smbc_errno(struct cli_state *c)
|
|||||||
ret = cli_errno_from_nt(status);
|
ret = cli_errno_from_nt(status);
|
||||||
|
|
||||||
DEBUG(3,("smbc errno %s -> %d\n",
|
DEBUG(3,("smbc errno %s -> %d\n",
|
||||||
get_nt_error_msg(status), ret));
|
nt_errstr(status), ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -540,7 +540,7 @@ nt_err_code_struct nt_errs[] =
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
returns an NT error message. not amazingly helpful, but better than a number.
|
returns an NT error message. not amazingly helpful, but better than a number.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
char *get_nt_error_msg(NTSTATUS nt_code)
|
char *nt_errstr(NTSTATUS nt_code)
|
||||||
{
|
{
|
||||||
static pstring msg;
|
static pstring msg;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
@ -40,7 +40,7 @@ static NTSTATUS just_change_the_password(struct cli_state *cli, TALLOC_CTX *mem_
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0,("just_change_the_password: unable to setup creds (%s)!\n",
|
DEBUG(0,("just_change_the_password: unable to setup creds (%s)!\n",
|
||||||
get_nt_error_msg(result)));
|
nt_errstr(result)));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ static NTSTATUS just_change_the_password(struct cli_state *cli, TALLOC_CTX *mem_
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0,("just_change_the_password: unable to change password (%s)!\n",
|
DEBUG(0,("just_change_the_password: unable to change password (%s)!\n",
|
||||||
get_nt_error_msg(result)));
|
nt_errstr(result)));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,7 @@ static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_n
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result = cm_open_connection(domain, pipe_name, conn))) {
|
if (!NT_STATUS_IS_OK(result = cm_open_connection(domain, pipe_name, conn))) {
|
||||||
DEBUG(3, ("Could not open a connection to %s for %s (%s)\n",
|
DEBUG(3, ("Could not open a connection to %s for %s (%s)\n",
|
||||||
domain, pipe_name, get_nt_error_msg(result)));
|
domain, pipe_name, nt_errstr(result)));
|
||||||
SAFE_FREE(conn);
|
SAFE_FREE(conn);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -773,7 +773,7 @@ NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd,
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0, ("error connecting to domain password server: %s\n",
|
DEBUG(0, ("error connecting to domain password server: %s\n",
|
||||||
get_nt_error_msg(result)));
|
nt_errstr(result)));
|
||||||
|
|
||||||
/* Hit the cache code again. This cleans out the old connection and gets a new one */
|
/* Hit the cache code again. This cleans out the old connection and gets a new one */
|
||||||
if (conn->cli->fd == -1) {
|
if (conn->cli->fd == -1) {
|
||||||
|
@ -112,8 +112,8 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state)
|
|||||||
done:
|
done:
|
||||||
|
|
||||||
state->response.data.auth.nt_status = NT_STATUS_V(result);
|
state->response.data.auth.nt_status = NT_STATUS_V(result);
|
||||||
fstrcpy(state->response.data.auth.nt_status_string, get_nt_error_msg(result));
|
fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
|
||||||
fstrcpy(state->response.data.auth.error_string, get_nt_error_msg(result));
|
fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
|
||||||
state->response.data.auth.pam_error = nt_status_to_pam(result);
|
state->response.data.auth.pam_error = nt_status_to_pam(result);
|
||||||
|
|
||||||
DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authenticaion for user %s returned %s (PAM: %d)\n",
|
DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authenticaion for user %s returned %s (PAM: %d)\n",
|
||||||
@ -206,8 +206,8 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
|
|||||||
done:
|
done:
|
||||||
|
|
||||||
state->response.data.auth.nt_status = NT_STATUS_V(result);
|
state->response.data.auth.nt_status = NT_STATUS_V(result);
|
||||||
fstrcpy(state->response.data.auth.nt_status_string, get_nt_error_msg(result));
|
fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
|
||||||
fstrcpy(state->response.data.auth.error_string, get_nt_error_msg(result));
|
fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
|
||||||
state->response.data.auth.pam_error = nt_status_to_pam(result);
|
state->response.data.auth.pam_error = nt_status_to_pam(result);
|
||||||
|
|
||||||
DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n",
|
DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n",
|
||||||
@ -268,8 +268,8 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state)
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
state->response.data.auth.nt_status = NT_STATUS_V(result);
|
state->response.data.auth.nt_status = NT_STATUS_V(result);
|
||||||
fstrcpy(state->response.data.auth.nt_status_string, get_nt_error_msg(result));
|
fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
|
||||||
fstrcpy(state->response.data.auth.error_string, get_nt_error_msg(result));
|
fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
|
||||||
state->response.data.auth.pam_error = nt_status_to_pam(result);
|
state->response.data.auth.pam_error = nt_status_to_pam(result);
|
||||||
|
|
||||||
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
|
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
|
||||||
|
@ -210,7 +210,7 @@ NTSTATUS make_pdb_context_name(struct pdb_context **context, const char *selecte
|
|||||||
= builtin_pdb_init_functions[i].init(*context, &(*context)->pdb_selected, module_location))) {
|
= builtin_pdb_init_functions[i].init(*context, &(*context)->pdb_selected, module_location))) {
|
||||||
DEBUG(5,("pdb backend %s has a valid init\n", selected));
|
DEBUG(5,("pdb backend %s has a valid init\n", selected));
|
||||||
} else {
|
} else {
|
||||||
DEBUG(0,("pdb backend %s did not correctly init (error was %s)\n", selected, get_nt_error_msg(nt_status)));
|
DEBUG(0,("pdb backend %s did not correctly init (error was %s)\n", selected, nt_errstr(nt_status)));
|
||||||
(*context)->pdb_selected = NULL;
|
(*context)->pdb_selected = NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -91,7 +91,7 @@ BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level)
|
|||||||
if (ok && r_l.status != 0)
|
if (ok && r_l.status != 0)
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("do_net_logon_ctrl2: Error %s\n", get_nt_error_msg(r_l.status)));
|
DEBUG(0,("do_net_logon_ctrl2: Error %s\n", nt_errstr(r_l.status)));
|
||||||
cli->nt_error = r_l.status;
|
cli->nt_error = r_l.status;
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
|
|||||||
if (ok && !NT_STATUS_IS_OK(result))
|
if (ok && !NT_STATUS_IS_OK(result))
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("cli_net_auth2: Error %s\n", get_nt_error_msg(result)));
|
DEBUG(0,("cli_net_auth2: Error %s\n", nt_errstr(result)));
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_
|
|||||||
if (ok && !NT_STATUS_IS_OK(r_c.status))
|
if (ok && !NT_STATUS_IS_OK(r_c.status))
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("cli_net_req_chal: Error %s\n", get_nt_error_msg(r_c.status)));
|
DEBUG(0,("cli_net_req_chal: Error %s\n", nt_errstr(r_c.status)));
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ static NTSTATUS cli_net_sam_logon_internal(struct cli_state *cli, NET_ID_INFO_CT
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(retval)) {
|
if (!NT_STATUS_IS_OK(retval)) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("cli_net_sam_logon_internal: %s\n", get_nt_error_msg(r_s.status)));
|
DEBUG(0,("cli_net_sam_logon_internal: %s\n", nt_errstr(r_s.status)));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,7 +447,7 @@ BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr)
|
|||||||
if (ok && !NT_STATUS_IS_OK(r_s.status))
|
if (ok && !NT_STATUS_IS_OK(r_s.status))
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("cli_net_sam_logoff: %s\n", get_nt_error_msg(r_s.status)));
|
DEBUG(0,("cli_net_sam_logoff: %s\n", nt_errstr(r_s.status)));
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ BOOL do_reg_open_hklm(struct cli_state *cli, uint16 unknown_0, uint32 level,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_OPEN_HKLM: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_OPEN_HKLM: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ BOOL do_reg_open_hku(struct cli_state *cli, uint16 unknown_0, uint32 level,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_OPEN_HKU: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_OPEN_HKU: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ BOOL do_reg_flush_key(struct cli_state *cli, POLICY_HND *hnd)
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_FLUSH_KEY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_FLUSH_KEY: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -297,7 +297,7 @@ BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_QUERY_KEY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_QUERY_KEY: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -365,7 +365,7 @@ BOOL do_reg_unknown_1a(struct cli_state *cli, POLICY_HND *hnd, uint32 *unk)
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_UNK_1A: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_UNK_1A: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -425,7 +425,7 @@ BOOL do_reg_query_info(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if ( r_o.status != 0) {
|
if ( r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_INFO: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_INFO: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -548,7 +548,7 @@ BOOL do_reg_get_key_sec(struct cli_state *cli, POLICY_HND *hnd, uint32 *sec_buf_
|
|||||||
DEBUG(5,("sec_buf_size too small. use %d\n", *sec_buf_size));
|
DEBUG(5,("sec_buf_size too small. use %d\n", *sec_buf_size));
|
||||||
} else if (r_o.status != 0) {
|
} else if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_GET_KEY_SEC: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_GET_KEY_SEC: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
} else {
|
} else {
|
||||||
@ -608,7 +608,7 @@ BOOL do_reg_delete_val(struct cli_state *cli, POLICY_HND *hnd, char *val_name)
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_DELETE_VALUE: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_DELETE_VALUE: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -665,7 +665,7 @@ BOOL do_reg_delete_key(struct cli_state *cli, POLICY_HND *hnd, char *key_name)
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_DELETE_KEY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_DELETE_KEY: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -743,7 +743,7 @@ BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_CREATE_KEY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_CREATE_KEY: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -805,7 +805,7 @@ BOOL do_reg_enum_key(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_ENUM_KEY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_ENUM_KEY: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -868,7 +868,7 @@ BOOL do_reg_create_val(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_CREATE_VALUE: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_CREATE_VALUE: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -929,7 +929,7 @@ BOOL do_reg_enum_val(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_ENUM_VALUE: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_ENUM_VALUE: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -991,7 +991,7 @@ BOOL do_reg_open_entry(struct cli_state *cli, POLICY_HND *hnd,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_OPEN_ENTRY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("REG_OPEN_ENTRY: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -1051,7 +1051,7 @@ BOOL do_reg_close(struct cli_state *cli, POLICY_HND *hnd)
|
|||||||
|
|
||||||
if (r_c.status != 0) {
|
if (r_c.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("REG_CLOSE: %s\n", get_nt_error_msg(r_c.status)));
|
DEBUG(0,("REG_CLOSE: %s\n", nt_errstr(r_c.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ BOOL do_samr_chgpasswd_user(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_e.status != 0) {
|
if (r_e.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_CHGPASSWD_USER: %s\n", get_nt_error_msg(r_e.status)));
|
DEBUG(0,("SAMR_R_CHGPASSWD_USER: %s\n", nt_errstr(r_e.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ BOOL do_samr_unknown_38(struct cli_state *cli, char *srv_name)
|
|||||||
|
|
||||||
if (r_e.status != 0) {
|
if (r_e.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_UNKNOWN_38: %s\n", get_nt_error_msg(r_e.status)));
|
DEBUG(0,("SAMR_R_UNKNOWN_38: %s\n", nt_errstr(r_e.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ BOOL do_samr_query_dom_info(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_e.status != 0) {
|
if (r_e.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_QUERY_DOMAIN_INFO: %s\n", get_nt_error_msg(r_e.status)));
|
DEBUG(0,("SAMR_R_QUERY_DOMAIN_INFO: %s\n", nt_errstr(r_e.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ BOOL do_samr_enum_dom_users(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_e.status != 0) {
|
if (r_e.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_ENUM_DOM_USERS: %s\n", get_nt_error_msg(r_e.status)));
|
DEBUG(0,("SAMR_R_ENUM_DOM_USERS: %s\n", nt_errstr(r_e.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -410,7 +410,7 @@ BOOL do_samr_connect(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_CONNECT: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SAMR_R_CONNECT: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -471,7 +471,7 @@ BOOL do_samr_open_user(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_OPEN_USER: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SAMR_R_OPEN_USER: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -533,7 +533,7 @@ BOOL do_samr_open_domain(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_OPEN_DOMAIN: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SAMR_R_OPEN_DOMAIN: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -600,7 +600,7 @@ BOOL do_samr_query_unknown_12(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_UNKNOWN_12: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SAMR_R_UNKNOWN_12: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@ BOOL do_samr_query_usergroups(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_QUERY_USERGROUPS: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SAMR_R_QUERY_USERGROUPS: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -747,7 +747,7 @@ BOOL do_samr_query_userinfo(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_R_QUERY_USERINFO: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SAMR_R_QUERY_USERINFO: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -817,7 +817,7 @@ BOOL do_samr_close(struct cli_state *cli, POLICY_HND *hnd)
|
|||||||
|
|
||||||
if (r_c.status != 0) {
|
if (r_c.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SAMR_CLOSE_HND: %s\n", get_nt_error_msg(r_c.status)));
|
DEBUG(0,("SAMR_CLOSE_HND: %s\n", nt_errstr(r_c.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ uint32 spoolss_enum_printerdrivers(const char *srv_name, const char *environment
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_ENUMPRINTERDRIVERS: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ENUMPRINTERDRIVERS: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
*returned=r_o.returned;
|
*returned=r_o.returned;
|
||||||
@ -126,7 +126,7 @@ uint32 spoolss_enum_printers(uint32 flags, fstring srv_name, uint32 level,
|
|||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(3,("SPOOLSS_ENUMPRINTERS: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ENUMPRINTERS: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
@ -185,7 +185,7 @@ uint32 spoolss_enum_ports(fstring srv_name, uint32 level,
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_ENUMPORTS: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ENUMPORTS: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
@ -239,7 +239,7 @@ uint32 spoolss_enum_jobs(const POLICY_HND *hnd, uint32 firstjob, uint32 numofjob
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_ENUMJOBS: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ENUMJOBS: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
*returned=r_o.returned;
|
*returned=r_o.returned;
|
||||||
@ -297,7 +297,7 @@ uint32 spoolss_enum_printerdata(const POLICY_HND *hnd, uint32 idx,
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_ENUMPRINTERDATA: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ENUMPRINTERDATA: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
*valuelen=r_o.valuesize;
|
*valuelen=r_o.valuesize;
|
||||||
@ -357,7 +357,7 @@ uint32 spoolss_getprinter(const POLICY_HND *hnd, uint32 level,
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_GETPRINTER: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_GETPRINTER: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
}
|
}
|
||||||
@ -410,7 +410,7 @@ uint32 spoolss_getprinterdriver(const POLICY_HND *hnd,
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_GETPRINTERDRIVER2: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_GETPRINTERDRIVER2: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
@ -482,7 +482,7 @@ BOOL spoolss_open_printer_ex( const char *printername,
|
|||||||
if (prs_offset(&rbuf)!= 0 && r_o.status != 0)
|
if (prs_offset(&rbuf)!= 0 && r_o.status != 0)
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(3,("SPOOLSS_OPENPRINTEREX: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_OPENPRINTEREX: %s\n", nt_errstr(r_o.status)));
|
||||||
p = False;
|
p = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,7 +561,7 @@ BOOL spoolss_addprinterex(POLICY_HND *hnd, const char* srv_name, PRINTER_INFO_2
|
|||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(3,("SPOOLSS_ADDPRINTEREX: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ADDPRINTEREX: %s\n", nt_errstr(r_o.status)));
|
||||||
valid_pol = False;
|
valid_pol = False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -626,7 +626,7 @@ BOOL spoolss_closeprinter(POLICY_HND *hnd)
|
|||||||
if (prs_offset(&rbuf)!=0 && r_c.status != 0)
|
if (prs_offset(&rbuf)!=0 && r_c.status != 0)
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(3,("SPOOL_CLOSEPRINTER: %s\n", get_nt_error_msg(r_c.status)));
|
DEBUG(3,("SPOOL_CLOSEPRINTER: %s\n", nt_errstr(r_c.status)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
valid_close = True;
|
valid_close = True;
|
||||||
@ -689,7 +689,7 @@ uint32 spoolss_getprinterdata(const POLICY_HND *hnd, const UNISTR2 *valuename,
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_GETPRINTERDATA: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_GETPRINTERDATA: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
*type=r_o.type;
|
*type=r_o.type;
|
||||||
@ -748,7 +748,7 @@ uint32 spoolss_getprinterdriverdir(fstring srv_name, fstring env_name, uint32 le
|
|||||||
{
|
{
|
||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(3,("SPOOLSS_GETPRINTERDRIVERDIRECTORY: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_GETPRINTERDRIVERDIRECTORY: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
*needed=r_o.needed;
|
*needed=r_o.needed;
|
||||||
@ -800,7 +800,7 @@ uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIV
|
|||||||
if (r_o.status != NT_STATUS_OK)
|
if (r_o.status != NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(3,("SPOOLSS_ADDPRINTERDRIVER: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(3,("SPOOLSS_ADDPRINTERDRIVER: %s\n", nt_errstr(r_o.status)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ BOOL do_srv_net_srv_conn_enum(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SRV_R_NET_SRV_CONN_ENUM: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SRV_R_NET_SRV_CONN_ENUM: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ BOOL do_srv_net_srv_sess_enum(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SRV_R_NET_SRV_SESS_ENUM: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SRV_R_NET_SRV_SESS_ENUM: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ BOOL do_srv_net_srv_share_enum(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o->status != 0) {
|
if (r_o->status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SRV_R_NET_SHARE_ENUM: %s\n", get_nt_error_msg(r_o->status)));
|
DEBUG(0,("SRV_R_NET_SHARE_ENUM: %s\n", nt_errstr(r_o->status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ BOOL do_srv_net_srv_file_enum(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SRV_R_NET_FILE_ENUM: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SRV_R_NET_FILE_ENUM: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -381,7 +381,7 @@ BOOL do_srv_net_srv_get_info(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("SRV_R_NET_SRV_GET_INFO: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("SRV_R_NET_SRV_GET_INFO: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rdata);
|
prs_mem_free(&rdata);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ BOOL do_wks_query_info(struct cli_state *cli,
|
|||||||
|
|
||||||
if (r_o.status != 0) {
|
if (r_o.status != 0) {
|
||||||
/* report error code */
|
/* report error code */
|
||||||
DEBUG(0,("WKS_R_QUERY_INFO: %s\n", get_nt_error_msg(r_o.status)));
|
DEBUG(0,("WKS_R_QUERY_INFO: %s\n", nt_errstr(r_o.status)));
|
||||||
prs_mem_free(&rbuf);
|
prs_mem_free(&rbuf);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ BOOL msrpc_spoolss_enum_printers(char* srv_name, uint32 flags,
|
|||||||
|
|
||||||
if (status!=NT_STATUS_OK)
|
if (status!=NT_STATUS_OK)
|
||||||
{
|
{
|
||||||
DEBUG(0,("spoolss_enum_printers: %s\n", get_nt_error_msg(status)));
|
DEBUG(0,("spoolss_enum_printers: %s\n", nt_errstr(status)));
|
||||||
if (mem_ctx)
|
if (mem_ctx)
|
||||||
talloc_destroy(mem_ctx);
|
talloc_destroy(mem_ctx);
|
||||||
return False;
|
return False;
|
||||||
|
@ -603,7 +603,7 @@ BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name,
|
DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name,
|
||||||
get_nt_error_msg(*status)));
|
nt_errstr(*status)));
|
||||||
|
|
||||||
ps->data_offset += sizeof(uint32);
|
ps->data_offset += sizeof(uint32);
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
|
|||||||
free_user_info(&user_info);
|
free_user_info(&user_info);
|
||||||
|
|
||||||
DEBUG(5, ("_net_sam_logon: check_password returned status %s\n",
|
DEBUG(5, ("_net_sam_logon: check_password returned status %s\n",
|
||||||
get_nt_error_msg(status)));
|
nt_errstr(status)));
|
||||||
|
|
||||||
/* Check account and password */
|
/* Check account and password */
|
||||||
|
|
||||||
|
@ -698,7 +698,7 @@ static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg)
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(10,("send_spoolss_event_notification: Event notification failed [%s]\n",
|
DEBUG(10,("send_spoolss_event_notification: Event notification failed [%s]\n",
|
||||||
get_nt_error_msg(result)));
|
nt_errstr(result)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ void fetch_machine_sid(struct cli_state *cli)
|
|||||||
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
|
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
fprintf(stderr, "error: %s\n", get_nt_error_msg(result));
|
fprintf(stderr, "error: %s\n", nt_errstr(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -521,7 +521,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
printf("result was %s\n", get_nt_error_msg(result));
|
printf("result was %s\n", nt_errstr(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -711,7 +711,7 @@ static void usage(void)
|
|||||||
password, strlen(password));
|
password, strlen(password));
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||||
DEBUG(1,("Cannot connect to server. Error was %s\n", get_nt_error_msg(nt_status)));
|
DEBUG(1,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status)));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ static struct cli_state *init_connection(struct cli_state *cli,
|
|||||||
result = sam_repl(&cli, trust_passwd, low_serial);
|
result = sam_repl(&cli, trust_passwd, low_serial);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(0, ("%s\n", get_nt_error_msg(result)));
|
DEBUG(0, ("%s\n", nt_errstr(result)));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ int error_packet(char *outbuf,NTSTATUS ntstatus,
|
|||||||
file, line,
|
file, line,
|
||||||
(int)CVAL(outbuf,smb_com),
|
(int)CVAL(outbuf,smb_com),
|
||||||
smb_fn_name(CVAL(outbuf,smb_com)),
|
smb_fn_name(CVAL(outbuf,smb_com)),
|
||||||
get_nt_error_msg(ntstatus)));
|
nt_errstr(ntstatus)));
|
||||||
return outsize;
|
return outsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1632,7 +1632,7 @@ static BOOL api_RNetShareEnum(connection_struct *conn,uint16 vuid, char *param,c
|
|||||||
*rdata = REALLOC(*rdata,*rdata_len);
|
*rdata = REALLOC(*rdata,*rdata_len);
|
||||||
memset(*rdata,0,*rdata_len);
|
memset(*rdata,0,*rdata_len);
|
||||||
|
|
||||||
p2 = (*rdata) + fixed_len; /* auxillery data (strings) will go here */
|
p2 = (*rdata) + fixed_len; /* auxiliary data (strings) will go here */
|
||||||
p = *rdata;
|
p = *rdata;
|
||||||
f_len = fixed_len;
|
f_len = fixed_len;
|
||||||
s_len = string_len;
|
s_len = string_len;
|
||||||
|
@ -41,7 +41,7 @@ static void get_challenge(char buff[8])
|
|||||||
|
|
||||||
DEBUG(10, ("get challenge: creating negprot_global_auth_context\n"));
|
DEBUG(10, ("get challenge: creating negprot_global_auth_context\n"));
|
||||||
if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(&negprot_global_auth_context))) {
|
if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(&negprot_global_auth_context))) {
|
||||||
DEBUG(0, ("make_auth_context_subsystem returned %s", get_nt_error_msg(nt_status)));
|
DEBUG(0, ("make_auth_context_subsystem returned %s", nt_errstr(nt_status)));
|
||||||
smb_panic("cannot make_negprot_global_auth_context!\n");
|
smb_panic("cannot make_negprot_global_auth_context!\n");
|
||||||
}
|
}
|
||||||
DEBUG(10, ("get challenge: getting challenge\n"));
|
DEBUG(10, ("get challenge: getting challenge\n"));
|
||||||
|
@ -3120,7 +3120,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
|
|||||||
}
|
}
|
||||||
error = map_nt_error_from_unix(errno);
|
error = map_nt_error_from_unix(errno);
|
||||||
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
|
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
|
||||||
get_nt_error_msg(error), directory,newname));
|
nt_errstr(error), directory,newname));
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@ -3129,7 +3129,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
|
|||||||
|
|
||||||
if (!NT_STATUS_IS_OK(error)) {
|
if (!NT_STATUS_IS_OK(error)) {
|
||||||
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
|
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
|
||||||
get_nt_error_msg(error), directory,newname));
|
nt_errstr(error), directory,newname));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3161,7 +3161,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
|
|||||||
error = map_nt_error_from_unix(errno);
|
error = map_nt_error_from_unix(errno);
|
||||||
|
|
||||||
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
|
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
|
||||||
get_nt_error_msg(error), directory,newname));
|
nt_errstr(error), directory,newname));
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
} else {
|
} else {
|
||||||
|
@ -299,7 +299,7 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
|
|||||||
conn, f,
|
conn, f,
|
||||||
(double)start, (double)len,
|
(double)start, (double)len,
|
||||||
op==READ_LOCK?"READ_LOCK":"WRITE_LOCK",
|
op==READ_LOCK?"READ_LOCK":"WRITE_LOCK",
|
||||||
get_nt_error_msg(status[0]), get_nt_error_msg(status[1]));
|
nt_errstr(status[0]), nt_errstr(status[1]));
|
||||||
}
|
}
|
||||||
if (showall || !NT_STATUS_EQUAL(status[0],status[1])) show_locks();
|
if (showall || !NT_STATUS_EQUAL(status[0],status[1])) show_locks();
|
||||||
if (!NT_STATUS_EQUAL(status[0],status[1])) return False;
|
if (!NT_STATUS_EQUAL(status[0],status[1])) return False;
|
||||||
@ -318,7 +318,7 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
|
|||||||
printf("unlock conn=%u f=%u range=%.0f(%.0f) -> %s:%s\n",
|
printf("unlock conn=%u f=%u range=%.0f(%.0f) -> %s:%s\n",
|
||||||
conn, f,
|
conn, f,
|
||||||
(double)start, (double)len,
|
(double)start, (double)len,
|
||||||
get_nt_error_msg(status[0]), get_nt_error_msg(status[1]));
|
nt_errstr(status[0]), nt_errstr(status[1]));
|
||||||
}
|
}
|
||||||
if (showall || !NT_STATUS_EQUAL(status[0],status[1])) show_locks();
|
if (showall || !NT_STATUS_EQUAL(status[0],status[1])) show_locks();
|
||||||
if (!hide_unlock_fails && !NT_STATUS_EQUAL(status[0],status[1]))
|
if (!hide_unlock_fails && !NT_STATUS_EQUAL(status[0],status[1]))
|
||||||
|
@ -40,7 +40,7 @@ static void trans2_check_hit(char *format, int op, int level, NTSTATUS status)
|
|||||||
}
|
}
|
||||||
#if VERBOSE
|
#if VERBOSE
|
||||||
printf("possible %s hit op=%3d level=%5d status=%s\n",
|
printf("possible %s hit op=%3d level=%5d status=%s\n",
|
||||||
format, op, level, get_nt_error_msg(status));
|
format, op, level, nt_errstr(status));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ static NTSTATUS try_trans2_len(struct cli_state *cli,
|
|||||||
ret = try_trans2(cli, op, param, data, param_len,
|
ret = try_trans2(cli, op, param, data, param_len,
|
||||||
sizeof(pstring), rparam_len, rdata_len);
|
sizeof(pstring), rparam_len, rdata_len);
|
||||||
#if VERBOSE
|
#if VERBOSE
|
||||||
printf("op=%d level=%d ret=%s\n", op, level, get_nt_error_msg(ret));
|
printf("op=%d level=%d ret=%s\n", op, level, nt_errstr(ret));
|
||||||
#endif
|
#endif
|
||||||
if (!NT_STATUS_IS_OK(ret)) return ret;
|
if (!NT_STATUS_IS_OK(ret)) return ret;
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ static void nttrans_check_hit(char *format, int op, int level, NTSTATUS status)
|
|||||||
}
|
}
|
||||||
#if VERBOSE
|
#if VERBOSE
|
||||||
printf("possible %s hit op=%3d level=%5d status=%s\n",
|
printf("possible %s hit op=%3d level=%5d status=%s\n",
|
||||||
format, op, level, get_nt_error_msg(status));
|
format, op, level, nt_errstr(status));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ static NTSTATUS try_nttrans_len(struct cli_state *cli,
|
|||||||
ret = try_nttrans(cli, op, param, data, param_len,
|
ret = try_nttrans(cli, op, param, data, param_len,
|
||||||
sizeof(pstring), rparam_len, rdata_len);
|
sizeof(pstring), rparam_len, rdata_len);
|
||||||
#if VERBOSE
|
#if VERBOSE
|
||||||
printf("op=%d level=%d ret=%s\n", op, level, get_nt_error_msg(ret));
|
printf("op=%d level=%d ret=%s\n", op, level, nt_errstr(ret));
|
||||||
#endif
|
#endif
|
||||||
if (!NT_STATUS_IS_OK(ret)) return ret;
|
if (!NT_STATUS_IS_OK(ret)) return ret;
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ static BOOL check_error(int line, struct cli_state *c,
|
|||||||
printf("unexpected error code class=%d code=%d\n",
|
printf("unexpected error code class=%d code=%d\n",
|
||||||
(int)class, (int)num);
|
(int)class, (int)num);
|
||||||
printf(" expected %d/%d %s (line=%d)\n",
|
printf(" expected %d/%d %s (line=%d)\n",
|
||||||
(int)eclass, (int)ecode, get_nt_error_msg(nterr), line);
|
(int)eclass, (int)ecode, nt_errstr(nterr), line);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,8 +199,8 @@ static BOOL check_error(int line, struct cli_state *c,
|
|||||||
status = cli_nt_error(c);
|
status = cli_nt_error(c);
|
||||||
|
|
||||||
if (NT_STATUS_V(nterr) != NT_STATUS_V(status)) {
|
if (NT_STATUS_V(nterr) != NT_STATUS_V(status)) {
|
||||||
printf("unexpected error code %s\n", get_nt_error_msg(status));
|
printf("unexpected error code %s\n", nt_errstr(status));
|
||||||
printf(" expected %s (line=%d)\n", get_nt_error_msg(nterr), line);
|
printf(" expected %s (line=%d)\n", nt_errstr(nterr), line);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1520,12 +1520,12 @@ static BOOL run_locktest6(int dummy)
|
|||||||
fnum = cli_open(&cli, fname[i], O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
|
fnum = cli_open(&cli, fname[i], O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
|
||||||
status = cli_locktype(&cli, fnum, 0, 8, 0, LOCKING_ANDX_CHANGE_LOCKTYPE);
|
status = cli_locktype(&cli, fnum, 0, 8, 0, LOCKING_ANDX_CHANGE_LOCKTYPE);
|
||||||
cli_close(&cli, fnum);
|
cli_close(&cli, fnum);
|
||||||
printf("CHANGE_LOCKTYPE gave %s\n", get_nt_error_msg(status));
|
printf("CHANGE_LOCKTYPE gave %s\n", nt_errstr(status));
|
||||||
|
|
||||||
fnum = cli_open(&cli, fname[i], O_RDWR, DENY_NONE);
|
fnum = cli_open(&cli, fname[i], O_RDWR, DENY_NONE);
|
||||||
status = cli_locktype(&cli, fnum, 0, 8, 0, LOCKING_ANDX_CANCEL_LOCK);
|
status = cli_locktype(&cli, fnum, 0, 8, 0, LOCKING_ANDX_CANCEL_LOCK);
|
||||||
cli_close(&cli, fnum);
|
cli_close(&cli, fnum);
|
||||||
printf("CANCEL_LOCK gave %s\n", get_nt_error_msg(status));
|
printf("CANCEL_LOCK gave %s\n", nt_errstr(status));
|
||||||
|
|
||||||
cli_unlink(&cli, fname[i]);
|
cli_unlink(&cli, fname[i]);
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ NTSTATUS connect_to_ipc(struct cli_state **c, struct in_addr *server_ip,
|
|||||||
return nt_status;
|
return nt_status;
|
||||||
} else {
|
} else {
|
||||||
DEBUG(0,("Cannot connect to server. Error was %s\n",
|
DEBUG(0,("Cannot connect to server. Error was %s\n",
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
|
|
||||||
/* Display a nicer message depending on the result */
|
/* Display a nicer message depending on the result */
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ NTSTATUS connect_to_ipc_anonymous(struct cli_state **c,
|
|||||||
if (NT_STATUS_IS_OK(nt_status)) {
|
if (NT_STATUS_IS_OK(nt_status)) {
|
||||||
return nt_status;
|
return nt_status;
|
||||||
} else {
|
} else {
|
||||||
DEBUG(0,("Cannot connect to server (anonymously). Error was %s\n", get_nt_error_msg(nt_status)));
|
DEBUG(0,("Cannot connect to server (anonymously). Error was %s\n", nt_errstr(nt_status)));
|
||||||
return nt_status;
|
return nt_status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli)
|
|||||||
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
|
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
fprintf(stderr, "error: %s\n", get_nt_error_msg(result));
|
fprintf(stderr, "error: %s\n", nt_errstr(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -144,7 +144,7 @@ static int run_rpc_command(const char *pipe_name, int conn_flags,
|
|||||||
nt_status = fn(domain_sid, cli, mem_ctx, argc, argv);
|
nt_status = fn(domain_sid, cli, mem_ctx, argc, argv);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||||
DEBUG(0, ("rpc command function failed! (%s)\n", get_nt_error_msg(nt_status)));
|
DEBUG(0, ("rpc command function failed! (%s)\n", nt_errstr(nt_status)));
|
||||||
} else {
|
} else {
|
||||||
DEBUG(5, ("rpc command function succedded\n"));
|
DEBUG(5, ("rpc command function succedded\n"));
|
||||||
}
|
}
|
||||||
@ -361,7 +361,7 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid, struct cli_sta
|
|||||||
done:
|
done:
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
d_printf("Failed to add user %s - %s\n", acct_name,
|
d_printf("Failed to add user %s - %s\n", acct_name,
|
||||||
get_nt_error_msg(result));
|
nt_errstr(result));
|
||||||
} else {
|
} else {
|
||||||
d_printf("Added user %s\n", acct_name);
|
d_printf("Added user %s\n", acct_name);
|
||||||
}
|
}
|
||||||
@ -724,7 +724,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) {
|
|||||||
|
|
||||||
/* Is it trusting domain account for sure ? */
|
/* Is it trusting domain account for sure ? */
|
||||||
DEBUG(0, ("Couldn't verify trusting domain account. Error was %s\n",
|
DEBUG(0, ("Couldn't verify trusting domain account. Error was %s\n",
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,7 +736,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) {
|
|||||||
|
|
||||||
if (NT_STATUS_IS_ERR(nt_status)) {
|
if (NT_STATUS_IS_ERR(nt_status)) {
|
||||||
DEBUG(0, ("Couldn't connect to domain %s controller. Error was %s.\n",
|
DEBUG(0, ("Couldn't connect to domain %s controller. Error was %s.\n",
|
||||||
domain_name, get_nt_error_msg(nt_status)));
|
domain_name, nt_errstr(nt_status)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -803,7 +803,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) {
|
|||||||
&connect_hnd);
|
&connect_hnd);
|
||||||
if (NT_STATUS_IS_ERR(nt_status)) {
|
if (NT_STATUS_IS_ERR(nt_status)) {
|
||||||
DEBUG(0, ("Couldn't open policy handle. Error was %s\n",
|
DEBUG(0, ("Couldn't open policy handle. Error was %s\n",
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -813,7 +813,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) {
|
|||||||
5 /* info level */, domain_name, &domain_sid);
|
5 /* info level */, domain_name, &domain_sid);
|
||||||
if (NT_STATUS_IS_ERR(nt_status)) {
|
if (NT_STATUS_IS_ERR(nt_status)) {
|
||||||
DEBUG(0, ("LSA Query Info failed. Returned error was %s\n",
|
DEBUG(0, ("LSA Query Info failed. Returned error was %s\n",
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -828,7 +828,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) {
|
|||||||
nt_status = cli_lsa_close(cli, mem_ctx, &connect_hnd);
|
nt_status = cli_lsa_close(cli, mem_ctx, &connect_hnd);
|
||||||
if (NT_STATUS_IS_ERR(nt_status)) {
|
if (NT_STATUS_IS_ERR(nt_status)) {
|
||||||
DEBUG(0, ("Couldn't close LSA pipe. Error was %s\n",
|
DEBUG(0, ("Couldn't close LSA pipe. Error was %s\n",
|
||||||
get_nt_error_msg(nt_status)));
|
nt_errstr(nt_status)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#define CHECK_RPC_ERR(rpc, msg) \
|
#define CHECK_RPC_ERR(rpc, msg) \
|
||||||
if (!NT_STATUS_IS_OK(result = rpc)) { \
|
if (!NT_STATUS_IS_OK(result = rpc)) { \
|
||||||
DEBUG(0, (msg ": %s\n", get_nt_error_msg(result))); \
|
DEBUG(0, (msg ": %s\n", nt_errstr(result))); \
|
||||||
goto done; \
|
goto done; \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
|
|||||||
1, &names, &num_rids,
|
1, &names, &num_rids,
|
||||||
&user_rids, &name_types),
|
&user_rids, &name_types),
|
||||||
("error looking up rid for user %s: %s\n",
|
("error looking up rid for user %s: %s\n",
|
||||||
acct_name, get_nt_error_msg(result)));
|
acct_name, nt_errstr(result)));
|
||||||
|
|
||||||
if (name_types[0] != SID_NAME_USER) {
|
if (name_types[0] != SID_NAME_USER) {
|
||||||
DEBUG(0, ("%s is not a user account\n", acct_name));
|
DEBUG(0, ("%s is not a user account\n", acct_name));
|
||||||
@ -185,7 +185,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
|
|||||||
SEC_RIGHTS_MAXIMUM_ALLOWED,
|
SEC_RIGHTS_MAXIMUM_ALLOWED,
|
||||||
user_rid, &user_pol),
|
user_rid, &user_pol),
|
||||||
("could not re-open existing user %s: %s\n",
|
("could not re-open existing user %s: %s\n",
|
||||||
acct_name, get_nt_error_msg(result)));
|
acct_name, nt_errstr(result)));
|
||||||
|
|
||||||
/* Create a random machine account password */
|
/* Create a random machine account password */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user