auth_method->name, user_info->smb_name.str));
} else {
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);
pdb_username));
} else {
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)));
}
}
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(2, ("check_password: Authenticaion for user [%s] -> [%s] FAILED with error %s\n",
user_info->smb_name.str, user_info->internal_username.str,
- get_nt_error_msg(nt_status)));
+ nt_errstr(nt_status)));
ZERO_STRUCTP(server_info);
}
return nt_status;
if (!NT_STATUS_IS_OK(result)) {
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_ulogoff(*cli);
cli_shutdown(*cli);
"for user %s in domain %s to Domain controller %s. "
"Error was %s.\n", user_info->smb_name.str,
user_info->domain.str, cli->srv_name_slash,
- get_nt_error_msg(nt_status)));
+ nt_errstr(nt_status)));
} else {
char *dom_user;
tmp_acc_desired = check_ace( ace, token, tmp_acc_desired, status);
if (NT_STATUS_V(*status)) {
*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;
}
}
result = cli_lsa_open_policy(&cli, cli.mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, &lsa_pol);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0, ("fetch_domain_sid: Error opening lsa policy handle. %s\n",
- get_nt_error_msg(result) ));
+ nt_errstr(result) ));
goto done;
}
result = cli_lsa_query_info_policy(&cli, cli.mem_ctx, &lsa_pol, 5, domain, psid);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0, ("fetch_domain_sid: Error querying lsa policy handle. %s\n",
- get_nt_error_msg(result) ));
+ nt_errstr(result) ));
goto done;
}
&srv_chal);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed %s\n",
- get_nt_error_msg(result)));
+ nt_errstr(result)));
}
return result;
if (!NT_STATUS_IS_OK(r_s.status))
{
/* 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;
}
/* check returnet status code */
if (NT_STATUS_IS_ERR(r_o.status)) {
/* 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);
return r_o.status;
}
if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
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);
ret = cli_errno_from_nt(status);
DEBUG(3,("smbc errno %s -> %d\n",
- get_nt_error_msg(status), ret));
+ nt_errstr(status), ret));
}
return ret;
/*****************************************************************************
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;
int idx = 0;
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0,("just_change_the_password: unable to setup creds (%s)!\n",
- get_nt_error_msg(result)));
+ nt_errstr(result)));
return result;
}
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0,("just_change_the_password: unable to change password (%s)!\n",
- get_nt_error_msg(result)));
+ nt_errstr(result)));
}
return result;
}
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",
- domain, pipe_name, get_nt_error_msg(result)));
+ domain, pipe_name, nt_errstr(result)));
SAFE_FREE(conn);
return result;
}
if (!NT_STATUS_IS_OK(result)) {
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 */
if (conn->cli->fd == -1) {
done:
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.error_string, get_nt_error_msg(result));
+ fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
+ fstrcpy(state->response.data.auth.error_string, nt_errstr(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",
done:
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.error_string, get_nt_error_msg(result));
+ fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
+ fstrcpy(state->response.data.auth.error_string, nt_errstr(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",
done:
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.error_string, get_nt_error_msg(result));
+ fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
+ fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
state->response.data.auth.pam_error = nt_status_to_pam(result);
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
= builtin_pdb_init_functions[i].init(*context, &(*context)->pdb_selected, module_location))) {
DEBUG(5,("pdb backend %s has a valid init\n", selected));
} 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;
}
break;
if (ok && r_l.status != 0)
{
/* 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;
ok = False;
}
if (ok && !NT_STATUS_IS_OK(result))
{
/* 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;
}
if (ok && !NT_STATUS_IS_OK(r_c.status))
{
/* 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;
}
if (!NT_STATUS_IS_OK(retval)) {
/* 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;
}
if (ok && !NT_STATUS_IS_OK(r_s.status))
{
/* 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;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if ( r_o.status != 0) {
/* 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);
return False;
}
DEBUG(5,("sec_buf_size too small. use %d\n", *sec_buf_size));
} else if (r_o.status != 0) {
/* 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);
return False;
} else {
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_c.status != 0) {
/* 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);
return False;
}
if (r_e.status != 0) {
/* 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);
return False;
}
if (r_e.status != 0) {
/* 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);
return False;
}
if (r_e.status != 0) {
/* 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);
return False;
}
if (r_e.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_c.status != 0) {
/* 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);
return False;
}
{
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;
*returned=r_o.returned;
if (r_o.status != NT_STATUS_OK)
{
/* 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;
{
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;
{
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;
*returned=r_o.returned;
{
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;
{
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;
}
{
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;
if (prs_offset(&rbuf)!= 0 && r_o.status != 0)
{
/* 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;
}
if (r_o.status != NT_STATUS_OK)
{
/* 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;
}
}
if (prs_offset(&rbuf)!=0 && r_c.status != 0)
{
/* 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
valid_close = True;
{
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;
{
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;
if (r_o.status != NT_STATUS_OK)
{
/* 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)));
}
}
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o->status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
if (r_o.status != 0) {
/* 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);
return False;
}
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)
talloc_destroy(mem_ctx);
return False;
}
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);
free_user_info(&user_info);
DEBUG(5, ("_net_sam_logon: check_password returned status %s\n",
- get_nt_error_msg(status)));
+ nt_errstr(status)));
/* Check account and password */
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("send_spoolss_event_notification: Event notification failed [%s]\n",
- get_nt_error_msg(result)));
+ nt_errstr(result)));
}
}
}
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
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);
}
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;
password, strlen(password));
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;
}
result = sam_repl(&cli, trust_passwd, low_serial);
if (!NT_STATUS_IS_OK(result)) {
- DEBUG(0, ("%s\n", get_nt_error_msg(result)));
+ DEBUG(0, ("%s\n", nt_errstr(result)));
return 1;
}
file, line,
(int)CVAL(outbuf,smb_com),
smb_fn_name(CVAL(outbuf,smb_com)),
- get_nt_error_msg(ntstatus)));
+ nt_errstr(ntstatus)));
return outsize;
}
*rdata = REALLOC(*rdata,*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;
f_len = fixed_len;
s_len = string_len;
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))) {
- 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");
}
DEBUG(10, ("get challenge: getting challenge\n"));
}
error = map_nt_error_from_unix(errno);
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
- get_nt_error_msg(error), directory,newname));
+ nt_errstr(error), directory,newname));
return error;
}
if (!NT_STATUS_IS_OK(error)) {
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
- get_nt_error_msg(error), directory,newname));
+ nt_errstr(error), directory,newname));
return error;
}
error = map_nt_error_from_unix(errno);
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
- get_nt_error_msg(error), directory,newname));
+ nt_errstr(error), directory,newname));
return error;
} else {
conn, f,
(double)start, (double)len,
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 (!NT_STATUS_EQUAL(status[0],status[1])) return False;
printf("unlock conn=%u f=%u range=%.0f(%.0f) -> %s:%s\n",
conn, f,
(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 (!hide_unlock_fails && !NT_STATUS_EQUAL(status[0],status[1]))
}
#if VERBOSE
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
}
ret = try_trans2(cli, op, param, data, param_len,
sizeof(pstring), rparam_len, rdata_len);
#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
if (!NT_STATUS_IS_OK(ret)) return ret;
}
#if VERBOSE
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
}
ret = try_nttrans(cli, op, param, data, param_len,
sizeof(pstring), rparam_len, rdata_len);
#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
if (!NT_STATUS_IS_OK(ret)) return ret;
printf("unexpected error code class=%d code=%d\n",
(int)class, (int)num);
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;
}
status = cli_nt_error(c);
if (NT_STATUS_V(nterr) != NT_STATUS_V(status)) {
- printf("unexpected error code %s\n", get_nt_error_msg(status));
- printf(" expected %s (line=%d)\n", get_nt_error_msg(nterr), line);
+ printf("unexpected error code %s\n", nt_errstr(status));
+ printf(" expected %s (line=%d)\n", nt_errstr(nterr), line);
return False;
}
}
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);
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);
status = cli_locktype(&cli, fnum, 0, 8, 0, LOCKING_ANDX_CANCEL_LOCK);
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]);
}
return nt_status;
} else {
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 */
if (NT_STATUS_IS_OK(nt_status)) {
return nt_status;
} 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;
}
}
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
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);
nt_status = fn(domain_sid, cli, mem_ctx, argc, argv);
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 {
DEBUG(5, ("rpc command function succedded\n"));
}
done:
if (!NT_STATUS_IS_OK(result)) {
d_printf("Failed to add user %s - %s\n", acct_name,
- get_nt_error_msg(result));
+ nt_errstr(result));
} else {
d_printf("Added user %s\n", acct_name);
}
/* Is it trusting domain account for sure ? */
DEBUG(0, ("Couldn't verify trusting domain account. Error was %s\n",
- get_nt_error_msg(nt_status)));
+ nt_errstr(nt_status)));
return -1;
}
if (NT_STATUS_IS_ERR(nt_status)) {
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)));
}
/*
&connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("Couldn't open policy handle. Error was %s\n",
- get_nt_error_msg(nt_status)));
+ nt_errstr(nt_status)));
return -1;
}
5 /* info level */, domain_name, &domain_sid);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("LSA Query Info failed. Returned error was %s\n",
- get_nt_error_msg(nt_status)));
+ nt_errstr(nt_status)));
return -1;
}
nt_status = cli_lsa_close(cli, mem_ctx, &connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("Couldn't close LSA pipe. Error was %s\n",
- get_nt_error_msg(nt_status)));
+ nt_errstr(nt_status)));
return -1;
}
#define CHECK_RPC_ERR(rpc, msg) \
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; \
}
1, &names, &num_rids,
&user_rids, &name_types),
("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) {
DEBUG(0, ("%s is not a user account\n", acct_name));
SEC_RIGHTS_MAXIMUM_ALLOWED,
user_rid, &user_pol),
("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 */