1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

converted another bunch of stuff to NTSTATUS

(This used to be commit 1d36250e33)
This commit is contained in:
Andrew Tridgell 2001-08-27 19:46:22 +00:00
parent 1d726fe0e0
commit b031af348c
83 changed files with 1035 additions and 1038 deletions

View File

@ -68,15 +68,15 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
return NT_STATUS_LOGON_FAILURE;
}
if (nt_status != NT_STATUS_NOPROBLEMO) {
if (nt_status != NT_STATUS_OK) {
nt_status = check_rhosts_security(user_info, server_info);
}
if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_NOPROBLEMO)) {
if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_OK)) {
nt_status = check_domain_security(user_info, server_info);
}
if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_NOPROBLEMO)) {
if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_OK)) {
nt_status = check_server_security(user_info, server_info);
}
@ -84,7 +84,7 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
smb_user_control(user_info->smb_username.str, nt_status);
}
if (nt_status != NT_STATUS_NOPROBLEMO) {
if (nt_status != NT_STATUS_OK) {
if ((user_info->plaintext_password.len > 0)
&& (!lp_plaintext_to_smbpasswd())) {
nt_status = check_unix_security(user_info, server_info);
@ -94,14 +94,14 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
}
}
if ((nt_status == NT_STATUS_NOPROBLEMO) && !done_pam) {
if ((nt_status == NT_STATUS_OK) && !done_pam) {
/* We might not be root if we are an RPC call */
become_root();
nt_status = smb_pam_accountcheck(user_info->smb_username.str);
unbecome_root();
}
if (nt_status == NT_STATUS_NOPROBLEMO) {
if (nt_status == NT_STATUS_OK) {
DEBUG(5, ("check_password: Password for user %s suceeded\n", user_info->smb_username.str));
} else {
DEBUG(3, ("check_password: Password for user %s FAILED with error %s\n", user_info->smb_username.str, get_nt_error_msg(nt_status)));
@ -233,11 +233,11 @@ BOOL password_ok(char *user, char *password, int pwlen)
/* The password could be either NTLM or plain LM. Try NTLM first, but fall-through as
required. */
if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_NOPROBLEMO) {
if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_OK) {
return True;
}
if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_NOPROBLEMO) {
if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_OK) {
return True;
}

View File

@ -175,7 +175,7 @@ uint32 check_rhosts_security(const auth_usersupplied_info *user_info,
become_root();
if (check_hosts_equiv(user_info->smb_username.str)) {
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
}
unbecome_root();

View File

@ -127,7 +127,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
if (lp_null_passwords())
{
DEBUG(3,("Account for user '%s' has no password and null passwords are allowed.\n", user_info->smb_username.str));
return(NT_STATUS_NOPROBLEMO);
return(NT_STATUS_OK);
}
else
{
@ -156,7 +156,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
user_info->requested_domain.str,
(char *)server_info->session_key))
{
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
DEBUG(4,("smb_password_ok: NTLMv2 password check failed\n"));
@ -169,7 +169,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
nt_pw, user_info->chal,
server_info->session_key)) {
DEBUG(4,("smb_password_ok: NT MD4 password check succeeded\n"));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
} else {
DEBUG(4,("smb_password_ok: NT MD4 password check failed\n"));
return NT_STATUS_WRONG_PASSWORD;
@ -185,7 +185,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
lm_pw, user_info->chal,
server_info->session_key)) {
DEBUG(4,("smb_password_ok: LM password check succeeded\n"));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
} else {
DEBUG(4,("smb_password_ok: LM password check failed\n"));
return NT_STATUS_WRONG_PASSWORD;

View File

@ -214,7 +214,7 @@ use this machine as the password server.\n"));
/* Make this cli_nt_error() when the conversion is in */
nt_status = NT_STATUS_LOGON_FAILURE;
} else {
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
}
/* if logged in as guest then reject */

View File

@ -76,7 +76,7 @@ uint32 check_unix_security(const auth_usersupplied_info *user_info, auth_servers
nt_status = (pass_check(user_info->smb_username.str, user_info->plaintext_password.str,
user_info->plaintext_password.len,
lp_update_encrypted() ? update_smbpassword_file : NULL)
? NT_STATUS_NOPROBLEMO : NT_STATUS_LOGON_FAILURE);
? NT_STATUS_OK : NT_STATUS_LOGON_FAILURE);
unbecome_root();
return nt_status;

View File

@ -105,7 +105,7 @@ void smb_user_control(char *unix_user, uint32 nt_status)
{
struct passwd *pwd=NULL;
if(nt_status == NT_STATUS_NOPROBLEMO) {
if(nt_status == NT_STATUS_OK) {
/*
* User validated ok against Domain controller.
* If the admin wants us to try and create a UNIX

View File

@ -88,7 +88,7 @@ static BOOL smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
if (smb_pam_error_handler(pamh, pam_error, msg, dbglvl))
return True;
if (*nt_status == NT_STATUS_NOPROBLEMO) {
if (*nt_status == NT_STATUS_OK) {
/* Complain LOUDLY */
DEBUG(0, ("smb_pam_nt_status_error_handler: PAM: BUG: PAM and NT_STATUS \
error MISMATCH, forcing to NT_STATUS_LOGON_FAILURE"));
@ -533,7 +533,7 @@ static uint32 smb_pam_auth(pam_handle_t *pamh, char *user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_auth: PAM: User %s Authenticated OK\n", user));
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
break;
default:
DEBUG(0, ("smb_pam_auth: PAM: UNKNOWN ERROR while authenticating user %s\n", user));
@ -578,7 +578,7 @@ static uint32 smb_pam_account(pam_handle_t *pamh, char * user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_account: PAM: Account OK for User: %s\n", user));
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
break;
default:
nt_status = NT_STATUS_ACCOUNT_DISABLED;
@ -625,7 +625,7 @@ static uint32 smb_pam_setcred(pam_handle_t *pamh, char * user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_setcred: PAM: SetCredentials OK for User: %s\n", user));
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
break;
default:
DEBUG(0, ("smb_pam_setcred: PAM: UNKNOWN PAM ERROR (%d) during SetCredentials for User: %s\n", pam_error, user));
@ -787,7 +787,7 @@ uint32 smb_pam_accountcheck(char * user)
/* Ignore PAM if told to. */
if (!lp_obey_pam_restrictions())
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, NULL, NULL)) == NULL)
return False;
@ -795,7 +795,7 @@ uint32 smb_pam_accountcheck(char * user)
if (!smb_pam_start(&pamh, user, NULL, pconv))
return NT_STATUS_ACCOUNT_DISABLED;
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_NOPROBLEMO)
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_OK)
DEBUG(0, ("smb_pam_accountcheck: PAM: Account Validation Failed - Rejecting User %s!\n", user));
smb_pam_end(pamh, pconv);
@ -824,19 +824,19 @@ uint32 smb_pam_passcheck(char * user, char * password)
if (!smb_pam_start(&pamh, user, NULL, pconv))
return NT_STATUS_LOGON_FAILURE;
if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_NOPROBLEMO) {
if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
}
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_NOPROBLEMO) {
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_account failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
}
if ((nt_status = smb_pam_setcred(pamh, user)) != NT_STATUS_NOPROBLEMO) {
if ((nt_status = smb_pam_setcred(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_setcred failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
@ -876,7 +876,7 @@ BOOL smb_pam_passchange(char * user, char * oldpassword, char * newpassword)
/* If PAM not used, no PAM restrictions on accounts. */
uint32 smb_pam_accountcheck(char * user)
{
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/* If PAM not used, also no PAM restrictions on sessions. */

View File

@ -599,7 +599,7 @@ static BOOL password_check(char *password)
{
#ifdef WITH_PAM
return (smb_pam_passcheck(this_user, password) == NT_STATUS_NOPROBLEMO);
return (smb_pam_passcheck(this_user, password) == NT_STATUS_OK);
#endif /* WITH_PAM */
#ifdef WITH_AFS

View File

@ -231,7 +231,7 @@ typedef struct nt_printer_info_level_2
uint32 default_priority;
uint32 starttime;
uint32 untiltime;
uint32 status;
NTSTATUS status;
uint32 cjobs;
uint32 averageppm;
fstring servername;

View File

@ -12,7 +12,6 @@
we start supporting NT error codes in Samba. They were extracted
using a loop in smbclient then printing a netmon sniff to a file */
#define NT_STATUS_NOPROBLEMO NT_STATUS(0x0)
#define NT_STATUS_OK NT_STATUS(0x0)
#define NT_STATUS_UNSUCCESSFUL NT_STATUS(0xC0000000 | 1)
#define NT_STATUS_NOT_IMPLEMENTED NT_STATUS(0xC0000000 | 2)

View File

@ -73,7 +73,7 @@ typedef struct r_brs_query_info_info
} info;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} BRS_R_QUERY_INFO;

View File

@ -161,7 +161,7 @@ typedef struct rpc_hdr_resp_info
/* RPC_HDR_FAULT - fault rpc header */
typedef struct rpc_hdr_fault_info
{
uint32 status;
NTSTATUS status;
uint32 reserved; /* 0x0000 0000 */
} RPC_HDR_FAULT;

View File

@ -55,7 +55,7 @@ DFS_Q_DFS_EXIST;
/* status == 1 if dfs exists. */
typedef struct dfs_r_dfs_exist
{
uint32 status;
NTSTATUS status;
}
DFS_R_DFS_EXIST;
@ -75,7 +75,7 @@ DFS_Q_DFS_ADD;
typedef struct dfs_r_dfs_add
{
uint32 status;
NTSTATUS status;
}
DFS_R_DFS_ADD;
@ -92,7 +92,7 @@ DFS_Q_DFS_REMOVE;
typedef struct dfs_r_dfs_remove
{
uint32 status;
NTSTATUS status;
}
DFS_R_DFS_REMOVE;
@ -173,7 +173,7 @@ typedef struct dfs_r_dfs_get_info
uint32 level;
uint32 ptr_ctr;
DFS_INFO_CTR ctr;
uint32 status;
NTSTATUS status;
}
DFS_R_DFS_GET_INFO;
@ -202,7 +202,7 @@ typedef struct dfs_r_dfs_enum
uint32 ptr_num_entries2;
uint32 num_entries2;
ENUM_HND reshnd;
uint32 status;
NTSTATUS status;
}
DFS_R_DFS_ENUM;

View File

@ -226,7 +226,7 @@ typedef struct net_r_logon_ctrl_info
NETLOGON_INFO_1 info1;
} logon;
uint32 status;
NTSTATUS status;
} NET_R_LOGON_CTRL;
/********************************************************
@ -269,7 +269,7 @@ typedef struct net_r_logon_ctrl2_info
} logon;
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_LOGON_CTRL2;
@ -288,7 +288,7 @@ typedef struct net_r_trust_dom_info
{
UNISTR2 uni_trust_dom_name[MAX_TRUST_DOMS];
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_TRUST_DOM_LIST;
@ -315,10 +315,8 @@ typedef struct net_q_req_chal_info
/* NET_R_REQ_CHAL */
typedef struct net_r_req_chal_info
{
DOM_CHAL srv_chal; /* server challenge */
uint32 status; /* return code */
DOM_CHAL srv_chal; /* server challenge */
NTSTATUS status; /* return code */
} NET_R_REQ_CHAL;
/* NET_Q_AUTH */
@ -332,7 +330,7 @@ typedef struct net_q_auth_info
typedef struct net_r_auth_info
{
DOM_CHAL srv_chal; /* server-calculated credentials */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_AUTH;
/* NET_Q_AUTH_2 */
@ -352,7 +350,7 @@ typedef struct net_r_auth2_info
DOM_CHAL srv_chal; /* server-calculated credentials */
NEG_FLAGS srv_flgs; /* usually 0x0000 01ff */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_AUTH_2;
@ -370,7 +368,7 @@ typedef struct net_r_srv_pwset_info
{
DOM_CRED srv_cred; /* server-calculated credentials */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_SRV_PWSET;
@ -459,7 +457,7 @@ typedef struct net_r_sam_logon_info
uint32 auth_resp; /* 1 - Authoritative response; 0 - Non-Auth? */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_SAM_LOGON;
@ -477,7 +475,7 @@ typedef struct net_r_sam_logoff_info
uint32 buffer_creds; /* undocumented buffer pointer */
DOM_CRED srv_creds; /* server credentials. server time stamp appears to be ignored. */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} NET_R_SAM_LOGOFF;

View File

@ -73,7 +73,7 @@ typedef struct q_reg_open_hkcr_info
typedef struct r_reg_open_hkcr_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_OPEN_HKCR;
@ -93,7 +93,7 @@ REG_Q_OPEN_HKLM;
typedef struct r_reg_open_hklm_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
}
REG_R_OPEN_HKLM;
@ -113,7 +113,7 @@ typedef struct q_reg_open_hku_info
typedef struct r_reg_open_hku_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_OPEN_HKU;
@ -128,7 +128,7 @@ typedef struct q_reg_open_flush_key_info
/* REG_R_FLUSH_KEY */
typedef struct r_reg_open_flush_key_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_FLUSH_KEY;
@ -149,7 +149,7 @@ typedef struct q_reg_set_key_sec_info
/* REG_R_SET_KEY_SEC */
typedef struct r_reg_set_key_sec_info
{
uint32 status;
NTSTATUS status;
} REG_R_SET_KEY_SEC;
@ -176,7 +176,7 @@ typedef struct r_reg_get_key_sec_info
BUFHDR hdr_sec; /* header for security data */
SEC_DESC_BUF *data; /* security data */
uint32 status;
NTSTATUS status;
} REG_R_GET_KEY_SEC;
@ -197,7 +197,7 @@ typedef struct q_reg_create_value_info
/* REG_R_CREATE_VALUE */
typedef struct r_reg_create_value_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_CREATE_VALUE;
@ -243,7 +243,7 @@ typedef struct r_reg_enum_value_info
uint32 ptr2; /* pointer */
uint32 len_value2; /* */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_ENUM_VALUE;
@ -279,7 +279,7 @@ typedef struct r_reg_create_key_info
POLICY_HND key_pol; /* policy handle */
uint32 unknown; /* 0x0000 0000 */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_CREATE_KEY;
@ -297,7 +297,7 @@ typedef struct r_reg_delete_key_info
{
POLICY_HND key_pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_DELETE_KEY;
@ -316,7 +316,7 @@ typedef struct r_reg_delete_val_info
{
POLICY_HND key_pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_DELETE_VALUE;
@ -344,7 +344,7 @@ typedef struct r_reg_query_key_info
uint32 sec_desc; /* 0x0000 0078 */
NTTIME mod_time; /* modified time */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_QUERY_KEY;
@ -360,7 +360,7 @@ typedef struct q_reg_unk_1a_info
typedef struct r_reg_unk_1a_info
{
uint32 unknown; /* 0x0500 0000 */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_UNK_1A;
@ -377,7 +377,7 @@ typedef struct reg_r_close_info
{
POLICY_HND pol; /* policy handle. should be all zeros. */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} REG_R_CLOSE;
@ -422,7 +422,7 @@ typedef struct r_reg_enum_key_info
uint32 ptr3; /* pointer */
NTTIME time; /* current time? */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_ENUM_KEY;
@ -466,7 +466,7 @@ typedef struct r_reg_info_info
uint32 ptr_len;
uint32 buf_len;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_INFO;
@ -490,7 +490,7 @@ typedef struct q_reg_open_entry_info
typedef struct r_reg_open_entry_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_OPEN_ENTRY;
@ -510,7 +510,7 @@ typedef struct q_reg_shutdown_info
/* REG_R_SHUTDOWN */
typedef struct r_reg_shutdown_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_SHUTDOWN;
@ -525,7 +525,7 @@ typedef struct q_reg_abort_shutdown_info
/* REG_R_ABORT_SHUTDOWN */
typedef struct r_reg_abort_shutdown_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} REG_R_ABORT_SHUTDOWN;

View File

@ -411,7 +411,7 @@ typedef struct q_samr_close_hnd_info
typedef struct r_samr_close_hnd_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_CLOSE_HND;
@ -438,7 +438,7 @@ typedef struct r_samr_usrdom_pwinfo_info
uint16 unknown_0; /* 0000 */
uint16 unknown_1; /* 0x0016 or 0x0015 */
uint32 unknown_2; /* 0x0000 0000 */
uint32 status;
NTSTATUS status;
} SAMR_R_GET_USRDOM_PWINFO;
@ -461,7 +461,7 @@ typedef struct r_samr_query_sec_obj_info
uint32 ptr;
SEC_DESC_BUF *buf;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_QUERY_SEC_OBJ;
@ -583,7 +583,7 @@ typedef struct r_samr_query_domain_info
SAM_UNK_CTR *ctr;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_QUERY_DOMAIN_INFO;
@ -605,7 +605,7 @@ typedef struct r_samr_lookup_domain_info
uint32 ptr_sid;
DOM_SID2 dom_sid;
uint32 status;
NTSTATUS status;
} SAMR_R_LOOKUP_DOMAIN;
@ -631,7 +631,7 @@ typedef struct q_samr_open_domain_info
typedef struct r_samr_open_domain_info
{
POLICY_HND domain_pol; /* policy handle associated with the SID */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_OPEN_DOMAIN;
@ -671,7 +671,7 @@ typedef struct r_samr_enum_domains_info
uint32 num_entries4;
uint32 status;
NTSTATUS status;
} SAMR_R_ENUM_DOMAINS;
@ -705,7 +705,7 @@ typedef struct r_samr_enum_dom_users_info
uint32 num_entries4;
uint32 status;
NTSTATUS status;
} SAMR_R_ENUM_DOM_USERS;
@ -739,7 +739,7 @@ typedef struct r_samr_enum_dom_groups_info
uint32 num_entries4;
uint32 status;
NTSTATUS status;
} SAMR_R_ENUM_DOM_GROUPS;
@ -773,7 +773,7 @@ typedef struct r_samr_enum_dom_aliases_info
uint32 num_entries4;
uint32 status;
NTSTATUS status;
} SAMR_R_ENUM_DOM_ALIASES;
@ -964,7 +964,7 @@ typedef struct r_samr_query_dispinfo_info
SAM_DISPINFO_CTR *ctr;
uint32 status;
NTSTATUS status;
} SAMR_R_QUERY_DISPINFO;
@ -981,7 +981,7 @@ typedef struct q_samr_delete_dom_group_info
typedef struct r_samr_delete_dom_group_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_DELETE_DOM_GROUP;
@ -1004,7 +1004,7 @@ typedef struct r_samr_create_dom_group_info
POLICY_HND pol; /* policy handle */
uint32 rid;
uint32 status;
NTSTATUS status;
} SAMR_R_CREATE_DOM_GROUP;
@ -1059,7 +1059,7 @@ typedef struct r_samr_query_groupinfo_info
uint32 ptr;
GROUP_INFO_CTR *ctr;
uint32 status;
NTSTATUS status;
} SAMR_R_QUERY_GROUPINFO;
@ -1075,7 +1075,7 @@ typedef struct q_samr_set_group_info
/* SAMR_R_SET_GROUPINFO - SAM Group Info */
typedef struct r_samr_set_group_info
{
uint32 status;
NTSTATUS status;
} SAMR_R_SET_GROUPINFO;
@ -1092,7 +1092,7 @@ typedef struct q_samr_delete_dom_alias_info
typedef struct r_samr_delete_dom_alias_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_DELETE_DOM_ALIAS;
@ -1115,7 +1115,7 @@ typedef struct r_samr_create_dom_alias_info
POLICY_HND alias_pol; /* policy handle */
uint32 rid;
uint32 status;
NTSTATUS status;
} SAMR_R_CREATE_DOM_ALIAS;
@ -1155,7 +1155,7 @@ typedef struct r_samr_query_aliasinfo_info
uint32 ptr;
ALIAS_INFO_CTR ctr;
uint32 status;
NTSTATUS status;
} SAMR_R_QUERY_ALIASINFO;
@ -1171,7 +1171,7 @@ typedef struct q_samr_set_alias_info
/* SAMR_R_SET_ALIASINFO - SAM alias info */
typedef struct r_samr_set_aliasinfo_info
{
uint32 status;
NTSTATUS status;
} SAMR_R_SET_ALIASINFO;
@ -1193,7 +1193,7 @@ typedef struct r_samr_query_usergroup_info
DOM_GID *gid; /* group info */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_QUERY_USERGROUPS;
@ -1232,7 +1232,7 @@ typedef struct q_samr_set_user_info2
/* SAMR_R_SET_USERINFO2 - set sam info */
typedef struct r_samr_set_user_info2
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_SET_USERINFO2;
@ -1248,7 +1248,7 @@ typedef struct q_samr_set_user_info
/* SAMR_R_SET_USERINFO - set sam info */
typedef struct r_samr_set_user_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_SET_USERINFO;
@ -1267,7 +1267,7 @@ typedef struct r_samr_query_user_info
uint32 ptr; /* pointer */
SAM_USERINFO_CTR *ctr;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_QUERY_USERINFO;
@ -1303,7 +1303,7 @@ typedef struct r_samr_query_useraliases_info
uint32 num_entries2;
uint32 *rid; /* domain RIDs being looked up */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} SAMR_R_QUERY_USERALIASES;
@ -1342,7 +1342,7 @@ typedef struct r_samr_lookup_names_info
uint32 *types; /* SID_ENUM type */
uint32 status; /* return code */
NTSTATUS status; /* return code */
} SAMR_R_LOOKUP_NAMES;
@ -1387,7 +1387,7 @@ typedef struct r_samr_lookup_rids_info
uint32 *type; /* SID_ENUM type */
uint32 status;
NTSTATUS status;
} SAMR_R_LOOKUP_RIDS;
@ -1406,7 +1406,7 @@ typedef struct q_samr_open_user_info
typedef struct r_samr_open_user_info
{
POLICY_HND user_pol; /* policy handle associated with unknown id */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_OPEN_USER;
@ -1432,7 +1432,7 @@ typedef struct r_samr_create_user_info
uint32 unknown_0; /* 0x0007 03ff */
uint32 user_rid; /* user RID */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_CREATE_USER;
@ -1449,7 +1449,7 @@ typedef struct q_samr_delete_dom_user_info
typedef struct r_samr_delete_dom_user_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_DELETE_DOM_USER;
@ -1477,7 +1477,7 @@ typedef struct r_samr_query_groupmem_info
uint32 num_attrs;
uint32 *attr;
uint32 status;
NTSTATUS status;
} SAMR_R_QUERY_GROUPMEM;
@ -1495,7 +1495,7 @@ typedef struct q_samr_del_group_mem_info
/* SAMR_R_DEL_GROUPMEM - probably an del group member */
typedef struct r_samr_del_group_mem_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_DEL_GROUPMEM;
@ -1514,7 +1514,7 @@ typedef struct q_samr_add_group_mem_info
/* SAMR_R_ADD_GROUPMEM - probably an add group member */
typedef struct r_samr_add_group_mem_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_ADD_GROUPMEM;
@ -1533,7 +1533,7 @@ typedef struct q_samr_open_group_info
typedef struct r_samr_open_group_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_OPEN_GROUP;
@ -1555,7 +1555,7 @@ typedef struct r_samr_query_aliasmem_info
DOM_SID2 *sid;
uint32 status;
NTSTATUS status;
} SAMR_R_QUERY_ALIASMEM;
@ -1573,7 +1573,7 @@ typedef struct q_samr_add_alias_mem_info
/* SAMR_R_ADD_ALIASMEM - add alias member */
typedef struct r_samr_add_alias_mem_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_ADD_ALIASMEM;
@ -1591,7 +1591,7 @@ typedef struct q_samr_del_alias_mem_info
/* SAMR_R_DEL_ALIASMEM - delete alias member */
typedef struct r_samr_del_alias_mem_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_DEL_ALIASMEM;
@ -1612,7 +1612,7 @@ typedef struct q_samr_open_alias_info
typedef struct r_samr_open_alias_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_OPEN_ALIAS;
@ -1631,7 +1631,7 @@ typedef struct q_samr_connect_anon_info
typedef struct r_samr_connect_anon_info
{
POLICY_HND connect_pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_CONNECT_ANON;
@ -1650,7 +1650,7 @@ typedef struct q_samr_connect_info
typedef struct r_samr_connect_info
{
POLICY_HND connect_pol; /* policy handle */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_CONNECT;
@ -1669,7 +1669,7 @@ typedef struct r_samr_get_dom_pwinfo
uint16 unk_0;
uint16 unk_1;
uint16 unk_2;
uint32 status;
NTSTATUS status;
} SAMR_R_GET_DOM_PWINFO;
@ -1713,7 +1713,7 @@ typedef struct q_samr_chgpasswd_user_info
/* SAMR_R_CHGPASSWD_USER */
typedef struct r_samr_chgpasswd_user_info
{
uint32 status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
} SAMR_R_CHGPASSWD_USER;
@ -1730,7 +1730,7 @@ typedef struct q_samr_unknown_2d_info
/* SAMR_R_UNKNOWN_2D - probably an open */
typedef struct r_samr_unknown_2d_info
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SAMR_R_UNKNOWN_2D;

View File

@ -460,7 +460,7 @@ SPOOL_Q_OPEN_PRINTER_EX;
typedef struct spool_r_open_printer_ex
{
POLICY_HND handle; /* handle used along all transactions (20*uint8) */
uint32 status;
NTSTATUS status;
}
SPOOL_R_OPEN_PRINTER_EX;
@ -523,7 +523,7 @@ typedef struct spool_r_getprinterdata
uint32 size;
uint8 *data;
uint32 needed;
uint32 status;
NTSTATUS status;
}
SPOOL_R_GETPRINTERDATA;
@ -536,7 +536,7 @@ SPOOL_Q_DELETEPRINTERDATA;
typedef struct spool_r_deleteprinterdata
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_DELETEPRINTERDATA;
@ -549,7 +549,7 @@ SPOOL_Q_CLOSEPRINTER;
typedef struct spool_r_closeprinter
{
POLICY_HND handle;
uint32 status;
NTSTATUS status;
}
SPOOL_R_CLOSEPRINTER;
@ -561,7 +561,7 @@ SPOOL_Q_STARTPAGEPRINTER;
typedef struct spool_r_startpageprinter
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_STARTPAGEPRINTER;
@ -573,7 +573,7 @@ SPOOL_Q_ENDPAGEPRINTER;
typedef struct spool_r_endpageprinter
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENDPAGEPRINTER;
@ -589,7 +589,7 @@ SPOOL_Q_DELETEPRINTERDRIVER;
typedef struct spool_r_deleteprinterdriver
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_DELETEPRINTERDRIVER;
@ -629,7 +629,7 @@ SPOOL_Q_STARTDOCPRINTER;
typedef struct spool_r_startdocprinter
{
uint32 jobid;
uint32 status;
NTSTATUS status;
}
SPOOL_R_STARTDOCPRINTER;
@ -641,7 +641,7 @@ SPOOL_Q_ENDDOCPRINTER;
typedef struct spool_r_enddocprinter
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENDDOCPRINTER;
@ -657,7 +657,7 @@ SPOOL_Q_WRITEPRINTER;
typedef struct spool_r_writeprinter
{
uint32 buffer_written;
uint32 status;
NTSTATUS status;
}
SPOOL_R_WRITEPRINTER;
@ -718,7 +718,7 @@ SPOOL_Q_RFFPCNEX;
typedef struct spool_r_rffpcnex
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_RFFPCNEX;
@ -736,7 +736,7 @@ typedef struct spool_r_rfnpcnex
{
uint32 info_ptr;
SPOOL_NOTIFY_INFO info;
uint32 status;
NTSTATUS status;
}
SPOOL_R_RFNPCNEX;
@ -749,7 +749,7 @@ SPOOL_Q_FCPN;
typedef struct spool_r_fcpn
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_FCPN;
@ -789,7 +789,7 @@ typedef struct printer_info_0
uint32 unknown16;
uint32 change_id;
uint32 unknown18;
uint32 status;
NTSTATUS status;
uint32 unknown20;
uint32 c_setprinter;
@ -832,7 +832,7 @@ typedef struct printer_info_2
uint32 defaultpriority;
uint32 starttime;
uint32 untiltime;
uint32 status;
NTSTATUS status;
uint32 cjobs;
uint32 averageppm;
}
@ -870,7 +870,7 @@ typedef struct spool_r_enumprinters
NEW_BUFFER *buffer;
uint32 needed; /* bytes needed */
uint32 returned; /* number of printers */
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPRINTERS;
@ -899,7 +899,7 @@ typedef struct spool_r_getprinter
{
NEW_BUFFER *buffer;
uint32 needed;
uint32 status;
NTSTATUS status;
} SPOOL_R_GETPRINTER;
typedef struct driver_info_1
@ -984,7 +984,7 @@ typedef struct spool_r_getprinterdriver2
uint32 needed;
uint32 servermajorversion;
uint32 serverminorversion;
uint32 status;
NTSTATUS status;
}
SPOOL_R_GETPRINTERDRIVER2;
@ -1010,7 +1010,7 @@ typedef struct spool_r_addjob
{
NEW_BUFFER *buffer;
uint32 needed;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ADDJOB;
@ -1042,7 +1042,7 @@ typedef struct s_job_info_1
UNISTR document;
UNISTR datatype;
UNISTR text_status;
uint32 status;
NTSTATUS status;
uint32 priority;
uint32 position;
uint32 totalpages;
@ -1066,7 +1066,7 @@ typedef struct s_job_info_2
DEVICEMODE *devmode;
UNISTR text_status;
/* SEC_DESC sec_desc;*/
uint32 status;
NTSTATUS status;
uint32 priority;
uint32 position;
uint32 starttime;
@ -1106,7 +1106,7 @@ typedef struct spool_r_enumjobs
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMJOBS;
@ -1119,7 +1119,7 @@ SPOOL_Q_SCHEDULEJOB;
typedef struct spool_r_schedulejob
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_SCHEDULEJOB;
@ -1166,7 +1166,7 @@ typedef struct spool_r_enumports
NEW_BUFFER *buffer;
uint32 needed; /* bytes needed */
uint32 returned; /* number of printers */
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPORTS;
@ -1201,7 +1201,7 @@ SPOOL_Q_SETJOB;
typedef struct spool_r_setjob
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_SETJOB;
@ -1223,7 +1223,7 @@ typedef struct spool_r_enumprinterdrivers
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPRINTERDRIVERS;
@ -1254,7 +1254,7 @@ typedef struct spool_r_enumforms
NEW_BUFFER *buffer;
uint32 needed;
uint32 numofforms;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMFORMS;
@ -1272,7 +1272,7 @@ typedef struct spool_r_getform
{
NEW_BUFFER *buffer;
uint32 needed;
uint32 status;
NTSTATUS status;
}
SPOOL_R_GETFORM;
@ -1307,7 +1307,7 @@ typedef struct spool_printer_info_level_2
uint32 default_priority;
uint32 starttime;
uint32 untiltime;
uint32 status;
NTSTATUS status;
uint32 cjobs;
uint32 averageppm;
UNISTR2 servername;
@ -1454,7 +1454,7 @@ SPOOL_Q_SETPRINTER;
typedef struct spool_r_setprinter
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_SETPRINTER;
@ -1474,7 +1474,7 @@ SPOOL_Q_ADDPRINTER;
typedef struct spool_r_addprinter
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ADDPRINTER;
@ -1487,7 +1487,7 @@ SPOOL_Q_DELETEPRINTER;
typedef struct spool_r_deleteprinter
{
POLICY_HND handle;
uint32 status;
NTSTATUS status;
}
SPOOL_R_DELETEPRINTER;
@ -1499,7 +1499,7 @@ SPOOL_Q_ABORTPRINTER;
typedef struct spool_r_abortprinter
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ABORTPRINTER;
@ -1522,7 +1522,7 @@ SPOOL_Q_ADDPRINTEREX;
typedef struct spool_r_addprinterex
{
POLICY_HND handle;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ADDPRINTEREX;
@ -1538,7 +1538,7 @@ SPOOL_Q_ADDPRINTERDRIVER;
typedef struct spool_r_addprinterdriver
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ADDPRINTERDRIVER;
@ -1571,7 +1571,7 @@ typedef struct spool_r_getprinterdriverdirectory
{
NEW_BUFFER *buffer;
uint32 needed;
uint32 status;
NTSTATUS status;
}
SPOOL_R_GETPRINTERDRIVERDIR;
@ -1587,7 +1587,7 @@ SPOOL_Q_ADDPRINTPROCESSOR;
typedef struct spool_r_addprintprocessor
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ADDPRINTPROCESSOR;
@ -1615,7 +1615,7 @@ typedef struct spool_r_enumprintprocessors
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPRINTPROCESSORS;
@ -1642,7 +1642,7 @@ typedef struct spool_r_enumprintprocdatatypes
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPRINTPROCDATATYPES;
@ -1675,7 +1675,7 @@ typedef struct spool_r_enumprintmonitors
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPRINTMONITORS;
@ -1698,7 +1698,7 @@ typedef struct spool_r_enumprinterdata
uint32 datasize;
uint8 *data;
uint32 realdatasize;
uint32 status;
NTSTATUS status;
}
SPOOL_R_ENUMPRINTERDATA;
@ -1716,7 +1716,7 @@ SPOOL_Q_SETPRINTERDATA;
typedef struct spool_r_setprinterdata
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_SETPRINTERDATA;
@ -1745,7 +1745,7 @@ SPOOL_Q_ADDFORM;
typedef struct spool_r_addform
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_ADDFORM;
@ -1761,7 +1761,7 @@ SPOOL_Q_SETFORM;
typedef struct spool_r_setform
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_SETFORM;
@ -1774,7 +1774,7 @@ SPOOL_Q_DELETEFORM;
typedef struct spool_r_deleteform
{
uint32 status;
NTSTATUS status;
}
SPOOL_R_DELETEFORM;
@ -1805,7 +1805,7 @@ typedef struct spool_r_getjob
{
NEW_BUFFER *buffer;
uint32 needed;
uint32 status;
NTSTATUS status;
}
SPOOL_R_GETJOB;
@ -1822,7 +1822,7 @@ SPOOL_Q_REPLYOPENPRINTER;
typedef struct spool_r_replyopenprinter
{
POLICY_HND handle;
uint32 status;
NTSTATUS status;
}
SPOOL_R_REPLYOPENPRINTER;
@ -1835,7 +1835,7 @@ SPOOL_Q_REPLYCLOSEPRINTER;
typedef struct spool_r_replycloseprinter
{
POLICY_HND handle;
uint32 status;
NTSTATUS status;
}
SPOOL_R_REPLYCLOSEPRINTER;
@ -1854,7 +1854,7 @@ SPOOL_Q_REPLY_RRPCN;
typedef struct spool_r_rrpcn
{
uint32 unknown0;
uint32 status;
NTSTATUS status;
}
SPOOL_R_REPLY_RRPCN;

View File

@ -67,7 +67,7 @@ typedef struct net_srv_disk_enum {
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
typedef struct net_name_validate {
@ -76,7 +76,7 @@ typedef struct net_name_validate {
UNISTR2 uni_name; /*name to validate*/
uint32 type;
uint32 flags;
uint32 status;
NTSTATUS status;
} SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE;
/* SESS_INFO_0 (pointers to level 0 session info strings) */
@ -185,7 +185,7 @@ typedef struct r_net_sess_enum_info
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SESS_ENUM;
@ -288,7 +288,7 @@ typedef struct r_net_conn_enum_info
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_CONN_ENUM;
@ -444,7 +444,7 @@ typedef struct r_net_share_enum_info
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SHARE_ENUM;
@ -480,7 +480,7 @@ typedef struct srv_share_info {
typedef struct r_net_share_get_info_info
{
SRV_SHARE_INFO info;
uint32 status;
NTSTATUS status;
} SRV_R_NET_SHARE_GET_INFO;
@ -502,7 +502,7 @@ typedef struct r_net_share_set_info
{
uint32 switch_value; /* switch value */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SHARE_SET_INFO;
@ -523,7 +523,7 @@ typedef struct r_net_share_add
{
uint32 switch_value; /* switch value */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SHARE_ADD;
@ -539,7 +539,7 @@ typedef struct q_net_share_del
/* SRV_R_NET_SHARE_DEL */
typedef struct r_net_share_del
{
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SHARE_DEL;
@ -622,7 +622,7 @@ typedef struct r_net_file_enum_info
uint32 total_entries; /* total number of files */
ENUM_HND enum_hnd;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_FILE_ENUM;
@ -704,7 +704,7 @@ typedef struct r_net_srv_get_info
{
SRV_INFO_CTR *ctr;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SRV_GET_INFO;
@ -725,7 +725,7 @@ typedef struct r_net_srv_set_info
{
uint32 switch_value; /* switch value */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_SRV_SET_INFO;
@ -761,7 +761,7 @@ typedef struct r_net_remote_tod
uint32 ptr_srv_tod; /* pointer to TOD */
TIME_OF_DAY_INFO *tod;
uint32 status; /* return status */
NTSTATUS status; /* return status */
} SRV_R_NET_REMOTE_TOD;
@ -786,7 +786,7 @@ typedef struct r_net_file_query_secdesc
uint32 ptr_secdesc;
uint32 size_secdesc;
SEC_DESC *sec_desc;
uint32 status;
NTSTATUS status;
} SRV_R_NET_FILE_QUERY_SECDESC;
/* SRV_Q_NET_FILE_SET_SECDESC */
@ -807,6 +807,6 @@ typedef struct q_net_file_set_secdesc
/* SRV_R_NET_FILE_SET_SECDESC */
typedef struct r_net_file_set_secdesc
{
uint32 status;
NTSTATUS status;
} SRV_R_NET_FILE_SET_SECDESC;
#endif /* _RPC_SRVSVC_H */

View File

@ -64,7 +64,7 @@ typedef struct r_wks_query_info_info
uint32 ptr_1; /* pointer 1 */
WKS_INFO_100 *wks100; /* workstation info level 100 */
uint32 status; /* return status */
NTSTATUS status; /* return status */
} WKS_R_QUERY_INFO;

View File

@ -207,7 +207,7 @@ typedef struct nttime_info
uint32 high;
} NTTIME;
#ifdef __GNUC__XX
#ifdef __GNUC__XX_NOT_YET
typedef struct {uint32 v;} NTSTATUS;
#define NT_STATUS(x) ((NTSTATUS) { x })
#define NT_STATUS_V(x) ((x).v)
@ -218,7 +218,7 @@ typedef uint32 NTSTATUS;
#endif
#define NT_STATUS_IS_OK(x) (NT_STATUS_V(x) == 0)
#define NT_STATUS_IS_ERR(x) (NT_STATUS_V(x) & 0xc0000000)
#define NT_STATUS_IS_ERR(x) ((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000)
/* Allowable account control bits */
#define ACB_DISABLED 0x0001 /* 1 = User account disabled */

View File

@ -314,7 +314,7 @@ static uint32 cmd_set_options = 0xffffffff;
****************************************************************************/
static uint32 do_command(struct client_info *info, char *line)
{
uint32 status = 0x0;
NTSTATUS status = 0x0;
int i;
if (!get_cmd_args(line))
@ -355,7 +355,7 @@ static uint32 do_command(struct client_info *info, char *line)
****************************************************************************/
static uint32 process(struct client_info *info, char *cmd_str)
{
uint32 status = 0;
NTSTATUS status = 0;
pstring line;
char *cmd = cmd_str;
@ -1286,7 +1286,7 @@ static void readline_init(void)
****************************************************************************/
int command_main(int argc, char *argv[])
{
uint32 status;
NTSTATUS status;
mode_t myumask = 0755;
char progname[255], path[255], *s;
pstring msg;

View File

@ -157,7 +157,7 @@ static BOOL get_max_access( SEC_ACL *the_acl, NT_USER_TOKEN *token, uint32 *gran
*/
*granted = acc_granted;
*status = NT_STATUS_NOPROBLEMO;
*status = NT_STATUS_OK;
return True;
}
@ -218,7 +218,7 @@ BOOL se_access_check(SEC_DESC *sd, struct current_user *user,
if (!status || !acc_granted)
return False;
*status = NT_STATUS_NOPROBLEMO;
*status = NT_STATUS_OK;
*acc_granted = 0;
DEBUG(10,("se_access_check: requested access %x, for uid %u\n",
@ -232,7 +232,7 @@ BOOL se_access_check(SEC_DESC *sd, struct current_user *user,
/* ACL must have something in it */
if (!sd || (sd && (!(sd->type & SEC_DESC_DACL_PRESENT) || sd->dacl == NULL))) {
*status = NT_STATUS_NOPROBLEMO;
*status = NT_STATUS_OK;
*acc_granted = acc_desired;
DEBUG(5, ("se_access_check: no sd or blank DACL, access allowed\n"));
return True;
@ -295,7 +295,7 @@ BOOL se_access_check(SEC_DESC *sd, struct current_user *user,
if (tmp_acc_desired == 0) {
*acc_granted = acc_desired;
*status = NT_STATUS_NOPROBLEMO;
*status = NT_STATUS_OK;
DEBUG(5,("se_access_check: access (%x) granted.\n", (unsigned int)acc_desired ));
return True;
}

View File

@ -807,7 +807,7 @@ int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL reb
if( setsockopt(res,SOL_SOCKET,SO_REUSEADDR,(char *)&val,sizeof(val)) == -1 ) {
if( DEBUGLVL( dlevel ) ) {
dbgtext( "open_socket_in(): setsockopt: " );
dbgtext( "SO_REUSEADDR = %d ", val?"True":"False" );
dbgtext( "SO_REUSEADDR = %s ", val?"True":"False" );
dbgtext( "on port %d failed ", port );
dbgtext( "with error = %s\n", strerror(errno) );
}

View File

@ -66,7 +66,7 @@ uint32 cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx,
*dfs_exists = (r.status == 1);
result = NT_STATUS_NOPROBLEMO;
result = NT_STATUS_OK;
done:
prs_mem_free(&qbuf);

View File

@ -78,7 +78,7 @@ uint32 cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*pol = r.pol;
}
@ -136,7 +136,7 @@ uint32 cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*pol = r.pol;
}
@ -184,7 +184,7 @@ uint32 cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*pol = r.pol;
}
@ -242,7 +242,7 @@ uint32 cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
if (result != NT_STATUS_NOPROBLEMO && result != 0x00000107 &&
if (result != NT_STATUS_OK && result != 0x00000107 &&
result != (0xC0000000 | NT_STATUS_NONE_MAPPED)) {
/* An actual error occured */
@ -250,7 +250,7 @@ uint32 cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
result = NT_STATUS_NOPROBLEMO;
result = NT_STATUS_OK;
/* Return output parameters */
@ -347,7 +347,7 @@ uint32 cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
if (result != NT_STATUS_NOPROBLEMO &&
if (result != NT_STATUS_OK &&
result != (0xC0000000 | NT_STATUS_NONE_MAPPED)) {
/* An actual error occured */
@ -355,7 +355,7 @@ uint32 cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
result = NT_STATUS_NOPROBLEMO;
result = NT_STATUS_OK;
/* Return output parameters */
@ -441,7 +441,7 @@ uint32 cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -536,7 +536,7 @@ uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx,
0x8000001a (NT_STATUS_UNABLE_TO_FREE_VM) so we ignore it and
pretend everything is OK. */
if (result != NT_STATUS_NOPROBLEMO &&
if (result != NT_STATUS_OK &&
result != NT_STATUS_UNABLE_TO_FREE_VM) {
/* An actual error ocured */
@ -544,7 +544,7 @@ uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
result = NT_STATUS_NOPROBLEMO;
result = NT_STATUS_OK;
/* Return output parameters */

View File

@ -68,7 +68,7 @@ uint32 cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*connect_pol = r.connect_pol;
}
@ -114,7 +114,7 @@ uint32 cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*connect_pol = r.pol;
}
@ -161,7 +161,7 @@ uint32 cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*domain_pol = r.domain_pol;
}
@ -208,7 +208,7 @@ uint32 cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*user_pol = r.user_pol;
}
@ -255,7 +255,7 @@ uint32 cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*group_pol = r.pol;
}
@ -395,7 +395,7 @@ uint32 cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*num_groups = r.num_entries;
*gid = r.gid;
}
@ -443,7 +443,7 @@ uint32 cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*num_mem = r.num_entries;
*rid = r.rid;
*attr = r.attr;
@ -495,7 +495,7 @@ uint32 cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
if (result != NT_STATUS_NOPROBLEMO &&
if (result != NT_STATUS_OK &&
result != STATUS_MORE_ENTRIES) {
goto done;
}
@ -569,7 +569,7 @@ uint32 cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -629,7 +629,7 @@ uint32 cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*alias_pol = r.pol;
}
@ -678,7 +678,7 @@ uint32 cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -731,7 +731,7 @@ uint32 cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
if (result != NT_STATUS_NOPROBLEMO &&
if (result != NT_STATUS_OK &&
result != STATUS_MORE_ENTRIES) {
goto done;
}
@ -791,7 +791,7 @@ uint32 cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -859,7 +859,7 @@ uint32 cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -921,7 +921,7 @@ uint32 cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -977,7 +977,7 @@ uint32 cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}
@ -1024,7 +1024,7 @@ uint32 cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
if ((result = r.status) != NT_STATUS_OK) {
goto done;
}

View File

@ -84,7 +84,7 @@ uint32 cli_spoolss_open_printer_ex(
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*pol = r.handle;
}
@ -137,7 +137,7 @@ uint32 cli_spoolss_close_printer(
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
*pol = r.handle;
}
@ -429,7 +429,7 @@ uint32 cli_spoolss_enum_printers(
/* Return output parameters */
if (((result=r.status) == NT_STATUS_NOPROBLEMO) && (*returned = r.returned))
if (((result=r.status) == NT_STATUS_OK) && (*returned = r.returned))
{
switch (level) {
@ -505,7 +505,7 @@ uint32 cli_spoolss_enum_ports(
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO &&
if ((result = r.status) == NT_STATUS_OK &&
r.returned > 0) {
*returned = r.returned;
@ -574,7 +574,7 @@ uint32 cli_spoolss_getprinter(
}
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
if ((result = r.status) == NT_STATUS_OK) {
switch (level) {
case 0:
@ -705,7 +705,7 @@ uint32 cli_spoolss_getprinterdriver (
}
/* Return output parameters */
if ((result = r.status) == NT_STATUS_NOPROBLEMO)
if ((result = r.status) == NT_STATUS_OK)
{
switch (level)
@ -784,7 +784,7 @@ uint32 cli_spoolss_enumprinterdrivers (
}
/* Return output parameters */
if (((result=r.status) == NT_STATUS_NOPROBLEMO) &&
if (((result=r.status) == NT_STATUS_OK) &&
(r.returned != 0))
{
*returned = r.returned;
@ -865,7 +865,7 @@ uint32 cli_spoolss_getprinterdriverdir (
}
/* Return output parameters */
if ((result=r.status) == NT_STATUS_NOPROBLEMO)
if ((result=r.status) == NT_STATUS_OK)
{
switch (level)
{

View File

@ -269,7 +269,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli,
use it, otherwise figure out a server from the 'password server' param.
************************************************************************/
uint32 domain_client_validate(const auth_usersupplied_info *user_info,
NTSTATUS domain_client_validate(const auth_usersupplied_info *user_info,
auth_serversupplied_info *server_info,
char *server, unsigned char *trust_passwd,
time_t last_change_time)
@ -280,7 +280,7 @@ uint32 domain_client_validate(const auth_usersupplied_info *user_info,
struct cli_state cli;
uint32 smb_uid_low;
BOOL connected_ok = False;
uint32 status;
NTSTATUS status;
/*
* Check that the requested domain is not our own machine name.
@ -325,14 +325,14 @@ uint32 domain_client_validate(const auth_usersupplied_info *user_info,
if ((status = cli_nt_login_network(&cli, user_info, smb_uid_low,
&ctr, &info3))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
DEBUG(0,("domain_client_validate: unable to validate password "
"for user %s in domain %s to Domain controller %s. "
"Error was %s.\n", user_info->smb_username.str,
user_info->domain.str, remote_machine,
get_nt_error_msg(status)));
} else {
status = NT_STATUS_NOPROBLEMO;
status = NT_STATUS_OK;
}
/*
@ -346,7 +346,7 @@ uint32 domain_client_validate(const auth_usersupplied_info *user_info,
* send here. JRA.
*/
if (status == NT_STATUS_NOPROBLMO) {
if (NT_STATUS_IS_OK(status)) {
if(cli_nt_logoff(&cli, &ctr) == False) {
DEBUG(0,("domain_client_validate: unable to log off user %s in domain \
%s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, cli_errstr(&cli)));

View File

@ -574,7 +574,7 @@ static struct {
{ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_FILE},
{ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND},
{ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES},
{ERRDOS, ERRnoaccess, NT_STATUS_INVALID_LOCK_SEQUENCE},
{ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED},
{ERRDOS, ERRbadfid, NT_STATUS_INVALID_HANDLE},
{ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES},
{ERRDOS, ERRbadaccess, NT_STATUS_INVALID_LOCK_SEQUENCE},

View File

@ -207,7 +207,7 @@ int smbc_errno(struct cli_state *c)
DEBUG(3,("smbc_error %d %d (0x%x) -> %d\n",
(int)eclass, (int)ecode, (int)ecode, ret));
} else {
uint32 status;
NTSTATUS status;
status = cli_nt_error(c);
ret = cli_errno_from_nt(status);

View File

@ -143,7 +143,7 @@ NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
if (!ok) return NT_STATUS_FILE_LOCK_CONFLICT;
return NT_STATUS_NOPROBLEMO; /* Got lock */
return NT_STATUS_OK; /* Got lock */
}
/****************************************************************************

View File

@ -79,13 +79,13 @@ BOOL wb_lsa_open_policy(char *server, BOOL sec_qos, uint32 des_access,
des_access, &pol->handle);
done:
if (result != NT_STATUS_NOPROBLEMO && pol->cli) {
if (result != NT_STATUS_OK && pol->cli) {
if (pol->cli->initialised)
cli_shutdown(pol->cli);
free(pol->cli);
}
return (result == NT_STATUS_NOPROBLEMO);
return (result == NT_STATUS_OK);
}
/****************************************************************************
@ -99,7 +99,7 @@ BOOL wb_lsa_enum_trust_dom(CLI_POLICY_HND *hnd, uint32 *enum_ctx,
ret = cli_lsa_enum_trust_dom(hnd->cli, hnd->mem_ctx, &hnd->handle,
enum_ctx, num_doms, names, sids);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
/****************************************************************************
@ -113,7 +113,7 @@ BOOL wb_lsa_query_info_pol(CLI_POLICY_HND *hnd, uint16 info_class,
ret = cli_lsa_query_info_policy(hnd->cli, hnd->mem_ctx, &hnd->handle,
info_class, domain_name, domain_sid);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
/****************************************************************************
@ -127,7 +127,7 @@ BOOL wb_lsa_lookup_names(CLI_POLICY_HND *hnd, int num_names, char **names,
ret = cli_lsa_lookup_names(hnd->cli, hnd->mem_ctx, &hnd->handle,
num_names, names, sids, types, num_sids);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
/****************************************************************************
@ -141,7 +141,7 @@ BOOL wb_lsa_lookup_sids(CLI_POLICY_HND *hnd, int num_sids, DOM_SID *sids,
ret = cli_lsa_lookup_sids(hnd->cli, hnd->mem_ctx, &hnd->handle,
num_sids, sids, names, types, num_names);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
/****************************************************************************
@ -153,7 +153,7 @@ BOOL wb_lsa_close(CLI_POLICY_HND *hnd)
ret = cli_lsa_close(hnd->cli, hnd->mem_ctx, &hnd->handle);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
@ -166,7 +166,7 @@ BOOL wb_samr_close(CLI_POLICY_HND *hnd)
ret = cli_samr_close(hnd->cli, hnd->mem_ctx, &hnd->handle);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
@ -225,13 +225,13 @@ BOOL wb_samr_connect(char *server, uint32 access_mask, CLI_POLICY_HND *pol)
access_mask, &pol->handle);
done:
if (result != NT_STATUS_NOPROBLEMO && pol->cli) {
if (result != NT_STATUS_OK && pol->cli) {
if (pol->cli->initialised)
cli_shutdown(pol->cli);
free(pol->cli);
}
return (result == NT_STATUS_NOPROBLEMO);
return (result == NT_STATUS_OK);
}
@ -250,7 +250,7 @@ BOOL wb_samr_open_domain(CLI_POLICY_HND *connect_pol, uint32 ace_perms,
sid,
&domain_pol->handle);
if (ret == NT_STATUS_NOPROBLEMO) {
if (ret == NT_STATUS_OK) {
domain_pol->cli = connect_pol->cli;
domain_pol->mem_ctx = connect_pol->mem_ctx;
return True;
@ -271,7 +271,7 @@ uint32 wb_samr_enum_dom_groups(CLI_POLICY_HND *pol, uint32 *start_idx,
ret = cli_samr_enum_dom_groups(pol->cli, pol->mem_ctx, &pol->handle,
start_idx, size, sam, num_sam_groups);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
/****************************************************************************
@ -287,20 +287,20 @@ BOOL wb_get_samr_query_userinfo(CLI_POLICY_HND *pol, uint32 info_level,
if ((result = cli_samr_open_user(pol->cli, pol->mem_ctx,
&pol->handle, MAXIMUM_ALLOWED_ACCESS,
user_rid, &user_pol))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
goto done;
got_user_pol = True;
if ((result = cli_samr_query_userinfo(pol->cli, pol->mem_ctx,
&user_pol, info_level, ctr))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
goto done;
done:
if (got_user_pol) cli_samr_close(pol->cli, pol->mem_ctx, &user_pol);
return (result == NT_STATUS_NOPROBLEMO);
return (result == NT_STATUS_OK);
}
/****************************************************************************
@ -314,7 +314,7 @@ BOOL wb_samr_open_user(CLI_POLICY_HND *pol, uint32 access_mask, uint32 rid,
ret = cli_samr_open_user(pol->cli, pol->mem_ctx, &pol->handle,
access_mask, rid, user_pol);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
BOOL wb_samr_query_usergroups(CLI_POLICY_HND *pol, uint32 *num_groups,
@ -325,7 +325,7 @@ BOOL wb_samr_query_usergroups(CLI_POLICY_HND *pol, uint32 *num_groups,
ret = cli_samr_query_usergroups(pol->cli, pol->mem_ctx, &pol->handle,
num_groups, gid);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
BOOL wb_get_samr_query_groupinfo(CLI_POLICY_HND *pol, uint32 info_level,
@ -338,20 +338,20 @@ BOOL wb_get_samr_query_groupinfo(CLI_POLICY_HND *pol, uint32 info_level,
if ((result = cli_samr_open_group(pol->cli, pol->mem_ctx,
&pol->handle, MAXIMUM_ALLOWED_ACCESS,
group_rid, &group_pol))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
goto done;
got_group_pol = True;
if ((result = cli_samr_query_groupinfo(pol->cli, pol->mem_ctx,
&group_pol, info_level,
ctr)) != NT_STATUS_NOPROBLEMO)
ctr)) != NT_STATUS_OK)
goto done;
done:
if (got_group_pol) cli_samr_close(pol->cli, pol->mem_ctx, &group_pol);
return (result == NT_STATUS_NOPROBLEMO);
return (result == NT_STATUS_OK);
}
BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
@ -365,7 +365,7 @@ BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
if ((result = cli_samr_open_group(pol->cli, pol->mem_ctx,
&pol->handle, MAXIMUM_ALLOWED_ACCESS,
group_rid, &group_pol))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
goto done;
got_group_pol = True;
@ -373,7 +373,7 @@ BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
if ((result = cli_samr_query_groupmem(pol->cli, pol->mem_ctx,
&group_pol, num_names, rid_mem,
name_types))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
goto done;
/* Call cli_samr_lookup_rids() in bunches of ~1000 rids to avoid
@ -399,7 +399,7 @@ BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
&tmp_num_names,
&tmp_names, &tmp_types);
if (result != NT_STATUS_NOPROBLEMO)
if (result != NT_STATUS_OK)
goto done;
/* Copy result into array. The talloc system will take
@ -420,7 +420,7 @@ BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
if (got_group_pol)
cli_samr_close(pol->cli, pol->mem_ctx, &group_pol);
return (result == NT_STATUS_NOPROBLEMO);
return (result == NT_STATUS_OK);
}
BOOL wb_samr_query_dom_info(CLI_POLICY_HND *pol, uint16 switch_value,
@ -431,7 +431,7 @@ BOOL wb_samr_query_dom_info(CLI_POLICY_HND *pol, uint16 switch_value,
ret = cli_samr_query_dom_info(pol->cli, pol->mem_ctx,
&pol->handle, switch_value, ctr);
return (ret == NT_STATUS_NOPROBLEMO);
return (ret == NT_STATUS_OK);
}
/* Unlike all the others, the status code of this function is actually used

View File

@ -465,7 +465,7 @@ enum winbindd_result winbindd_endgrent(struct winbindd_cli_state *state)
static BOOL get_sam_group_entries(struct getent_state *ent)
{
uint32 status, num_entries, start_ndx = 0;
NTSTATUS status, num_entries, start_ndx = 0;
struct acct_info *name_list = NULL;
if (ent->got_all_sam_entries) {

View File

@ -123,7 +123,7 @@ enum winbindd_result winbindd_check_machine_acct(
/* Pass back result code - zero for success, other values for
specific failures. */
DEBUG(3, ("secret is %s\n", (result == NT_STATUS_NOPROBLEMO) ?
DEBUG(3, ("secret is %s\n", (result == NT_STATUS_OK) ?
"good" : "bad"));
done:

View File

@ -135,7 +135,7 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state)
server_state.controller, trust_passwd,
last_change_time);
return (result == NT_STATUS_NOPROBLEMO) ? WINBINDD_OK : WINBINDD_ERROR;
return (result == NT_STATUS_OK) ? WINBINDD_OK : WINBINDD_ERROR;
}
/* Challenge Response Authentication Protocol */
@ -206,7 +206,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
server_state.controller, trust_passwd,
last_change_time);
return (result == NT_STATUS_NOPROBLEMO) ? WINBINDD_OK : WINBINDD_ERROR;
return (result == NT_STATUS_OK) ? WINBINDD_OK : WINBINDD_ERROR;
}
/* Change a user password */

View File

@ -356,7 +356,7 @@ enum winbindd_result winbindd_endpwent(struct winbindd_cli_state *state)
static BOOL get_sam_user_entries(struct getent_state *ent)
{
uint32 status, num_entries;
NTSTATUS status, num_entries;
SAM_DISPINFO_1 info1;
SAM_DISPINFO_CTR ctr;
struct getpwent_user *name_list = NULL;
@ -614,7 +614,7 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
ctr.sam.info1 = &info1;
for (domain = domain_list; domain; domain = domain->next) {
uint32 status, start_ndx = 0;
NTSTATUS status, start_ndx = 0;
/* Skip domains other than WINBINDD_DOMAIN environment
variable */

View File

@ -594,7 +594,7 @@ BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain,
if (cli_samr_query_usergroups(domain->sam_dom_handle.cli,
domain->sam_dom_handle.mem_ctx,
&user_pol, num_groups, user_groups)
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
result = False;
goto done;
}
@ -871,7 +871,7 @@ uint32 winbindd_query_dispinfo(struct winbindd_domain *domain,
uint32 *start_ndx, uint16 info_level,
uint32 *num_entries, SAM_DISPINFO_CTR *ctr)
{
uint32 status;
NTSTATUS status;
status = wb_samr_query_dispinfo(&domain->sam_dom_handle, start_ndx,
info_level, num_entries, ctr);

View File

@ -88,7 +88,7 @@ static BOOL smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
if (smb_pam_error_handler(pamh, pam_error, msg, dbglvl))
return True;
if (*nt_status == NT_STATUS_NOPROBLEMO) {
if (*nt_status == NT_STATUS_OK) {
/* Complain LOUDLY */
DEBUG(0, ("smb_pam_nt_status_error_handler: PAM: BUG: PAM and NT_STATUS \
error MISMATCH, forcing to NT_STATUS_LOGON_FAILURE"));
@ -533,7 +533,7 @@ static uint32 smb_pam_auth(pam_handle_t *pamh, char *user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_auth: PAM: User %s Authenticated OK\n", user));
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
break;
default:
DEBUG(0, ("smb_pam_auth: PAM: UNKNOWN ERROR while authenticating user %s\n", user));
@ -578,7 +578,7 @@ static uint32 smb_pam_account(pam_handle_t *pamh, char * user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_account: PAM: Account OK for User: %s\n", user));
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
break;
default:
nt_status = NT_STATUS_ACCOUNT_DISABLED;
@ -625,7 +625,7 @@ static uint32 smb_pam_setcred(pam_handle_t *pamh, char * user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_setcred: PAM: SetCredentials OK for User: %s\n", user));
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
break;
default:
DEBUG(0, ("smb_pam_setcred: PAM: UNKNOWN PAM ERROR (%d) during SetCredentials for User: %s\n", pam_error, user));
@ -787,7 +787,7 @@ uint32 smb_pam_accountcheck(char * user)
/* Ignore PAM if told to. */
if (!lp_obey_pam_restrictions())
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, NULL, NULL)) == NULL)
return False;
@ -795,7 +795,7 @@ uint32 smb_pam_accountcheck(char * user)
if (!smb_pam_start(&pamh, user, NULL, pconv))
return NT_STATUS_ACCOUNT_DISABLED;
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_NOPROBLEMO)
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_OK)
DEBUG(0, ("smb_pam_accountcheck: PAM: Account Validation Failed - Rejecting User %s!\n", user));
smb_pam_end(pamh, pconv);
@ -824,19 +824,19 @@ uint32 smb_pam_passcheck(char * user, char * password)
if (!smb_pam_start(&pamh, user, NULL, pconv))
return NT_STATUS_LOGON_FAILURE;
if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_NOPROBLEMO) {
if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
}
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_NOPROBLEMO) {
if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_account failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
}
if ((nt_status = smb_pam_setcred(pamh, user)) != NT_STATUS_NOPROBLEMO) {
if ((nt_status = smb_pam_setcred(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_setcred failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
@ -876,7 +876,7 @@ BOOL smb_pam_passchange(char * user, char * oldpassword, char * newpassword)
/* If PAM not used, no PAM restrictions on accounts. */
uint32 smb_pam_accountcheck(char * user)
{
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/* If PAM not used, also no PAM restrictions on sessions. */

View File

@ -599,7 +599,7 @@ static BOOL password_check(char *password)
{
#ifdef WITH_PAM
return (smb_pam_passcheck(this_user, password) == NT_STATUS_NOPROBLEMO);
return (smb_pam_passcheck(this_user, password) == NT_STATUS_OK);
#endif /* WITH_PAM */
#ifdef WITH_AFS

View File

@ -1110,7 +1110,7 @@ static uint32 clean_up_driver_struct_level_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *dri
driver->driverpath, user, &err)) == -1)
return err;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/****************************************************************************
@ -1175,7 +1175,7 @@ static uint32 clean_up_driver_struct_level_6(NT_PRINTER_DRIVER_INFO_LEVEL_6 *dri
driver->driverpath, user, &err)) == -1)
return err;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/****************************************************************************
@ -3003,7 +3003,7 @@ static uint32 save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA
uint32 save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, NT_PRINTER_PARAM *param)
{
uint32 status = ERRsuccess;
NTSTATUS status = ERRsuccess;
switch (level)
{
@ -3285,7 +3285,7 @@ BOOL printer_driver_in_use (char *arch, char *driver)
Remove a printer driver from the TDB. This assumes that the the driver was
previously looked up.
***************************************************************************/
uint32 delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i)
NTSTATUS delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i)
{
pstring key;
fstring arch;
@ -3308,7 +3308,7 @@ uint32 delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3 *i)
DEBUG(5,("delete_printer_driver: [%s] driver delete successful.\n",
i->name));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/****************************************************************************
****************************************************************************/
@ -3396,7 +3396,7 @@ uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr)
prs_struct ps;
TALLOC_CTX *mem_ctx = NULL;
fstring key;
uint32 status;
NTSTATUS status;
mem_ctx = talloc_init();
if (mem_ctx == NULL)

View File

@ -471,7 +471,7 @@ uint32 lsa_lookup_sids(POLICY_HND *hnd, int num_sids, DOM_SID *sids,
return r_l.status;
}
result = NT_STATUS_NOPROBLEMO;
result = NT_STATUS_OK;
if (p) {
if (t_names.ptr_trans_names != 0

View File

@ -57,7 +57,7 @@ static void gen_next_creds( struct cli_state *cli, DOM_CRED *new_clnt_cred)
/****************************************************************************
do a LSA Logon Control2
****************************************************************************/
BOOL cli_net_logon_ctrl2(struct cli_state *cli, uint32 status_level)
BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level)
{
prs_struct rbuf;
prs_struct buf;
@ -446,7 +446,7 @@ uint32 cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr,
result = cli_net_sam_logon_internal(cli, ctr, user_info3,
validation_level);
if(result == NT_STATUS_NOPROBLEMO) {
if(result == NT_STATUS_OK) {
DEBUG(10,("cli_net_sam_logon: Success \n"));
} else if (result == NT_STATUS_INVALID_INFO_CLASS) {
DEBUG(10,("cli_net_sam_logon: STATUS INVALID INFO CLASS \n"));

View File

@ -70,7 +70,7 @@ uint32 spoolss_enum_printerdrivers(const char *srv_name, const char *environment
if(spoolss_io_r_enumprinterdrivers("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_ENUMPRINTERDRIVERS: %s\n", get_nt_error_msg(r_o.status)));
}
@ -126,7 +126,7 @@ uint32 spoolss_enum_printers(uint32 flags, fstring srv_name, uint32 level,
if(new_spoolss_io_r_enumprinters("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
/* report error code */
DEBUG(3,("SPOOLSS_ENUMPRINTERS: %s\n", get_nt_error_msg(r_o.status)));
@ -186,7 +186,7 @@ uint32 spoolss_enum_ports(fstring srv_name, uint32 level,
if(new_spoolss_io_r_enumports("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_ENUMPORTS: %s\n", get_nt_error_msg(r_o.status)));
}
@ -240,7 +240,7 @@ uint32 spoolss_enum_jobs(const POLICY_HND *hnd, uint32 firstjob, uint32 numofjob
if(spoolss_io_r_enumjobs("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_ENUMJOBS: %s\n", get_nt_error_msg(r_o.status)));
}
@ -298,7 +298,7 @@ uint32 spoolss_enum_printerdata(const POLICY_HND *hnd, uint32 idx,
if(spoolss_io_r_enumprinterdata("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_ENUMPRINTERDATA: %s\n", get_nt_error_msg(r_o.status)));
}
@ -358,7 +358,7 @@ uint32 spoolss_getprinter(const POLICY_HND *hnd, uint32 level,
if(!spoolss_io_r_getprinter("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_GETPRINTER: %s\n", get_nt_error_msg(r_o.status)));
}
@ -411,7 +411,7 @@ uint32 spoolss_getprinterdriver(const POLICY_HND *hnd,
if(spoolss_io_r_getprinterdriver2("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_GETPRINTERDRIVER2: %s\n", get_nt_error_msg(r_o.status)));
}
@ -561,7 +561,7 @@ BOOL spoolss_addprinterex(POLICY_HND *hnd, const char* srv_name, PRINTER_INFO_2
if(spoolss_io_r_addprinterex("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
/* report error code */
DEBUG(3,("SPOOLSS_ADDPRINTEREX: %s\n", get_nt_error_msg(r_o.status)));
@ -690,7 +690,7 @@ uint32 spoolss_getprinterdata(const POLICY_HND *hnd, const UNISTR2 *valuename,
if(spoolss_io_r_getprinterdata("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_GETPRINTERDATA: %s\n", get_nt_error_msg(r_o.status)));
}
@ -749,7 +749,7 @@ uint32 spoolss_getprinterdriverdir(fstring srv_name, fstring env_name, uint32 le
if(spoolss_io_r_getprinterdriverdir("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
DEBUG(3,("SPOOLSS_GETPRINTERDRIVERDIRECTORY: %s\n", get_nt_error_msg(r_o.status)));
}
@ -800,7 +800,7 @@ uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIV
if(spoolss_io_r_addprinterdriver("", &r_o, &rbuf, 0))
{
if (r_o.status != NT_STATUS_NOPROBLEMO)
if (r_o.status != NT_STATUS_OK)
{
/* report error code */
DEBUG(3,("SPOOLSS_ADDPRINTERDRIVER: %s\n", get_nt_error_msg(r_o.status)));

View File

@ -132,7 +132,7 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine)
do a reply open printer
****************************************************************************/
BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, uint32 *status, POLICY_HND *handle)
BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, NTSTATUS *status, POLICY_HND *handle)
{
prs_struct rbuf;
prs_struct buf;
@ -188,7 +188,7 @@ BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32
****************************************************************************/
BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle,
uint32 change_low, uint32 change_high, uint32 *status)
uint32 change_low, uint32 change_high, NTSTATUS *status)
{
prs_struct rbuf;
prs_struct buf;
@ -242,7 +242,7 @@ BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle,
do a reply open printer
****************************************************************************/
BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, uint32 *status)
BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, NTSTATUS *status)
{
prs_struct rbuf;
prs_struct buf;

View File

@ -227,7 +227,7 @@ nt spoolss query
BOOL msrpc_spoolss_enum_printers(char* srv_name, uint32 flags,
uint32 level, PRINTER_INFO_CTR ctr)
{
uint32 status;
NTSTATUS status;
NEW_BUFFER buffer;
uint32 needed;
uint32 returned;
@ -250,7 +250,7 @@ BOOL msrpc_spoolss_enum_printers(char* srv_name, uint32 flags,
needed, &needed, &returned);
}
if (status!=NT_STATUS_NOPROBLEMO)
if (status!=NT_STATUS_OK)
{
DEBUG(0,("spoolss_enum_printers: %s\n", get_nt_error_msg(status)));
if (mem_ctx)
@ -290,7 +290,7 @@ nt spoolss query
BOOL msrpc_spoolss_enum_ports(char* srv_name,
uint32 level, PORT_INFO_CTR *ctr)
{
uint32 status;
NTSTATUS status;
NEW_BUFFER buffer;
uint32 needed;
uint32 returned;
@ -316,7 +316,7 @@ BOOL msrpc_spoolss_enum_ports(char* srv_name,
report(out_hnd, "\tstatus:[%d (%x)]\n", status, status);
if (status!=NT_STATUS_NOPROBLEMO)
if (status!=NT_STATUS_OK)
{
if (mem_ctx)
talloc_destroy(mem_ctx);
@ -362,7 +362,7 @@ uint32 msrpc_spoolss_getprinterdata( const char* printer_name,
void *fn)
{
POLICY_HND hnd;
uint32 status;
NTSTATUS status;
uint32 needed;
uint32 size;
char *data;
@ -405,7 +405,7 @@ uint32 msrpc_spoolss_getprinterdata( const char* printer_name,
if (mem_ctx)
talloc_destroy(mem_ctx);
if (status != NT_STATUS_NOPROBLEMO)
if (status != NT_STATUS_OK)
{
if (!spoolss_closeprinter(&hnd))
return NT_STATUS_ACCESS_DENIED;
@ -429,7 +429,7 @@ BOOL msrpc_spoolss_enum_jobs( const char* printer_name,
void ***ctr, JOB_INFO_FN(fn))
{
POLICY_HND hnd;
uint32 status;
NTSTATUS status;
NEW_BUFFER buffer;
uint32 needed;
uint32 returned;
@ -462,7 +462,7 @@ BOOL msrpc_spoolss_enum_jobs( const char* printer_name,
if (mem_ctx)
talloc_destroy(mem_ctx);
if (status!=NT_STATUS_NOPROBLEMO) {
if (status!=NT_STATUS_OK) {
if (!spoolss_closeprinter(&hnd))
return False;
return False;
@ -482,7 +482,7 @@ BOOL msrpc_spoolss_enum_printerdata( const char* printer_name,
const char* station, const char* user_name )
{
POLICY_HND hnd;
uint32 status;
NTSTATUS status;
uint32 idx;
uint32 valuelen;
uint16 *value;
@ -540,7 +540,7 @@ BOOL msrpc_spoolss_enum_printerdata( const char* printer_name,
value, rvaluelen, type, datalen, data, rdatalen);
if (status!=NT_STATUS_NOPROBLEMO) {
if (status!=NT_STATUS_OK) {
/*
* the check on this if statement is redundant
* since is the status is bad we're going to
@ -563,7 +563,7 @@ BOOL msrpc_spoolss_getprinter( const char* printer_name, const uint32 level,
PRINTER_INFO_CTR ctr)
{
POLICY_HND hnd;
uint32 status=0;
NTSTATUS status=0;
NEW_BUFFER buffer;
uint32 needed=1000;
TALLOC_CTX *mem_ctx = NULL;
@ -589,7 +589,7 @@ BOOL msrpc_spoolss_getprinter( const char* printer_name, const uint32 level,
report(out_hnd, "\tstatus:[%d (%x)]\n", status, status);
if (status!=NT_STATUS_NOPROBLEMO)
if (status!=NT_STATUS_OK)
{
if (mem_ctx)
talloc_destroy(mem_ctx);
@ -618,7 +618,7 @@ BOOL msrpc_spoolss_getprinter( const char* printer_name, const uint32 level,
if (mem_ctx)
talloc_destroy(mem_ctx);
if (status!=NT_STATUS_NOPROBLEMO) {
if (status!=NT_STATUS_OK) {
if (!spoolss_closeprinter(&hnd))
return False;
return False;
@ -636,7 +636,7 @@ BOOL msrpc_spoolss_getprinterdriver( const char* printer_name,
PRINTER_DRIVER_CTR ctr)
{
POLICY_HND hnd;
uint32 status=0;
NTSTATUS status=0;
NEW_BUFFER buffer;
uint32 needed;
TALLOC_CTX *mem_ctx = NULL;
@ -662,7 +662,7 @@ BOOL msrpc_spoolss_getprinterdriver( const char* printer_name,
/* report(out_hnd, "\tstatus:[%d (%x)]\n", status, status); */
if (status!=NT_STATUS_NOPROBLEMO)
if (status!=NT_STATUS_OK)
{
if (mem_ctx)
talloc_destroy(mem_ctx);
@ -688,7 +688,7 @@ BOOL msrpc_spoolss_getprinterdriver( const char* printer_name,
if (mem_ctx)
talloc_destroy(mem_ctx);
if (status!=NT_STATUS_NOPROBLEMO) {
if (status!=NT_STATUS_OK) {
if (!spoolss_closeprinter(&hnd))
return False;
return False;
@ -704,7 +704,7 @@ BOOL msrpc_spoolss_enumprinterdrivers( const char* srv_name,
const char *environment, const uint32 level,
PRINTER_DRIVER_CTR ctr)
{
uint32 status=0;
NTSTATUS status=0;
NEW_BUFFER buffer;
uint32 needed;
uint32 returned;
@ -731,7 +731,7 @@ BOOL msrpc_spoolss_enumprinterdrivers( const char* srv_name,
report(out_hnd, "\tstatus:[%d (%x)]\n", status, status);
if (status!=NT_STATUS_NOPROBLEMO)
if (status!=NT_STATUS_OK)
{
if (mem_ctx)
talloc_destroy(mem_ctx);
@ -766,7 +766,7 @@ nt spoolss query
****************************************************************************/
BOOL msrpc_spoolss_getprinterdriverdir(char* srv_name, char* env_name, uint32 level, DRIVER_DIRECTORY_CTR ctr)
{
uint32 status;
NTSTATUS status;
NEW_BUFFER buffer;
uint32 needed;
TALLOC_CTX *mem_ctx = NULL;
@ -788,7 +788,7 @@ BOOL msrpc_spoolss_getprinterdriverdir(char* srv_name, char* env_name, uint32 le
report(out_hnd, "\tstatus:[%d (%x)]\n", status, status);
if (status!=NT_STATUS_NOPROBLEMO)
if (status!=NT_STATUS_OK)
{
if (mem_ctx)
talloc_destroy(mem_ctx);

View File

@ -532,7 +532,7 @@ BOOL lsa_io_q_enum_trust_dom(char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context,
char *domain_name, DOM_SID *domain_sid,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_r_enum_trust_dom\n"));

View File

@ -891,7 +891,7 @@ makes a structure.
********************************************************************/
void init_reg_r_get_key_sec(REG_R_GET_KEY_SEC *r_i, POLICY_HND *pol,
uint32 buf_len, uint8 *buf,
uint32 status)
NTSTATUS status)
{
r_i->ptr = 1;
init_buf_hdr(&r_i->hdr_sec, buf_len, buf_len);
@ -1028,7 +1028,7 @@ BOOL reg_io_q_info(char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth)
********************************************************************/
BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r,
BUFFER2* buf, uint32 type, uint32 status)
BUFFER2* buf, uint32 type, NTSTATUS status)
{
if(r_r == NULL)
return False;
@ -1519,7 +1519,7 @@ BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int
********************************************************************/
void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r,
POLICY_HND *pol, uint32 status)
POLICY_HND *pol, NTSTATUS status)
{
memcpy(&r_r->pol, pol, sizeof(r_r->pol));
r_r->status = status;

View File

@ -133,7 +133,7 @@ inits a SAMR_R_LOOKUP_DOMAIN structure.
********************************************************************/
void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN * r_u,
DOM_SID *dom_sid, uint32 status)
DOM_SID *dom_sid, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_lookup_domain\n"));
@ -342,7 +342,7 @@ BOOL samr_io_q_get_usrdom_pwinfo(char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u,
Init.
********************************************************************/
void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO *r_u, uint32 status)
void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO *r_u, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_get_usrdom_pwinfo\n"));
@ -762,7 +762,7 @@ inits a SAMR_R_QUERY_DOMAIN_INFO structure.
void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO * r_u,
uint16 switch_value, SAM_UNK_CTR * ctr,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_dom_info\n"));
@ -1424,7 +1424,7 @@ BOOL samr_io_q_query_dispinfo(char *desc, SAMR_Q_QUERY_DISPINFO * q_e,
inits a SAM_DISPINFO_1 structure.
********************************************************************/
uint32 init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 *num_entries,
NTSTATUS init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 *num_entries,
uint32 *data_size, uint32 start_idx,
SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES])
{
@ -1442,7 +1442,7 @@ uint32 init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 *num_ent
max_entries, max_data_size));
if (max_entries==0)
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
sam->sam=(SAM_ENTRY1 *)talloc(ctx, max_entries*sizeof(SAM_ENTRY1));
if (!sam->sam)
@ -1480,7 +1480,7 @@ uint32 init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 *num_ent
*num_entries = i;
*data_size = dsize;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -1536,7 +1536,7 @@ static BOOL sam_io_sam_dispinfo_1(char *desc, SAM_DISPINFO_1 * sam,
inits a SAM_DISPINFO_2 structure.
********************************************************************/
uint32 init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 *num_entries,
NTSTATUS init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 *num_entries,
uint32 *data_size, uint32 start_idx,
SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES])
{
@ -1553,7 +1553,7 @@ uint32 init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 *num_ent
max_data_size = *data_size;
if (max_entries==0)
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
if (!(sam->sam=(SAM_ENTRY2 *)talloc(ctx, max_entries*sizeof(SAM_ENTRY2))))
return NT_STATUS_NO_MEMORY;
@ -1585,7 +1585,7 @@ uint32 init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 *num_ent
*num_entries = i;
*data_size = dsize;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -1643,7 +1643,7 @@ static BOOL sam_io_sam_dispinfo_2(char *desc, SAM_DISPINFO_2 * sam,
inits a SAM_DISPINFO_3 structure.
********************************************************************/
uint32 init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 *num_entries,
NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 *num_entries,
uint32 *data_size, uint32 start_idx,
DOMAIN_GRP * grp)
{
@ -1660,7 +1660,7 @@ uint32 init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 *num_ent
max_data_size = *data_size;
if (max_entries==0)
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
if (!(sam->sam=(SAM_ENTRY3 *)talloc(ctx, max_entries*sizeof(SAM_ENTRY3))))
return NT_STATUS_NO_MEMORY;
@ -1688,7 +1688,7 @@ uint32 init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 *num_ent
*num_entries = i;
*data_size = dsize;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -1746,7 +1746,7 @@ static BOOL sam_io_sam_dispinfo_3(char *desc, SAM_DISPINFO_3 * sam,
inits a SAM_DISPINFO_4 structure.
********************************************************************/
uint32 init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 *num_entries,
NTSTATUS init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 *num_entries,
uint32 *data_size, uint32 start_idx,
SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES])
{
@ -1764,7 +1764,7 @@ uint32 init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 *num_ent
max_data_size = *data_size;
if (max_entries==0)
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
if (!(sam->sam=(SAM_ENTRY4 *)talloc(ctx, max_entries*sizeof(SAM_ENTRY4))))
return NT_STATUS_NO_MEMORY;
@ -1790,7 +1790,7 @@ uint32 init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 *num_ent
*num_entries = i;
*data_size = dsize;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -1849,7 +1849,7 @@ static BOOL sam_io_sam_dispinfo_4(char *desc, SAM_DISPINFO_4 * sam,
inits a SAM_DISPINFO_5 structure.
********************************************************************/
uint32 init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 *num_entries,
NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 *num_entries,
uint32 *data_size, uint32 start_idx,
DOMAIN_GRP * grp)
{
@ -1866,7 +1866,7 @@ uint32 init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 *num_ent
max_data_size = *data_size;
if (max_entries==0)
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
if (!(sam->sam=(SAM_ENTRY5 *)talloc(ctx, max_entries*sizeof(SAM_ENTRY5))))
return NT_STATUS_NO_MEMORY;
@ -1890,7 +1890,7 @@ uint32 init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 *num_ent
*num_entries = i;
*data_size = dsize;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -1952,7 +1952,7 @@ inits a SAMR_R_QUERY_DISPINFO structure.
void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO * r_u,
uint32 num_entries, uint32 data_size,
uint16 switch_level, SAM_DISPINFO_CTR * ctr,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_dispinfo: level %d\n", switch_level));
@ -2443,7 +2443,7 @@ inits a SAMR_R_DEL_GROUPMEM structure.
********************************************************************/
void init_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM * r_u, POLICY_HND *pol,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_del_groupmem\n"));
@ -2518,7 +2518,7 @@ inits a SAMR_R_ADD_GROUPMEM structure.
********************************************************************/
void init_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM * r_u, POLICY_HND *pol,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_add_groupmem\n"));
@ -2589,7 +2589,7 @@ BOOL samr_io_q_set_groupinfo(char *desc, SAMR_Q_SET_GROUPINFO * q_e,
inits a SAMR_R_SET_GROUPINFO structure.
********************************************************************/
void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO * r_u, uint32 status)
void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO * r_u, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_set_groupinfo\n"));
@ -2662,7 +2662,7 @@ inits a SAMR_R_QUERY_GROUPINFO structure.
********************************************************************/
void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO * r_u,
GROUP_INFO_CTR * ctr, uint32 status)
GROUP_INFO_CTR * ctr, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_groupinfo\n"));
@ -2742,7 +2742,7 @@ inits a SAMR_R_QUERY_GROUPMEM structure.
void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM * r_u,
uint32 num_entries, uint32 *rid,
uint32 *attr, uint32 status)
uint32 *attr, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_groupmem\n"));
@ -2876,7 +2876,7 @@ inits a SAMR_R_QUERY_USERGROUPS structure.
void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS * r_u,
uint32 num_gids, DOM_GID * gid,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_usergroups\n"));
@ -3495,7 +3495,7 @@ inits a SAMR_R_QUERY_ALIASINFO structure.
********************************************************************/
void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO * r_u,
ALIAS_INFO_CTR * ctr, uint32 status)
ALIAS_INFO_CTR * ctr, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_aliasinfo\n"));
@ -3681,7 +3681,7 @@ inits a SAMR_R_QUERY_USERALIASES structure.
void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES * r_u,
uint32 num_rids, uint32 *rid,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_useraliases\n"));
@ -4327,7 +4327,7 @@ inits a SAMR_R_DELETE_DOM_ALIAS structure.
********************************************************************/
void init_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS * r_u,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_delete_dom_alias\n"));
@ -4396,7 +4396,7 @@ inits a SAMR_R_QUERY_ALIASMEM structure.
void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM * r_u,
uint32 num_sids, DOM_SID2 * sid,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_aliasmem\n"));
@ -4472,7 +4472,7 @@ BOOL samr_io_r_query_aliasmem(char *desc, SAMR_R_QUERY_ALIASMEM * r_u,
inits a SAMR_Q_LOOKUP_NAMES structure.
********************************************************************/
uint32 init_samr_q_lookup_names(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_NAMES * q_u,
NTSTATUS init_samr_q_lookup_names(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_NAMES * q_u,
POLICY_HND *pol, uint32 flags,
uint32 num_names, char **name)
{
@ -4499,7 +4499,7 @@ uint32 init_samr_q_lookup_names(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_NAMES * q_u,
init_unistr2(&q_u->uni_name[i], name[i], len_name); /* unicode string for machine account */
}
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -4561,10 +4561,10 @@ BOOL samr_io_q_lookup_names(char *desc, SAMR_Q_LOOKUP_NAMES * q_u,
inits a SAMR_R_LOOKUP_NAMES structure.
********************************************************************/
uint32 init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u,
NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u,
uint32 num_rids,
uint32 *rid, uint32 *type,
uint32 status)
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_lookup_names\n"));
@ -4608,7 +4608,7 @@ uint32 init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u,
r_u->status = status;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -6013,7 +6013,7 @@ static BOOL sam_io_user_info20(char *desc, SAM_USER_INFO_20 *usr,
inits a SAM_USERINFO_CTR structure.
********************************************************************/
uint32 make_samr_userinfo_ctr_usr21(TALLOC_CTX *ctx, SAM_USERINFO_CTR * ctr,
NTSTATUS make_samr_userinfo_ctr_usr21(TALLOC_CTX *ctx, SAM_USERINFO_CTR * ctr,
uint16 switch_value,
SAM_USER_INFO_21 * usr)
{
@ -6074,7 +6074,7 @@ uint32 make_samr_userinfo_ctr_usr21(TALLOC_CTX *ctx, SAM_USERINFO_CTR * ctr,
return NT_STATUS_INVALID_INFO_CLASS;
}
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -6230,7 +6230,7 @@ inits a SAMR_R_QUERY_USERINFO structure.
********************************************************************/
void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO * r_u,
SAM_USERINFO_CTR * ctr, uint32 status)
SAM_USERINFO_CTR * ctr, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_query_userinfo\n"));
@ -6322,7 +6322,7 @@ BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO * q_u,
inits a SAMR_R_SET_USERINFO structure.
********************************************************************/
void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO * r_u, uint32 status)
void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO * r_u, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_set_userinfo\n"));
@ -6410,7 +6410,7 @@ BOOL samr_io_q_set_userinfo2(char *desc, SAMR_Q_SET_USERINFO2 * q_u,
inits a SAMR_R_SET_USERINFO2 structure.
********************************************************************/
void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2 * r_u, uint32 status)
void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2 * r_u, NTSTATUS status)
{
DEBUG(5, ("init_samr_r_set_userinfo2\n"));
@ -6825,7 +6825,7 @@ BOOL samr_io_q_chgpasswd_user(char *desc, SAMR_Q_CHGPASSWD_USER * q_u,
inits a SAMR_R_CHGPASSWD_USER structure.
********************************************************************/
void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER * r_u, uint32 status)
void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER * r_u, NTSTATUS status)
{
DEBUG(5, ("init_r_chgpasswd_user\n"));

View File

@ -2240,7 +2240,7 @@ BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_stru
********************************************************************/
void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
uint32 switch_value, SRV_INFO_CTR *ctr, uint32 status)
uint32 switch_value, SRV_INFO_CTR *ctr, NTSTATUS status)
{
DEBUG(5,("init_srv_r_net_srv_get_info\n"));
@ -2262,7 +2262,7 @@ void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
********************************************************************/
void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv,
uint32 switch_value, uint32 status)
uint32 switch_value, NTSTATUS status)
{
DEBUG(5,("init_srv_r_net_srv_set_info\n"));

View File

@ -135,8 +135,8 @@ static BOOL wks_io_wks_info_100(char *desc, WKS_INFO_100 *inf, prs_struct *ps, i
********************************************************************/
void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u,
uint32 switch_value, WKS_INFO_100 *wks100,
int status)
uint32 switch_value, WKS_INFO_100 *wks100,
NTSTATUS status)
{
DEBUG(5,("init_wks_r_unknown_0: %d\n", __LINE__));

View File

@ -106,7 +106,7 @@ uint32 _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u)
if(!create_msdfs_link(&jn, exists))
return NERR_DfsCantCreateJunctionPoint;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
uint32 _dfs_remove(pipes_struct *p, DFS_Q_DFS_REMOVE *q_u, DFS_R_DFS_REMOVE *r_u)
@ -185,7 +185,7 @@ uint32 _dfs_remove(pipes_struct *p, DFS_Q_DFS_REMOVE *q_u, DFS_R_DFS_REMOVE *r_u
}
}
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
static BOOL init_reply_dfs_info_1(struct junction_map* j, DFS_INFO_1* dfs1, int num_j)
@ -309,7 +309,7 @@ static uint32 init_reply_dfs_ctr(TALLOC_CTX *ctx, uint32 level, DFS_INFO_CTR* ct
default:
return NT_STATUS_INVALID_LEVEL;
}
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
uint32 _dfs_enum(pipes_struct *p, DFS_Q_DFS_ENUM *q_u, DFS_R_DFS_ENUM *r_u)

View File

@ -193,7 +193,7 @@ static void init_reply_lookup_names(LSA_R_LOOKUP_NAMES *r_l,
if (mapped_count == 0)
r_l->status = NT_STATUS_NONE_MAPPED;
else
r_l->status = NT_STATUS_NOPROBLEMO;
r_l->status = NT_STATUS_OK;
}
/***************************************************************************
@ -288,7 +288,7 @@ static void init_reply_lookup_sids(LSA_R_LOOKUP_SIDS *r_l,
if (mapped_count == 0)
r_l->status = NT_STATUS_NONE_MAPPED;
else
r_l->status = NT_STATUS_NOPROBLEMO;
r_l->status = NT_STATUS_OK;
}
/***************************************************************************
@ -303,14 +303,14 @@ NTSTATUS _lsa_open_policy2(pipes_struct *p, LSA_Q_OPEN_POL2 *q_u, LSA_R_OPEN_POL
if (!create_policy_hnd(p, &r_u->pol, NULL, NULL))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/***************************************************************************
_lsa_open_policy
***************************************************************************/
uint32 _lsa_open_policy(pipes_struct *p, LSA_Q_OPEN_POL *q_u, LSA_R_OPEN_POL *r_u)
NTSTATUS _lsa_open_policy(pipes_struct *p, LSA_Q_OPEN_POL *q_u, LSA_R_OPEN_POL *r_u)
{
/* lkclXXXX having decoded it, ignore all fields in the open policy! */
@ -318,14 +318,14 @@ uint32 _lsa_open_policy(pipes_struct *p, LSA_Q_OPEN_POL *q_u, LSA_R_OPEN_POL *r_
if (!create_policy_hnd(p, &r_u->pol, NULL, NULL))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/***************************************************************************
_lsa_enum_trust_dom - this needs fixing to do more than return NULL ! JRA.
***************************************************************************/
uint32 _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_ENUM_TRUST_DOM *r_u)
NTSTATUS _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_ENUM_TRUST_DOM *r_u)
{
uint32 enum_context = 0;
char *dom_name = NULL;
@ -336,7 +336,7 @@ uint32 _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_ENU
/* set up the LSA QUERY INFO response */
init_r_enum_trust_dom(p->mem_ctx, r_u, enum_context, dom_name, dom_sid,
dom_name != NULL ? NT_STATUS_NOPROBLEMO : NT_STATUS_UNABLE_TO_FREE_VM);
dom_name != NULL ? NT_STATUS_OK : NT_STATUS_UNABLE_TO_FREE_VM);
return r_u->status;
}
@ -345,14 +345,14 @@ uint32 _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_ENU
_lsa_query_info. See the POLICY_INFOMATION_CLASS docs at msdn.
***************************************************************************/
uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO *r_u)
NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO *r_u)
{
LSA_INFO_UNION *info = &r_u->dom;
DOM_SID domain_sid;
char *name = NULL;
DOM_SID *sid = NULL;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
return NT_STATUS_INVALID_HANDLE;
@ -366,7 +366,7 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
info->id2.count1 = 7;
info->id2.count2 = 7;
if ((info->id2.auditsettings = (uint32 *)talloc(p->mem_ctx,7*sizeof(uint32))) == NULL)
return False;
return NT_STATUS_NO_MEMORY;
for (i = 0; i < 7; i++)
info->id2.auditsettings[i] = 3;
break;
@ -442,7 +442,7 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
break;
}
if(r_u->status == NT_STATUS_NOPROBLEMO) {
if (NT_STATUS_IS_OK(r_u->status)) {
r_u->undoc_buffer = 0x22000000; /* bizarre */
r_u->info_class = q_u->info_class;
}
@ -454,7 +454,7 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
_lsa_lookup_sids
***************************************************************************/
uint32 _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_SIDS *r_u)
NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_SIDS *r_u)
{
DOM_SID2 *sid = q_u->sids.sid;
int num_entries = q_u->sids.num_entries;
@ -482,7 +482,7 @@ uint32 _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_SI
lsa_reply_lookup_names
***************************************************************************/
uint32 _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP_NAMES *r_u)
NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP_NAMES *r_u)
{
UNISTR2 *names = q_u->uni_name;
int num_entries = q_u->num_entries;
@ -510,20 +510,20 @@ uint32 _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP_N
_lsa_close. Also weird - needs to check if lsa handle is correct. JRA.
***************************************************************************/
uint32 _lsa_close(pipes_struct *p, LSA_Q_CLOSE *q_u, LSA_R_CLOSE *r_u)
NTSTATUS _lsa_close(pipes_struct *p, LSA_Q_CLOSE *q_u, LSA_R_CLOSE *r_u)
{
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
return NT_STATUS_INVALID_HANDLE;
close_policy_hnd(p, &q_u->pol);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/***************************************************************************
"No more secrets Marty...." :-).
***************************************************************************/
uint32 _lsa_open_secret(pipes_struct *p, LSA_Q_OPEN_SECRET *q_u, LSA_R_OPEN_SECRET *r_u)
NTSTATUS _lsa_open_secret(pipes_struct *p, LSA_Q_OPEN_SECRET *q_u, LSA_R_OPEN_SECRET *r_u)
{
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
@ -532,7 +532,7 @@ uint32 _lsa_open_secret(pipes_struct *p, LSA_Q_OPEN_SECRET *q_u, LSA_R_OPEN_SECR
_lsa_enum_privs.
***************************************************************************/
uint32 _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIVS *r_u)
NTSTATUS _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIVS *r_u)
{
uint32 i;
@ -544,7 +544,7 @@ uint32 _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIVS
return NT_STATUS_INVALID_HANDLE;
if (enum_context >= PRIV_ALL_INDEX)
return 0x8000001A;
return NT_STATUS_UNABLE_TO_FREE_VM;
entries = (LSA_PRIV_ENTRY *)talloc_zero(p->mem_ctx, sizeof(LSA_PRIV_ENTRY) * (PRIV_ALL_INDEX-enum_context));
if (entries==NULL)
@ -560,14 +560,14 @@ uint32 _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIVS
init_lsa_r_enum_privs(r_u, i+enum_context, PRIV_ALL_INDEX-enum_context, entries);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/***************************************************************************
_lsa_priv_get_dispname.
***************************************************************************/
uint32 _lsa_priv_get_dispname(pipes_struct *p, LSA_Q_PRIV_GET_DISPNAME *q_u, LSA_R_PRIV_GET_DISPNAME *r_u)
NTSTATUS _lsa_priv_get_dispname(pipes_struct *p, LSA_Q_PRIV_GET_DISPNAME *q_u, LSA_R_PRIV_GET_DISPNAME *r_u)
{
fstring name_asc;
fstring desc_asc;
@ -595,14 +595,14 @@ uint32 _lsa_priv_get_dispname(pipes_struct *p, LSA_Q_PRIV_GET_DISPNAME *q_u, LSA
r_u->ptr_info=0xdeadbeef;
r_u->lang_id=q_u->lang_id;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/***************************************************************************
_lsa_enum_accounts.
***************************************************************************/
uint32 _lsa_enum_accounts(pipes_struct *p, LSA_Q_ENUM_ACCOUNTS *q_u, LSA_R_ENUM_ACCOUNTS *r_u)
NTSTATUS _lsa_enum_accounts(pipes_struct *p, LSA_Q_ENUM_ACCOUNTS *q_u, LSA_R_ENUM_ACCOUNTS *r_u)
{
GROUP_MAP *map=NULL;
int num_entries=0;
@ -614,7 +614,7 @@ uint32 _lsa_enum_accounts(pipes_struct *p, LSA_Q_ENUM_ACCOUNTS *q_u, LSA_R_ENUM_
/* get the list of mapped groups (domain, local, builtin) */
if(!enum_group_mapping(SID_NAME_UNKNOWN, &map, &num_entries, ENUM_ONLY_MAPPED))
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
sids->ptr_sid = (uint32 *)talloc_zero(p->mem_ctx, (num_entries-q_u->enum_context)*sizeof(uint32));
sids->sid = (DOM_SID2 *)talloc_zero(p->mem_ctx, (num_entries-q_u->enum_context)*sizeof(DOM_SID2));
@ -634,11 +634,11 @@ uint32 _lsa_enum_accounts(pipes_struct *p, LSA_Q_ENUM_ACCOUNTS *q_u, LSA_R_ENUM_
init_lsa_r_enum_accounts(r_u, j);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
uint32 _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA_R_UNK_GET_CONNUSER *r_u)
NTSTATUS _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA_R_UNK_GET_CONNUSER *r_u)
{
fstring username, domname;
int ulen, dlen;
@ -663,7 +663,7 @@ uint32 _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA_R
r_u->ptr_dom_name = 1;
init_unistr2(&r_u->uni2_dom_name, domname, dlen);
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
return r_u->status;
}
@ -672,11 +672,11 @@ uint32 _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA_R
***************************************************************************/
uint32 _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u)
NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u)
{
struct lsa_info *info;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the connection policy handle. */
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
@ -701,7 +701,7 @@ uint32 _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCO
***************************************************************************/
uint32 _lsa_enum_privsaccount(pipes_struct *p, LSA_Q_ENUMPRIVSACCOUNT *q_u, LSA_R_ENUMPRIVSACCOUNT *r_u)
NTSTATUS _lsa_enum_privsaccount(pipes_struct *p, LSA_Q_ENUMPRIVSACCOUNT *q_u, LSA_R_ENUMPRIVSACCOUNT *r_u)
{
struct lsa_info *info=NULL;
GROUP_MAP map;
@ -710,7 +710,7 @@ uint32 _lsa_enum_privsaccount(pipes_struct *p, LSA_Q_ENUMPRIVSACCOUNT *q_u, LSA_
LUID_ATTR *set=NULL;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the connection policy handle. */
if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
@ -742,9 +742,9 @@ uint32 _lsa_enum_privsaccount(pipes_struct *p, LSA_Q_ENUMPRIVSACCOUNT *q_u, LSA_
***************************************************************************/
uint32 _lsa_getsystemaccount(pipes_struct *p, LSA_Q_GETSYSTEMACCOUNT *q_u, LSA_R_GETSYSTEMACCOUNT *r_u)
NTSTATUS _lsa_getsystemaccount(pipes_struct *p, LSA_Q_GETSYSTEMACCOUNT *q_u, LSA_R_GETSYSTEMACCOUNT *r_u)
{
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the connection policy handle. */
if (!find_policy_by_hnd(p, &q_u->pol, NULL))

View File

@ -38,7 +38,7 @@ extern DOM_SID global_sam_sid;
*************************************************************************/
static void init_net_r_req_chal(NET_R_REQ_CHAL *r_c,
DOM_CHAL *srv_chal, int status)
DOM_CHAL *srv_chal, NTSTATUS status)
{
DEBUG(6,("init_net_r_req_chal: %d\n", __LINE__));
memcpy(r_c->srv_chal.data, srv_chal->data, sizeof(srv_chal->data));
@ -62,7 +62,7 @@ static void init_net_r_req_chal(NET_R_REQ_CHAL *r_c,
#define LOGON_CTRL_REPL_NEEDED 0x01
#define LOGON_CTRL_REPL_IN_PROGRESS 0x02
uint32 _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u,
NTSTATUS _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u,
NET_R_LOGON_CTRL *r_u)
{
uint32 flags = 0x0;
@ -80,7 +80,7 @@ uint32 _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u,
net_reply_logon_ctrl2:
*************************************************************************/
uint32 _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_CTRL2 *r_u)
NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_CTRL2 *r_u)
{
/* lkclXXXX - guess what - absolutely no idea what these are! */
uint32 flags = 0x0;
@ -105,7 +105,7 @@ uint32 _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_CTR
net_reply_trust_dom_list:
*************************************************************************/
uint32 _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u)
NTSTATUS _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u)
{
char *trusted_domain = "test_domain";
uint32 num_trust_domains = 1;
@ -125,7 +125,7 @@ uint32 _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRU
***********************************************************************************/
static void init_net_r_srv_pwset(NET_R_SRV_PWSET *r_s,
DOM_CRED *srv_cred, int status)
DOM_CRED *srv_cred, NTSTATUS status)
{
DEBUG(5,("init_net_r_srv_pwset: %d\n", __LINE__));
@ -194,9 +194,9 @@ static BOOL get_md4pw(char *md4pw, char *mach_acct)
_net_req_chal
*************************************************************************/
uint32 _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u)
NTSTATUS _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
fstring mach_acct;
if (!get_valid_user_struct(p->vuid))
@ -242,7 +242,7 @@ uint32 _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u)
init_net_r_auth:
*************************************************************************/
static void init_net_r_auth(NET_R_AUTH *r_a, DOM_CHAL *resp_cred, int status)
static void init_net_r_auth(NET_R_AUTH *r_a, DOM_CHAL *resp_cred, NTSTATUS status)
{
memcpy(r_a->srv_chal.data, resp_cred->data, sizeof(resp_cred->data));
r_a->status = status;
@ -252,9 +252,9 @@ static void init_net_r_auth(NET_R_AUTH *r_a, DOM_CHAL *resp_cred, int status)
_net_auth
*************************************************************************/
uint32 _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u)
NTSTATUS _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
DOM_CHAL srv_cred;
UTIME srv_time;
@ -287,7 +287,7 @@ uint32 _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u)
*************************************************************************/
static void init_net_r_auth_2(NET_R_AUTH_2 *r_a,
DOM_CHAL *resp_cred, NEG_FLAGS *flgs, int status)
DOM_CHAL *resp_cred, NEG_FLAGS *flgs, NTSTATUS status)
{
memcpy(r_a->srv_chal.data, resp_cred->data, sizeof(resp_cred->data));
memcpy(&r_a->srv_flgs, flgs, sizeof(r_a->srv_flgs));
@ -298,9 +298,9 @@ static void init_net_r_auth_2(NET_R_AUTH_2 *r_a,
_net_auth_2
*************************************************************************/
uint32 _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u)
NTSTATUS _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
DOM_CHAL srv_cred;
UTIME srv_time;
NEG_FLAGS srv_flgs;
@ -335,9 +335,9 @@ uint32 _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u)
_net_srv_pwset
*************************************************************************/
uint32 _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_u)
NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_u)
{
uint32 status = NT_STATUS_WRONG_PASSWORD;
NTSTATUS status = NT_STATUS_WRONG_PASSWORD;
DOM_CRED srv_cred;
pstring mach_acct;
SAM_ACCOUNT *sampass=NULL;
@ -403,7 +403,7 @@ uint32 _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_
unbecome_root();
if (ret)
status = NT_STATUS_NOPROBLEMO;
status = NT_STATUS_OK;
/* set up the LSA Server Password Set response */
init_net_r_srv_pwset(r_u, &srv_cred, status);
@ -417,7 +417,7 @@ uint32 _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_
_net_sam_logoff:
*************************************************************************/
uint32 _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF *r_u)
NTSTATUS _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF *r_u)
{
DOM_CRED srv_cred;
@ -435,7 +435,7 @@ uint32 _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF
r_u->buffer_creds = 1; /* yes, we have valid server credentials */
memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
return r_u->status;
}
@ -444,9 +444,9 @@ uint32 _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF
_net_logon_any: Use the new authentications subsystem to log in.
*************************************************************************/
static uint32 _net_logon_any(NET_ID_INFO_CTR *ctr, char *user, char *domain, char *sess_key)
static NTSTATUS _net_logon_any(NET_ID_INFO_CTR *ctr, char *user, char *domain, char *sess_key)
{
uint32 nt_status = NT_STATUS_LOGON_FAILURE;
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
unsigned char local_lm_response[24];
unsigned char local_nt_response[24];
@ -550,10 +550,10 @@ static uint32 _net_logon_any(NET_ID_INFO_CTR *ctr, char *user, char *domain, cha
nt_status = check_password(&user_info, &server_info);
DEBUG(5, ("_net_logon_any: exited with status %d\n", nt_status));
DEBUG(5, ("_net_logon_any: exited with status %s\n",
get_nt_error_msg(nt_status)));
return nt_status;
}
@ -562,9 +562,9 @@ static uint32 _net_logon_any(NET_ID_INFO_CTR *ctr, char *user, char *domain, cha
_net_sam_logon
*************************************************************************/
uint32 _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_u)
NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
NET_USER_INFO_3 *usr_info = NULL;
DOM_CRED srv_cred;
SAM_ACCOUNT *sampass = NULL;
@ -637,7 +637,7 @@ uint32 _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_
/* Check account and password */
if (status != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_V(status))
return status;
pdb_init_sam(&sampass);

View File

@ -93,7 +93,7 @@ BOOL create_next_pdu(pipes_struct *p)
*/
if(p->fault_state) {
setup_fault_pdu(p, 0x1c010002);
setup_fault_pdu(p, NT_STATUS(0x1c010002));
return True;
}
@ -367,11 +367,12 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
become_root();
if(!(p->ntlmssp_auth_validated =
pass_check_smb_with_chal(pipe_user_name, domain,
(uchar*)p->challenge,
lm_owf, lm_pw_len,
nt_owf, nt_pw_len) == NT_STATUS_NOPROBLEMO)) {
p->ntlmssp_auth_validated =
NT_STATUS_IS_OK(pass_check_smb_with_chal(pipe_user_name, domain,
(uchar*)p->challenge,
lm_owf, lm_pw_len,
nt_owf, nt_pw_len));
if (!p->ntlmssp_auth_validated) {
DEBUG(1,("api_pipe_ntlmssp_verify: User %s\\%s from machine %s \
failed authentication on named pipe %s.\n", domain, pipe_user_name, wks, p->name ));
unbecome_root();
@ -625,7 +626,7 @@ static BOOL setup_bind_nak(pipes_struct *p)
Marshall a fault pdu.
*******************************************************************/
BOOL setup_fault_pdu(pipes_struct *p, uint32 status)
BOOL setup_fault_pdu(pipes_struct *p, NTSTATUS status)
{
prs_struct outgoing_pdu;
RPC_HDR fault_hdr;
@ -1203,7 +1204,7 @@ BOOL api_rpcTNP(pipes_struct *p, char *rpc_name,
* and not put the pipe into fault state. JRA.
*/
DEBUG(4, ("unknown\n"));
setup_fault_pdu(p, 0x1c010002);
setup_fault_pdu(p, NT_STATUS(0x1c010002));
return True;
}

View File

@ -570,7 +570,7 @@ static ssize_t process_complete_pdu(pipes_struct *p)
DEBUG(10,("process_complete_pdu: pipe %s in fault state.\n",
p->name ));
set_incoming_fault(p);
setup_fault_pdu(p, 0x1c010002);
setup_fault_pdu(p, NT_STATUS(0x1c010002));
return (ssize_t)data_len;
}
@ -619,7 +619,7 @@ static ssize_t process_complete_pdu(pipes_struct *p)
if (!reply) {
DEBUG(3,("process_complete_pdu: DCE/RPC fault sent on pipe %s\n", p->pipe_srv_name));
set_incoming_fault(p);
setup_fault_pdu(p, 0x1c010002);
setup_fault_pdu(p, NT_STATUS(0x1c010002));
prs_mem_free(&rpc_in);
} else {
/*

View File

@ -46,7 +46,7 @@ static void free_reg_info(void *ptr)
reg_reply_unknown_1
********************************************************************/
uint32 _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u)
NTSTATUS _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u)
{
/* set up the REG unknown_1 response */
ZERO_STRUCT(r_u->pol);
@ -55,26 +55,26 @@ uint32 _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u)
if (!close_policy_hnd(p, &q_u->pol))
return NT_STATUS_OBJECT_NAME_INVALID;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
reg_reply_open
********************************************************************/
uint32 _reg_open(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM *r_u)
NTSTATUS _reg_open(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM *r_u)
{
if (!create_policy_hnd(p, &r_u->pol, free_reg_info, NULL))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
reg_reply_open_entry
********************************************************************/
uint32 _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY *r_u)
NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY *r_u)
{
POLICY_HND pol;
fstring name;
@ -103,7 +103,7 @@ uint32 _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY
if (!create_policy_hnd(p, &pol, free_reg_info, (void *)info))
return NT_STATUS_TOO_MANY_SECRETS; /* ha ha very droll */
init_reg_r_open_entry(r_u, &pol, NT_STATUS_NOPROBLEMO);
init_reg_r_open_entry(r_u, &pol, NT_STATUS_OK);
DEBUG(5,("reg_open_entry: %d\n", __LINE__));
@ -114,9 +114,9 @@ uint32 _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY
reg_reply_info
********************************************************************/
uint32 _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
char *key = NULL;
uint32 type=0x1; /* key type: REG_SZ */
@ -141,7 +141,7 @@ uint32 _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
if ( strequal(name, "RefusePasswordChange") ) {
type=0xF770;
status = ERRbadfile;
status = NT_STATUS_NO_SUCH_FILE;
init_unistr2(uni_key, "", 0);
init_buffer2(buf, (uint8*) uni_key->buffer, uni_key->uni_str_len*2);
@ -186,9 +186,9 @@ uint32 _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
#define SHUTDOWN_F_STRING "-f"
uint32 _reg_shutdown(pipes_struct *p, REG_Q_SHUTDOWN *q_u, REG_R_SHUTDOWN *r_u)
NTSTATUS _reg_shutdown(pipes_struct *p, REG_Q_SHUTDOWN *q_u, REG_R_SHUTDOWN *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
pstring shutdown_script;
UNISTR2 unimsg = q_u->uni_msg;
pstring message;
@ -223,9 +223,9 @@ uint32 _reg_shutdown(pipes_struct *p, REG_Q_SHUTDOWN *q_u, REG_R_SHUTDOWN *r_u)
return status;
}
uint32 _reg_abort_shutdown(pipes_struct *p, REG_Q_ABORT_SHUTDOWN *q_u, REG_R_ABORT_SHUTDOWN *r_u)
NTSTATUS _reg_abort_shutdown(pipes_struct *p, REG_Q_ABORT_SHUTDOWN *q_u, REG_R_ABORT_SHUTDOWN *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
pstring abort_shutdown_script;
pstrcpy(abort_shutdown_script, lp_abort_shutdown_script());

View File

@ -727,7 +727,7 @@ static BOOL api_samr_set_userinfo(pipes_struct *p)
DEBUG(0,("api_samr_set_userinfo: Unable to unmarshall SAMR_Q_SET_USERINFO.\n"));
/* Fix for W2K SP2 */
if (q_u.switch_value == 0x1a) {
setup_fault_pdu(p, 0x1c000006);
setup_fault_pdu(p, NT_STATUS(0x1c000006));
return True;
}
return False;

View File

@ -88,7 +88,7 @@ static void samr_clear_sam_passwd(SAM_ACCOUNT *sam_pass)
dynamically returns the correct user info..... JRA.
********************************************************************/
static uint32 get_sampwd_entries(SAM_USER_INFO_21 *pw_buf, int start_idx,
static NTSTATUS get_sampwd_entries(SAM_USER_INFO_21 *pw_buf, int start_idx,
int *total_entries, int *num_entries,
int max_num_entries, uint16 acb_mask)
{
@ -152,10 +152,10 @@ static uint32 get_sampwd_entries(SAM_USER_INFO_21 *pw_buf, int start_idx,
if (not_finished)
return STATUS_MORE_ENTRIES;
else
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
static uint32 jf_get_sampwd_entries(SAM_USER_INFO_21 *pw_buf, int start_idx,
static NTSTATUS jf_get_sampwd_entries(SAM_USER_INFO_21 *pw_buf, int start_idx,
int *total_entries, uint32 *num_entries,
int max_num_entries, uint16 acb_mask)
{
@ -232,7 +232,7 @@ static uint32 jf_get_sampwd_entries(SAM_USER_INFO_21 *pw_buf, int start_idx,
if (not_finished)
return STATUS_MORE_ENTRIES;
else
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
#if 0 /* This function appears to be unused! */
@ -494,9 +494,9 @@ done:
_samr_close_hnd
********************************************************************/
uint32 _samr_close_hnd(pipes_struct *p, SAMR_Q_CLOSE_HND *q_u, SAMR_R_CLOSE_HND *r_u)
NTSTATUS _samr_close_hnd(pipes_struct *p, SAMR_Q_CLOSE_HND *q_u, SAMR_R_CLOSE_HND *r_u)
{
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* close the policy handle */
if (!close_policy_hnd(p, &q_u->pol))
@ -511,11 +511,11 @@ uint32 _samr_close_hnd(pipes_struct *p, SAMR_Q_CLOSE_HND *q_u, SAMR_R_CLOSE_HND
samr_reply_open_domain
********************************************************************/
uint32 _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_DOMAIN *r_u)
NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_DOMAIN *r_u)
{
struct samr_info *info;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the connection policy handle. */
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
@ -540,8 +540,8 @@ uint32 _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_D
static uint32 get_lsa_policy_samr_rid(struct samr_info *info)
{
if (!info) {
DEBUG(3,("Error getting policy\n"));
return 0xffffffff;
DEBUG(3,("Error getting policy\n"));
return 0xffffffff;
}
return info->sid.sub_auths[info->sid.num_auths-1];
@ -551,11 +551,11 @@ static uint32 get_lsa_policy_samr_rid(struct samr_info *info)
_samr_get_usrdom_pwinfo
********************************************************************/
uint32 _samr_get_usrdom_pwinfo(pipes_struct *p, SAMR_Q_GET_USRDOM_PWINFO *q_u, SAMR_R_GET_USRDOM_PWINFO *r_u)
NTSTATUS _samr_get_usrdom_pwinfo(pipes_struct *p, SAMR_Q_GET_USRDOM_PWINFO *q_u, SAMR_R_GET_USRDOM_PWINFO *r_u)
{
struct samr_info *info = NULL;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the policy handle. open a policy on it. */
if (!find_policy_by_hnd(p, &q_u->user_pol, (void **)&info)) {
@ -567,7 +567,7 @@ uint32 _samr_get_usrdom_pwinfo(pipes_struct *p, SAMR_Q_GET_USRDOM_PWINFO *q_u, S
return NT_STATUS_OBJECT_TYPE_MISMATCH;
}
init_samr_r_get_usrdom_pwinfo(r_u, NT_STATUS_NOPROBLEMO);
init_samr_r_get_usrdom_pwinfo(r_u, NT_STATUS_OK);
DEBUG(5,("_samr_get_usrdom_pwinfo: %d\n", __LINE__));
@ -578,7 +578,7 @@ uint32 _samr_get_usrdom_pwinfo(pipes_struct *p, SAMR_Q_GET_USRDOM_PWINFO *q_u, S
samr_make_usr_obj_sd
********************************************************************/
static uint32 samr_make_usr_obj_sd(TALLOC_CTX *ctx, SEC_DESC_BUF **buf, DOM_SID *usr_sid)
static NTSTATUS samr_make_usr_obj_sd(TALLOC_CTX *ctx, SEC_DESC_BUF **buf, DOM_SID *usr_sid)
{
extern DOM_SID global_sid_World;
DOM_SID adm_sid;
@ -616,7 +616,7 @@ static uint32 samr_make_usr_obj_sd(TALLOC_CTX *ctx, SEC_DESC_BUF **buf, DOM_SID
if((*buf = make_sec_desc_buf(ctx, sd_size, psd)) == NULL)
return NT_STATUS_NO_MEMORY;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
static BOOL get_lsa_policy_samr_sid(pipes_struct *p, POLICY_HND *pol, DOM_SID *sid)
@ -638,11 +638,11 @@ static BOOL get_lsa_policy_samr_sid(pipes_struct *p, POLICY_HND *pol, DOM_SID *s
_samr_query_sec_obj
********************************************************************/
uint32 _samr_query_sec_obj(pipes_struct *p, SAMR_Q_QUERY_SEC_OBJ *q_u, SAMR_R_QUERY_SEC_OBJ *r_u)
NTSTATUS _samr_query_sec_obj(pipes_struct *p, SAMR_Q_QUERY_SEC_OBJ *q_u, SAMR_R_QUERY_SEC_OBJ *r_u)
{
DOM_SID pol_sid;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* Get the SID. */
@ -651,7 +651,7 @@ uint32 _samr_query_sec_obj(pipes_struct *p, SAMR_Q_QUERY_SEC_OBJ *q_u, SAMR_R_QU
r_u->status = samr_make_usr_obj_sd(p->mem_ctx, &r_u->buf, &pol_sid);
if (r_u->status == NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_OK(r_u->status))
r_u->ptr = 1;
return r_u->status;
@ -701,13 +701,13 @@ static void make_user_sam_entry_list(TALLOC_CTX *ctx, SAM_ENTRY **sam_pp, UNISTR
samr_reply_enum_dom_users
********************************************************************/
uint32 _samr_enum_dom_users(pipes_struct *p, SAMR_Q_ENUM_DOM_USERS *q_u, SAMR_R_ENUM_DOM_USERS *r_u)
NTSTATUS _samr_enum_dom_users(pipes_struct *p, SAMR_Q_ENUM_DOM_USERS *q_u, SAMR_R_ENUM_DOM_USERS *r_u)
{
SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES];
int num_entries = 0;
int total_entries = 0;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the policy handle. open a policy on it. */
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
@ -720,7 +720,7 @@ uint32 _samr_enum_dom_users(pipes_struct *p, SAMR_Q_ENUM_DOM_USERS *q_u, SAMR_R_
MAX_SAM_ENTRIES, q_u->acb_mask);
unbecome_root();
if (r_u->status != NT_STATUS_NOPROBLEMO && r_u->status != STATUS_MORE_ENTRIES)
if (NT_STATUS_IS_ERR(r_u->status))
return r_u->status;
samr_clear_passwd_fields(pass, num_entries);
@ -791,7 +791,7 @@ static void make_group_sam_entry_list(TALLOC_CTX *ctx, SAM_ENTRY **sam_pp, UNIST
Get the group entries - similar to get_sampwd_entries().
********************************************************************/
static BOOL get_group_alias_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 start_idx,
static NTSTATUS get_group_alias_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 start_idx,
uint32 *p_num_entries, uint32 max_entries)
{
fstring sid_str;
@ -902,14 +902,14 @@ static BOOL get_group_alias_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_SID
DEBUG(10,("get_group_alias_entries: returning %d entries\n", *p_num_entries));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
Get the group entries - similar to get_sampwd_entries().
********************************************************************/
static uint32 get_group_domain_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 start_idx,
static NTSTATUS get_group_domain_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 start_idx,
uint32 *p_num_entries, uint32 max_entries)
{
GROUP_MAP *map=NULL;
@ -946,7 +946,7 @@ static uint32 get_group_domain_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_
*p_num_entries = num_entries;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -955,13 +955,13 @@ static uint32 get_group_domain_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM_
a real PDC. JRA.
********************************************************************/
uint32 _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAMR_R_ENUM_DOM_GROUPS *r_u)
NTSTATUS _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAMR_R_ENUM_DOM_GROUPS *r_u)
{
DOMAIN_GRP *grp=NULL;
uint32 num_entries;
DOM_SID sid;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &sid))
return NT_STATUS_INVALID_HANDLE;
@ -985,14 +985,15 @@ uint32 _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAMR_
samr_reply_enum_dom_aliases
********************************************************************/
uint32 _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, SAMR_R_ENUM_DOM_ALIASES *r_u)
NTSTATUS _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, SAMR_R_ENUM_DOM_ALIASES *r_u)
{
DOMAIN_GRP *grp=NULL;
uint32 num_entries = 0;
fstring sid_str;
DOM_SID sid;
NTSTATUS status;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &sid))
return NT_STATUS_INVALID_HANDLE;
@ -1000,8 +1001,9 @@ uint32 _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, SAM
sid_to_string(sid_str, &sid);
DEBUG(5,("samr_reply_enum_dom_aliases: sid %s\n", sid_str));
if (get_group_alias_entries(p->mem_ctx, &grp, &sid, q_u->start_idx, &num_entries, MAX_SAM_ENTRIES)!=NT_STATUS_NOPROBLEMO)
return NT_STATUS_ACCESS_DENIED;
status = get_group_alias_entries(p->mem_ctx, &grp, &sid, q_u->start_idx,
&num_entries, MAX_SAM_ENTRIES);
if (NT_STATUS_IS_ERR(status)) return status;
make_group_sam_entry_list(p->mem_ctx, &r_u->sam, &r_u->uni_grp_name, num_entries, grp);
@ -1018,7 +1020,7 @@ uint32 _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, SAM
samr_reply_query_dispinfo
********************************************************************/
uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_QUERY_DISPINFO *r_u)
NTSTATUS _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_QUERY_DISPINFO *r_u)
{
SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES];
DOMAIN_GRP *grps=NULL;
@ -1028,12 +1030,12 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
int total_entries = 0;
uint32 data_size = 0;
DOM_SID sid;
uint32 disp_ret;
NTSTATUS disp_ret;
SAM_DISPINFO_CTR *ctr;
DEBUG(5, ("samr_reply_query_dispinfo: %d\n", __LINE__));
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
if (!get_lsa_policy_samr_sid(p, &q_u->domain_pol, &sid))
return NT_STATUS_INVALID_HANDLE;
@ -1072,7 +1074,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
MAX_SAM_ENTRIES, acb_mask);
#endif
unbecome_root();
if (r_u->status!=STATUS_MORE_ENTRIES && r_u->status!=NT_STATUS_NOPROBLEMO) {
if (NT_STATUS_IS_ERR(r_u->status)) {
DEBUG(5, ("get_sampwd_entries: failed\n"));
return r_u->status;
}
@ -1080,8 +1082,8 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
case 0x3:
case 0x5:
r_u->status = get_group_domain_entries(p->mem_ctx, &grps, &sid, q_u->start_idx, &num_entries, MAX_SAM_ENTRIES);
if (r_u->status != NT_STATUS_NOPROBLEMO)
return NT_STATUS_ACCESS_DENIED;
if (NT_STATUS_IS_ERR(r_u->status))
return r_u->status;
break;
default:
DEBUG(0,("_samr_query_dispinfo: Unknown info level (%u)\n", (unsigned int)q_u->switch_level ));
@ -1116,7 +1118,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
return NT_STATUS_NO_MEMORY;
}
disp_ret = init_sam_dispinfo_1(p->mem_ctx, ctr->sam.info1, &num_entries, &data_size, q_u->start_idx, pass);
if (disp_ret != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(disp_ret))
return disp_ret;
break;
case 0x2:
@ -1125,7 +1127,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
return NT_STATUS_NO_MEMORY;
}
disp_ret = init_sam_dispinfo_2(p->mem_ctx, ctr->sam.info2, &num_entries, &data_size, q_u->start_idx, pass);
if (disp_ret != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(disp_ret))
return disp_ret;
break;
case 0x3:
@ -1134,7 +1136,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
return NT_STATUS_NO_MEMORY;
}
disp_ret = init_sam_dispinfo_3(p->mem_ctx, ctr->sam.info3, &num_entries, &data_size, q_u->start_idx, grps);
if (disp_ret != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(disp_ret))
return disp_ret;
break;
case 0x4:
@ -1143,7 +1145,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
return NT_STATUS_NO_MEMORY;
}
disp_ret = init_sam_dispinfo_4(p->mem_ctx, ctr->sam.info4, &num_entries, &data_size, q_u->start_idx, pass);
if (disp_ret != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(disp_ret))
return disp_ret;
break;
case 0x5:
@ -1152,7 +1154,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
return NT_STATUS_NO_MEMORY;
}
disp_ret = init_sam_dispinfo_5(p->mem_ctx, ctr->sam.info5, &num_entries, &data_size, q_u->start_idx, grps);
if (disp_ret != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(disp_ret))
return disp_ret;
break;
default:
@ -1174,7 +1176,7 @@ uint32 _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_
samr_reply_query_aliasinfo
********************************************************************/
uint32 _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_R_QUERY_ALIASINFO *r_u)
NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_R_QUERY_ALIASINFO *r_u)
{
fstring alias_desc = "Local Unix group";
fstring alias="";
@ -1182,7 +1184,7 @@ uint32 _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_
uint32 alias_rid;
struct samr_info *info = NULL;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_samr_query_aliasinfo: %d\n", __LINE__));
@ -1222,7 +1224,7 @@ uint32 _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_
uint32 rid[MAX_SAM_ENTRIES];
int num_rids = q_u->num_sids1;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_samr_lookup_ids: %d\n", __LINE__));
@ -1264,7 +1266,7 @@ uint32 _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_
num_rids = 1;
rid[0] = BUILTIN_ALIAS_RID_USERS;
init_samr_r_lookup_ids(&r_u, num_rids, rid, NT_STATUS_NOPROBLEMO);
init_samr_r_lookup_ids(&r_u, num_rids, rid, NT_STATUS_OK);
DEBUG(5,("_samr_lookup_ids: %d\n", __LINE__));
@ -1276,7 +1278,7 @@ uint32 _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_
_samr_lookup_names
********************************************************************/
uint32 _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOKUP_NAMES *r_u)
NTSTATUS _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOKUP_NAMES *r_u)
{
uint32 rid[MAX_SAM_ENTRIES];
enum SID_NAME_USE type[MAX_SAM_ENTRIES];
@ -1284,7 +1286,7 @@ uint32 _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOK
int num_rids = q_u->num_names2;
DOM_SID pol_sid;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_samr_lookup_names: %d\n", __LINE__));
@ -1315,7 +1317,7 @@ uint32 _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOK
DOM_SID sid;
if(local_lookup_name(global_myname, name, &sid, &type[i])) {
sid_split_rid( &sid, &rid[i]);
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
}
}
}
@ -1331,14 +1333,14 @@ uint32 _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOK
_samr_chgpasswd_user
********************************************************************/
uint32 _samr_chgpasswd_user(pipes_struct *p, SAMR_Q_CHGPASSWD_USER *q_u, SAMR_R_CHGPASSWD_USER *r_u)
NTSTATUS _samr_chgpasswd_user(pipes_struct *p, SAMR_Q_CHGPASSWD_USER *q_u, SAMR_R_CHGPASSWD_USER *r_u)
{
fstring user_name;
fstring wks;
DEBUG(5,("_samr_chgpasswd_user: %d\n", __LINE__));
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
rpcstr_pull(user_name, q_u->uni_user_name.buffer, sizeof(user_name), q_u->uni_user_name.uni_str_len*2, 0);
rpcstr_pull(wks, q_u->uni_dest_host.buffer, sizeof(wks), q_u->uni_dest_host.uni_str_len,0);
@ -1409,7 +1411,7 @@ static BOOL make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names, fstring nam
_samr_lookup_rids
********************************************************************/
uint32 _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP_RIDS *r_u)
NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP_RIDS *r_u)
{
fstring group_names[MAX_SAM_ENTRIES];
uint32 *group_attrs = NULL;
@ -1419,7 +1421,7 @@ uint32 _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP
int num_rids = q_u->num_rids1;
int i;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_samr_lookup_rids: %d\n", __LINE__));
@ -1453,7 +1455,7 @@ uint32 _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP
sid_append_rid(&sid, q_u->rid[i]);
if (lookup_sid(&sid, domname, tmpname, &type)) {
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
group_attrs[i] = (uint32)type;
fstrcpy(group_names[i],tmpname);
DEBUG(5,("_samr_lookup_rids: %s:%d\n", group_names[i], group_attrs[i]));
@ -1475,7 +1477,7 @@ uint32 _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP
_api_samr_open_user. Safe - gives out no passwd info.
********************************************************************/
uint32 _api_samr_open_user(pipes_struct *p, SAMR_Q_OPEN_USER *q_u, SAMR_R_OPEN_USER *r_u)
NTSTATUS _api_samr_open_user(pipes_struct *p, SAMR_Q_OPEN_USER *q_u, SAMR_R_OPEN_USER *r_u)
{
SAM_ACCOUNT *sampass=NULL;
DOM_SID sid;
@ -1485,7 +1487,7 @@ uint32 _api_samr_open_user(pipes_struct *p, SAMR_Q_OPEN_USER *q_u, SAMR_R_OPEN_U
struct samr_info *info = NULL;
BOOL ret;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the domain policy handle. */
if (!find_policy_by_hnd(p, &domain_pol, NULL))
@ -1571,7 +1573,7 @@ static BOOL get_user_info_10(SAM_USER_INFO_10 *id10, uint32 user_rid)
user. JRA.
*************************************************************************/
static uint32 get_user_info_12(pipes_struct *p, SAM_USER_INFO_12 * id12, uint32 user_rid)
static NTSTATUS get_user_info_12(pipes_struct *p, SAM_USER_INFO_12 * id12, uint32 user_rid)
{
SAM_ACCOUNT *smbpass=NULL;
BOOL ret;
@ -1607,7 +1609,7 @@ static uint32 get_user_info_12(pipes_struct *p, SAM_USER_INFO_12 * id12, uint32
pdb_free_sam(smbpass);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*************************************************************************
@ -1690,13 +1692,13 @@ static BOOL get_user_info_21(SAM_USER_INFO_21 *id21, uint32 user_rid)
_samr_query_userinfo
********************************************************************/
uint32 _samr_query_userinfo(pipes_struct *p, SAMR_Q_QUERY_USERINFO *q_u, SAMR_R_QUERY_USERINFO *r_u)
NTSTATUS _samr_query_userinfo(pipes_struct *p, SAMR_Q_QUERY_USERINFO *q_u, SAMR_R_QUERY_USERINFO *r_u)
{
SAM_USERINFO_CTR *ctr;
uint32 rid = 0;
struct samr_info *info = NULL;
r_u->status=NT_STATUS_NOPROBLEMO;
r_u->status=NT_STATUS_OK;
/* search for the handle */
if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
@ -1758,7 +1760,7 @@ uint32 _samr_query_userinfo(pipes_struct *p, SAMR_Q_QUERY_USERINFO *q_u, SAMR_R_
if (ctr->info.id12 == NULL)
return NT_STATUS_NO_MEMORY;
if ((r_u->status = get_user_info_12(p, ctr->info.id12, rid)) != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(r_u->status = get_user_info_12(p, ctr->info.id12, rid)))
return r_u->status;
break;
@ -1793,7 +1795,7 @@ uint32 _samr_query_userinfo(pipes_struct *p, SAMR_Q_QUERY_USERINFO *q_u, SAMR_R_
samr_reply_query_usergroups
********************************************************************/
uint32 _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, SAMR_R_QUERY_USERGROUPS *r_u)
NTSTATUS _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, SAMR_R_QUERY_USERGROUPS *r_u)
{
SAM_ACCOUNT *sam_pass=NULL;
DOM_GID *gids = NULL;
@ -1803,7 +1805,7 @@ uint32 _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, SAM
struct samr_info *info = NULL;
BOOL ret;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_samr_query_usergroups: %d\n", __LINE__));
@ -1844,7 +1846,7 @@ uint32 _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, SAM
_samr_query_dom_info
********************************************************************/
uint32 _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR_R_QUERY_DOMAIN_INFO *r_u)
NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR_R_QUERY_DOMAIN_INFO *r_u)
{
SAM_UNK_CTR *ctr;
@ -1853,7 +1855,7 @@ uint32 _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR
ZERO_STRUCTP(ctr);
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_samr_query_dom_info: %d\n", __LINE__));
@ -1888,7 +1890,7 @@ uint32 _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR
return NT_STATUS_INVALID_INFO_CLASS;
}
init_samr_r_query_dom_info(r_u, q_u->switch_value, ctr, NT_STATUS_NOPROBLEMO);
init_samr_r_query_dom_info(r_u, q_u->switch_value, ctr, NT_STATUS_OK);
DEBUG(5,("_samr_query_dom_info: %d\n", __LINE__));
@ -1899,7 +1901,7 @@ uint32 _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR
_api_samr_create_user
********************************************************************/
uint32 _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_CREATE_USER *r_u)
NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_CREATE_USER *r_u)
{
SAM_ACCOUNT *sam_pass=NULL;
fstring mach_acct;
@ -2018,20 +2020,20 @@ uint32 _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_CR
pdb_free_sam(sam_pass);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
samr_reply_connect_anon
********************************************************************/
uint32 _samr_connect_anon(pipes_struct *p, SAMR_Q_CONNECT_ANON *q_u, SAMR_R_CONNECT_ANON *r_u)
NTSTATUS _samr_connect_anon(pipes_struct *p, SAMR_Q_CONNECT_ANON *q_u, SAMR_R_CONNECT_ANON *r_u)
{
struct samr_info *info = NULL;
/* set up the SAMR connect_anon response */
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* associate the user's SID with the new handle. */
if ((info = (struct samr_info *)malloc(sizeof(struct samr_info))) == NULL)
@ -2051,13 +2053,13 @@ uint32 _samr_connect_anon(pipes_struct *p, SAMR_Q_CONNECT_ANON *q_u, SAMR_R_CONN
samr_reply_connect
********************************************************************/
uint32 _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u)
NTSTATUS _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u)
{
struct samr_info *info = NULL;
DEBUG(5,("_samr_connect: %d\n", __LINE__));
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* associate the user's SID with the new handle. */
if ((info = (struct samr_info *)malloc(sizeof(struct samr_info))) == NULL)
@ -2079,9 +2081,9 @@ uint32 _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u)
api_samr_lookup_domain
**********************************************************************/
uint32 _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_LOOKUP_DOMAIN *r_u)
NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_LOOKUP_DOMAIN *r_u)
{
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
if (!find_policy_by_hnd(p, &q_u->connect_pol, NULL))
return NT_STATUS_INVALID_HANDLE;
@ -2135,12 +2137,12 @@ static BOOL make_enum_domains(TALLOC_CTX *ctx, SAM_ENTRY **pp_sam,
api_samr_enum_domains
**********************************************************************/
uint32 _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_ENUM_DOMAINS *r_u)
NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_ENUM_DOMAINS *r_u)
{
uint32 num_entries = 2;
fstring dom[2];
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
fstrcpy(dom[0],global_myworkgroup);
fstrcpy(dom[1],"Builtin");
@ -2157,7 +2159,7 @@ uint32 _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_ENUM
api_samr_open_alias
********************************************************************/
uint32 _api_samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OPEN_ALIAS *r_u)
NTSTATUS _api_samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OPEN_ALIAS *r_u)
{
DOM_SID sid;
POLICY_HND domain_pol = q_u->dom_pol;
@ -2165,7 +2167,7 @@ uint32 _api_samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OPEN
POLICY_HND *alias_pol = &r_u->pol;
struct samr_info *info = NULL;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* get the domain policy. */
if (!find_policy_by_hnd(p, &domain_pol, NULL))
@ -2448,7 +2450,7 @@ static BOOL set_user_info_pw(char *pass, uint32 rid)
samr_reply_set_userinfo
********************************************************************/
uint32 _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SET_USERINFO *r_u)
NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SET_USERINFO *r_u)
{
uint32 rid = 0x0;
DOM_SID sid;
@ -2462,7 +2464,7 @@ uint32 _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SET_
DEBUG(5, ("_samr_set_userinfo: %d\n", __LINE__));
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
if (p->ntlmssp_auth_validated) {
memcpy(&user, &p->pipe_user, sizeof(user));
@ -2563,7 +2565,7 @@ uint32 _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SET_
samr_reply_set_userinfo2
********************************************************************/
uint32 _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_SET_USERINFO2 *r_u)
NTSTATUS _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_SET_USERINFO2 *r_u)
{
DOM_SID sid;
uint32 rid = 0x0;
@ -2573,7 +2575,7 @@ uint32 _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_SE
DEBUG(5, ("samr_reply_set_userinfo2: %d\n", __LINE__));
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
/* find the policy handle. open a policy on it. */
if (!get_lsa_policy_samr_sid(p, pol, &sid))
@ -2616,7 +2618,7 @@ uint32 _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_SE
_samr_query_aliasmem
*********************************************************************/
uint32 _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, SAMR_R_QUERY_USERALIASES *r_u)
NTSTATUS _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, SAMR_R_QUERY_USERALIASES *r_u)
{
uint32 *rid=NULL;
int num_rids;
@ -2630,9 +2632,9 @@ uint32 _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, S
rid[0] = BUILTIN_ALIAS_RID_USERS;
init_samr_r_query_useraliases(r_u, num_rids, rid, NT_STATUS_NOPROBLEMO);
init_samr_r_query_useraliases(r_u, num_rids, rid, NT_STATUS_OK);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
@ -2640,7 +2642,7 @@ uint32 _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, S
_samr_query_aliasmem
*********************************************************************/
uint32 _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_R_QUERY_ALIASMEM *r_u)
NTSTATUS _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_R_QUERY_ALIASMEM *r_u)
{
int i;
@ -2694,16 +2696,16 @@ uint32 _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_R_
}
DEBUG(10, ("sid is %s\n", alias_sid_str));
init_samr_r_query_aliasmem(r_u, num_uids, sid, NT_STATUS_NOPROBLEMO);
init_samr_r_query_aliasmem(r_u, num_uids, sid, NT_STATUS_OK);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_query_groupmem
*********************************************************************/
uint32 _samr_query_groupmem(pipes_struct *p, SAMR_Q_QUERY_GROUPMEM *q_u, SAMR_R_QUERY_GROUPMEM *r_u)
NTSTATUS _samr_query_groupmem(pipes_struct *p, SAMR_Q_QUERY_GROUPMEM *q_u, SAMR_R_QUERY_GROUPMEM *r_u)
{
int num_uids = 0;
int i;
@ -2752,16 +2754,16 @@ uint32 _samr_query_groupmem(pipes_struct *p, SAMR_Q_QUERY_GROUPMEM *q_u, SAMR_R_
attr[i] = SID_NAME_USER;
}
init_samr_r_query_groupmem(r_u, num_uids, rid, attr, NT_STATUS_NOPROBLEMO);
init_samr_r_query_groupmem(r_u, num_uids, rid, attr, NT_STATUS_OK);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_add_aliasmem
*********************************************************************/
uint32 _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_ADD_ALIASMEM *r_u)
NTSTATUS _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_ADD_ALIASMEM *r_u)
{
DOM_SID alias_sid;
fstring alias_sid_str;
@ -2820,24 +2822,24 @@ uint32 _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_ADD_
if(!user_in_group_list(pwd->pw_name, grp_name))
return NT_STATUS_MEMBER_NOT_IN_ALIAS; /* don't know what to reply else */
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_del_aliasmem
*********************************************************************/
uint32 _samr_del_aliasmem(pipes_struct *p, SAMR_Q_DEL_ALIASMEM *q_u, SAMR_R_DEL_ALIASMEM *r_u)
NTSTATUS _samr_del_aliasmem(pipes_struct *p, SAMR_Q_DEL_ALIASMEM *q_u, SAMR_R_DEL_ALIASMEM *r_u)
{
DEBUG(0,("_samr_del_aliasmem: Not yet implemented.\n"));
return False;
DEBUG(0,("_samr_del_aliasmem: Not yet implemented.\n"));
return NT_STATUS_NOT_IMPLEMENTED;
}
/*********************************************************************
_samr_add_groupmem
*********************************************************************/
uint32 _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_ADD_GROUPMEM *r_u)
NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_ADD_GROUPMEM *r_u)
{
DOM_SID group_sid;
fstring group_sid_str;
@ -2886,34 +2888,34 @@ uint32 _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_ADD_
if(!user_in_group_list(pwd->pw_name, grp_name))
return NT_STATUS_MEMBER_NOT_IN_GROUP; /* don't know what to reply else */
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_del_groupmem
*********************************************************************/
uint32 _samr_del_groupmem(pipes_struct *p, SAMR_Q_DEL_GROUPMEM *q_u, SAMR_R_DEL_GROUPMEM *r_u)
NTSTATUS _samr_del_groupmem(pipes_struct *p, SAMR_Q_DEL_GROUPMEM *q_u, SAMR_R_DEL_GROUPMEM *r_u)
{
DEBUG(0,("_samr_del_groupmem: Not yet implemented.\n"));
return False;
DEBUG(0,("_samr_del_groupmem: Not yet implemented.\n"));
return NT_STATUS_NOT_IMPLEMENTED;
}
/*********************************************************************
_samr_delete_dom_user
*********************************************************************/
uint32 _samr_delete_dom_user(pipes_struct *p, SAMR_Q_DELETE_DOM_USER *q_u, SAMR_R_DELETE_DOM_USER *r_u )
NTSTATUS _samr_delete_dom_user(pipes_struct *p, SAMR_Q_DELETE_DOM_USER *q_u, SAMR_R_DELETE_DOM_USER *r_u )
{
DEBUG(0,("_samr_delete_dom_user: Not yet implemented.\n"));
return False;
DEBUG(0,("_samr_delete_dom_user: Not yet implemented.\n"));
return NT_STATUS_NOT_IMPLEMENTED;
}
/*********************************************************************
_samr_delete_dom_group
*********************************************************************/
uint32 _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, SAMR_R_DELETE_DOM_GROUP *r_u)
NTSTATUS _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, SAMR_R_DELETE_DOM_GROUP *r_u)
{
DOM_SID group_sid;
DOM_SID dom_sid;
@ -2963,14 +2965,14 @@ uint32 _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, SAM
if (!close_policy_hnd(p, &q_u->group_pol))
return NT_STATUS_OBJECT_NAME_INVALID;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_delete_dom_alias
*********************************************************************/
uint32 _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, SAMR_R_DELETE_DOM_ALIAS *r_u)
NTSTATUS _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, SAMR_R_DELETE_DOM_ALIAS *r_u)
{
DOM_SID alias_sid;
DOM_SID dom_sid;
@ -3020,14 +3022,14 @@ uint32 _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, SAM
if (!close_policy_hnd(p, &q_u->alias_pol))
return NT_STATUS_OBJECT_NAME_INVALID;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_create_dom_group
*********************************************************************/
uint32 _samr_create_dom_group(pipes_struct *p, SAMR_Q_CREATE_DOM_GROUP *q_u, SAMR_R_CREATE_DOM_GROUP *r_u)
NTSTATUS _samr_create_dom_group(pipes_struct *p, SAMR_Q_CREATE_DOM_GROUP *q_u, SAMR_R_CREATE_DOM_GROUP *r_u)
{
DOM_SID dom_sid;
DOM_SID info_sid;
@ -3077,14 +3079,14 @@ uint32 _samr_create_dom_group(pipes_struct *p, SAMR_Q_CREATE_DOM_GROUP *q_u, SAM
if (!create_policy_hnd(p, &r_u->pol, free_samr_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_create_dom_alias
*********************************************************************/
uint32 _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, SAMR_R_CREATE_DOM_ALIAS *r_u)
NTSTATUS _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, SAMR_R_CREATE_DOM_ALIAS *r_u)
{
DOM_SID dom_sid;
fstring name;
@ -3133,7 +3135,7 @@ uint32 _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, SAM
if (!create_policy_hnd(p, &r_u->alias_pol, free_samr_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
@ -3143,7 +3145,7 @@ sends the name/comment pair of a domain group
level 1 send also the number of users of that group
*********************************************************************/
uint32 _samr_query_groupinfo(pipes_struct *p, SAMR_Q_QUERY_GROUPINFO *q_u, SAMR_R_QUERY_GROUPINFO *r_u)
NTSTATUS _samr_query_groupinfo(pipes_struct *p, SAMR_Q_QUERY_GROUPINFO *q_u, SAMR_R_QUERY_GROUPINFO *r_u)
{
DOM_SID group_sid;
GROUP_MAP map;
@ -3177,9 +3179,9 @@ uint32 _samr_query_groupinfo(pipes_struct *p, SAMR_Q_QUERY_GROUPINFO *q_u, SAMR_
return NT_STATUS_INVALID_INFO_CLASS;
}
init_samr_r_query_groupinfo(r_u, ctr, NT_STATUS_NOPROBLEMO);
init_samr_r_query_groupinfo(r_u, ctr, NT_STATUS_OK);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
@ -3188,7 +3190,7 @@ uint32 _samr_query_groupinfo(pipes_struct *p, SAMR_Q_QUERY_GROUPINFO *q_u, SAMR_
update a domain group's comment.
*********************************************************************/
uint32 _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_SET_GROUPINFO *r_u)
NTSTATUS _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_SET_GROUPINFO *r_u)
{
DOM_SID group_sid;
GROUP_MAP map;
@ -3216,7 +3218,7 @@ uint32 _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_SE
if(!add_mapping_entry(&map, TDB_REPLACE))
return NT_STATUS_NO_SUCH_GROUP;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
@ -3225,7 +3227,7 @@ uint32 _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_SE
update a domain group's comment.
*********************************************************************/
uint32 _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_SET_ALIASINFO *r_u)
NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_SET_ALIASINFO *r_u)
{
DOM_SID group_sid;
GROUP_MAP map;
@ -3250,24 +3252,24 @@ uint32 _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_SE
if(!add_mapping_entry(&map, TDB_REPLACE))
return NT_STATUS_NO_SUCH_GROUP;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_get_dom_pwinfo
*********************************************************************/
uint32 _samr_get_dom_pwinfo(pipes_struct *p, SAMR_Q_GET_DOM_PWINFO *q_u, SAMR_R_GET_DOM_PWINFO *r_u)
NTSTATUS _samr_get_dom_pwinfo(pipes_struct *p, SAMR_Q_GET_DOM_PWINFO *q_u, SAMR_R_GET_DOM_PWINFO *r_u)
{
/* Actually, returning zeros here works quite well :-). */
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_open_group
*********************************************************************/
uint32 _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_GROUP *r_u)
NTSTATUS _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_GROUP *r_u)
{
DOM_SID sid;
GROUP_MAP map;
@ -3300,15 +3302,15 @@ uint32 _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_GRO
if (!create_policy_hnd(p, &r_u->pol, free_samr_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*********************************************************************
_samr_unknown_2d
*********************************************************************/
uint32 _samr_unknown_2d(pipes_struct *p, SAMR_Q_UNKNOWN_2D *q_u, SAMR_R_UNKNOWN_2D *r_u)
NTSTATUS _samr_unknown_2d(pipes_struct *p, SAMR_Q_UNKNOWN_2D *q_u, SAMR_R_UNKNOWN_2D *r_u)
{
DEBUG(0,("_samr_unknown_2d: Not yet implemented.\n"));
return False;
DEBUG(0,("_samr_unknown_2d: Not yet implemented.\n"));
return NT_STATUS_NOT_IMPLEMENTED;
}

View File

@ -1110,7 +1110,7 @@ static BOOL api_spoolss_addprintprocessor(pipes_struct *p)
automatically set the winprint processor for printer
entries later. Used to debug the LexMark Optra S 1855 PCL
driver --jerry */
r_u.status = NT_STATUS_NOPROBLEMO;
r_u.status = NT_STATUS_OK;
if(!spoolss_io_r_addprintprocessor("", &r_u, rdata, 0)) {
DEBUG(0,("spoolss_io_r_addprintprocessor: unable to marshall SPOOL_R_ADDPRINTPROCESSOR.\n"));

File diff suppressed because it is too large Load Diff

View File

@ -303,7 +303,8 @@ void map_generic_share_sd_bits(SEC_DESC *psd)
BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 desired_access)
{
uint32 granted, status;
uint32 granted;
NTSTATUS status;
TALLOC_CTX *mem_ctx = NULL;
SEC_DESC *psd = NULL;
size_t sd_size;
@ -530,7 +531,7 @@ static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n
if (init_srv_share_info_ctr(p, &r_n->ctr, info_level,
&resume_hnd, &r_n->total_entries, all)) {
r_n->status = NT_STATUS_NOPROBLEMO;
r_n->status = NT_STATUS_OK;
} else {
r_n->status = NT_STATUS_INVALID_INFO_CLASS;
}
@ -545,7 +546,7 @@ static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n
static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_INFO *r_n,
char *share_name, uint32 info_level)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
int snum;
DEBUG(5,("init_srv_r_net_share_get_info: %d\n", __LINE__));
@ -577,7 +578,7 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I
status = NT_STATUS_BAD_NETWORK_NAME;
}
r_n->info.ptr_share_ctr = (status == NT_STATUS_NOPROBLEMO) ? 1 : 0;
r_n->info.ptr_share_ctr = NT_STATUS_IS_OK(status) ? 1 : 0;
r_n->status = status;
}
@ -694,10 +695,10 @@ static void init_srv_sess_info_1(SRV_SESS_INFO_1 *ss1, uint32 *snum, uint32 *sto
makes a SRV_R_NET_SESS_ENUM structure.
********************************************************************/
static uint32 init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr,
static NTSTATUS init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr,
int switch_value, uint32 *resume_hnd, uint32 *total_entries)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
DEBUG(5,("init_srv_sess_info_ctr: %d\n", __LINE__));
ctr->switch_value = switch_value;
@ -739,7 +740,7 @@ static void init_srv_r_net_sess_enum(SRV_R_NET_SESS_ENUM *r_n,
else
r_n->status = init_srv_sess_info_ctr(r_n->ctr, switch_value, &resume_hnd, &r_n->total_entries);
if (r_n->status != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(r_n->status))
resume_hnd = 0;
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@ -850,10 +851,10 @@ static void init_srv_conn_info_1(SRV_CONN_INFO_1 *ss1, uint32 *snum, uint32 *sto
makes a SRV_R_NET_CONN_ENUM structure.
********************************************************************/
static uint32 init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr,
static NTSTATUS init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr,
int switch_value, uint32 *resume_hnd, uint32 *total_entries)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
DEBUG(5,("init_srv_conn_info_ctr: %d\n", __LINE__));
ctr->switch_value = switch_value;
@ -894,7 +895,7 @@ static void init_srv_r_net_conn_enum(SRV_R_NET_CONN_ENUM *r_n,
else
r_n->status = init_srv_conn_info_ctr(r_n->ctr, switch_value, &resume_hnd, &r_n->total_entries);
if (r_n->status != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(r_n->status))
resume_hnd = 0;
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@ -950,10 +951,10 @@ static void init_srv_file_info_3(SRV_FILE_INFO_3 *fl3, uint32 *fnum, uint32 *fto
makes a SRV_R_NET_FILE_ENUM structure.
********************************************************************/
static uint32 init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr,
static NTSTATUS init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr,
int switch_value, uint32 *resume_hnd, uint32 *total_entries)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
DEBUG(5,("init_srv_file_info_ctr: %d\n", __LINE__));
ctr->switch_value = switch_value;
@ -990,7 +991,7 @@ static void init_srv_r_net_file_enum(SRV_R_NET_FILE_ENUM *r_n,
else
r_n->status = init_srv_file_info_ctr(r_n->ctr, switch_value, &resume_hnd, &(r_n->total_entries));
if (r_n->status != NT_STATUS_NOPROBLEMO)
if (NT_STATUS_IS_ERR(r_n->status))
resume_hnd = 0;
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@ -1000,9 +1001,9 @@ static void init_srv_r_net_file_enum(SRV_R_NET_FILE_ENUM *r_n,
net server get info
********************************************************************/
uint32 _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u)
NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u)
{
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
SRV_INFO_CTR *ctr = (SRV_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_INFO_CTR));
if (!ctr)
@ -1054,12 +1055,12 @@ uint32 _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R
net server set info
********************************************************************/
uint32 _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u)
NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u)
{
/* NT gives "Windows NT error 0xc00000022" if we return
NT_STATUS_ACCESS_DENIED here so just pretend everything is OK. */
uint32 status = NT_STATUS_NOPROBLEMO;
NTSTATUS status = NT_STATUS_OK;
DEBUG(5,("srv_net_srv_set_info: %d\n", __LINE__));
@ -1076,7 +1077,7 @@ uint32 _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R
net file enum
********************************************************************/
uint32 _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u)
NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u)
{
r_u->ctr = (SRV_FILE_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_FILE_INFO_CTR));
if (!r_u->ctr)
@ -1101,7 +1102,7 @@ uint32 _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_F
net conn enum
********************************************************************/
uint32 _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u)
NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u)
{
DEBUG(5,("srv_net_conn_enum: %d\n", __LINE__));
@ -1126,7 +1127,7 @@ uint32 _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_C
net sess enum
********************************************************************/
uint32 _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u)
NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u)
{
DEBUG(5,("_srv_net_sess_enum: %d\n", __LINE__));
@ -1151,7 +1152,7 @@ uint32 _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_S
Net share enum all.
********************************************************************/
uint32 _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
{
DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__));
@ -1169,7 +1170,7 @@ uint32 _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R
Net share enum.
********************************************************************/
uint32 _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
{
DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__));
@ -1187,7 +1188,7 @@ uint32 _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET
Net share get info.
********************************************************************/
uint32 _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u)
NTSTATUS _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u)
{
fstring share_name;
@ -1247,7 +1248,7 @@ static char *valid_share_pathname(char *dos_pathname)
Net share set info. Modify share details.
********************************************************************/
uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u)
NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u)
{
struct current_user user;
pstring command;
@ -1267,27 +1268,27 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
r_u->switch_value = 0;
if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
snum = find_service(share_name);
/* Does this share exist ? */
if (snum < 0)
return ERRnosuchshare;
return NT_STATUS_BAD_NETWORK_NAME;
/* No change to printer shares. */
if (lp_print_ok(snum))
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
get_current_user(&user,p);
if (user.uid != 0)
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
switch (q_u->info_level) {
case 1:
/* Not enough info in a level 1 to do anything. */
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
case 2:
unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name));
unistr2_to_ascii(pathname, &q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name));
@ -1302,7 +1303,7 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
map_generic_share_sd_bits(psd);
break;
case 1005:
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
case 1501:
fstrcpy(pathname, lp_pathname(snum));
fstrcpy(comment, lp_comment(snum));
@ -1317,11 +1318,11 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
/* We can only modify disk shares. */
if (type != STYPE_DISKTREE)
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
/* Check if the pathname is valid. */
if (!(ptr = valid_share_pathname( pathname )))
return ERRbadpath;
return NT_STATUS_OBJECT_PATH_INVALID;
/* Ensure share name, pathname and comment don't contain '"' characters. */
string_replace(share_name, '"', ' ');
@ -1335,7 +1336,7 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
if (strcmp(ptr, lp_pathname(snum)) || strcmp(comment, lp_comment(snum)) ) {
if (!lp_change_share_cmd() || !*lp_change_share_cmd())
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
lp_change_share_cmd(), CONFIGFILE, share_name, ptr, comment);
@ -1343,7 +1344,7 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
DEBUG(0,("_srv_net_share_set_info: Running [%s] returned (%d)\n", command, ret ));
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
}
/* Tell everyone we updated smb.conf. */
@ -1369,14 +1370,14 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
Net share add. Call 'add_share_command "sharename" "pathname" "comment" "read only = xxx"'
********************************************************************/
uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u)
NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u)
{
struct current_user user;
pstring command;
@ -1397,18 +1398,18 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
if (user.uid != 0) {
DEBUG(10,("_srv_net_share_add: uid != 0. Access denied.\n"));
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
}
if (!lp_add_share_cmd() || !*lp_add_share_cmd()) {
DEBUG(10,("_srv_net_share_add: No add share command\n"));
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
}
switch (q_u->info_level) {
case 1:
/* Not enough info in a level 1 to do anything. */
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
case 2:
unistr2_to_ascii(share_name, &q_u->info.share.info2.info_2_str.uni_netname, sizeof(share_name));
unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name));
@ -1425,28 +1426,28 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
break;
case 1005:
/* DFS only level. */
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
default:
DEBUG(5,("_srv_net_share_add: unsupported switch value %d\n", q_u->info_level));
return NT_STATUS_INVALID_INFO_CLASS;
}
if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
snum = find_service(share_name);
/* Share already exists. */
if (snum >= 0)
return ERRfilexists;
return NT_STATUS_OBJECT_NAME_COLLISION;
/* We can only add disk shares. */
if (type != STYPE_DISKTREE)
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
/* Check if the pathname is valid. */
if (!(ptr = valid_share_pathname( pathname )))
return ERRbadpath;
return NT_STATUS_OBJECT_PATH_INVALID;
/* Ensure share name, pathname and comment don't contain '"' characters. */
string_replace(share_name, '"', ' ');
@ -1459,7 +1460,7 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
DEBUG(10,("_srv_net_share_add: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
DEBUG(0,("_srv_net_share_add: Running [%s] returned (%d)\n", command, ret ));
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
}
if (psd) {
@ -1479,7 +1480,7 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
@ -1487,7 +1488,7 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
a parameter.
********************************************************************/
uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u)
NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u)
{
struct current_user user;
pstring command;
@ -1500,24 +1501,24 @@ uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S
unistr2_to_ascii(share_name, &q_u->uni_share_name, sizeof(share_name));
if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
snum = find_service(share_name);
if (snum < 0)
return ERRnosuchshare;
return NT_STATUS_BAD_NETWORK_NAME;
/* No change to printer shares. */
if (lp_print_ok(snum))
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
get_current_user(&user,p);
if (user.uid != 0)
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
if (!lp_delete_share_cmd() || !*lp_delete_share_cmd())
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\"",
lp_delete_share_cmd(), CONFIGFILE, lp_servicename(snum));
@ -1525,7 +1526,7 @@ uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S
DEBUG(10,("_srv_net_share_del: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
DEBUG(0,("_srv_net_share_del: Running [%s] returned (%d)\n", command, ret ));
return ERRnoaccess;
return NT_STATUS_ACCESS_DENIED;
}
/* Delete the SD in the database. */
@ -1536,14 +1537,14 @@ uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S
lp_killservice(snum);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/*******************************************************************
time of day
********************************************************************/
uint32 _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u)
NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u)
{
TIME_OF_DAY_INFO *tod;
struct tm *t;
@ -1557,7 +1558,7 @@ uint32 _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET
r_u->tod = tod;
r_u->ptr_srv_tod = 0x1;
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
@ -1587,7 +1588,7 @@ uint32 _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET
Win9x NT tools get security descriptor.
***********************************************************************************/
uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u,
NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u,
SRV_R_NET_FILE_QUERY_SECDESC *r_u)
{
SEC_DESC *psd = NULL;
@ -1600,14 +1601,14 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
BOOL bad_path;
int access_mode;
int action;
int ecode;
NTSTATUS ecode;
struct current_user user;
fstring user_name;
connection_struct *conn = NULL;
ZERO_STRUCT(st);
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname));
@ -1621,7 +1622,7 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
if (conn == NULL) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to connect to %s\n", qualname));
r_u->status = (uint32)ecode;
r_u->status = ecode;
goto error_exit;
}
@ -1638,7 +1639,7 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
if (!fsp) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename));
r_u->status = ERRnoaccess;
r_u->status = NT_STATUS_ACCESS_DENIED;
goto error_exit;
}
}
@ -1647,7 +1648,7 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
if (sd_size == 0) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to get NT ACL for file %s\n", filename));
r_u->status = ERRnoaccess;
r_u->status = NT_STATUS_ACCESS_DENIED;
goto error_exit;
}
@ -1680,7 +1681,7 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
Win9x NT tools set security descriptor.
***********************************************************************************/
uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
SRV_R_NET_FILE_SET_SECDESC *r_u)
{
BOOL ret;
@ -1692,7 +1693,7 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
BOOL bad_path;
int access_mode;
int action;
int ecode;
NTSTATUS ecode;
struct current_user user;
fstring user_name;
connection_struct *conn = NULL;
@ -1700,7 +1701,7 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
ZERO_STRUCT(st);
r_u->status = NT_STATUS_NOPROBLEMO;
r_u->status = NT_STATUS_OK;
unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname));
@ -1714,13 +1715,13 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
if (conn == NULL) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to connect to %s\n", qualname));
r_u->status = (uint32)ecode;
r_u->status = ecode;
goto error_exit;
}
if (!become_user(conn, conn->vuid)) {
DEBUG(0,("_srv_net_file_set_secdesc: Can't become connected user!\n"));
r_u->status = ERRnoaccess;
r_u->status = NT_STATUS_ACCESS_DENIED;
goto error_exit;
}
became_user = True;
@ -1739,7 +1740,7 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
if (!fsp) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file %s\n", filename));
r_u->status = ERRnoaccess;
r_u->status = NT_STATUS_ACCESS_DENIED;
goto error_exit;
}
}
@ -1748,7 +1749,7 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
if (ret == False) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to set NT ACL on file %s\n", filename));
r_u->status = ERRnoaccess;
r_u->status = NT_STATUS_ACCESS_DENIED;
goto error_exit;
}
@ -1818,13 +1819,13 @@ static const char *next_server_disk_enum(uint32 *resume)
return disk;
}
uint32 _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u)
NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u)
{
uint32 i;
const char *disk_name;
uint32 resume=get_enum_hnd(&q_u->enum_hnd);
r_u->status=NT_STATUS_NOPROBLEMO;
r_u->status=NT_STATUS_OK;
r_u->total_entries = init_server_disk_enum(&resume);
@ -1854,12 +1855,12 @@ uint32 _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D
return r_u->status;
}
uint32 _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u)
NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u)
{
int snum;
fstring share_name;
r_u->status=NT_STATUS_NOPROBLEMO;
r_u->status=NT_STATUS_OK;
switch(q_u->type) {
@ -1878,7 +1879,7 @@ uint32 _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV
default:
/*unsupported type*/
r_u->status = ERRunknownlevel;
r_u->status = NT_STATUS_INVALID_LEVEL;
break;
}

View File

@ -190,7 +190,7 @@ void get_domain_user_groups(char *domain_groups, char *user)
/*******************************************************************
Look up a local (domain) rid and return a name and type.
********************************************************************/
uint32 local_lookup_group_name(uint32 rid, char *group_name, uint32 *type)
NTSTATUS local_lookup_group_name(uint32 rid, char *group_name, uint32 *type)
{
int i = 0;
(*type) = SID_NAME_DOM_GRP;
@ -206,7 +206,7 @@ uint32 local_lookup_group_name(uint32 rid, char *group_name, uint32 *type)
{
fstrcpy(group_name, domain_group_rids[i].name);
DEBUG(5,(" = %s\n", group_name));
return 0x0;
return NT_STATUS_OK;
}
DEBUG(5,(" none mapped\n"));
@ -216,7 +216,7 @@ uint32 local_lookup_group_name(uint32 rid, char *group_name, uint32 *type)
/*******************************************************************
Look up a local alias rid and return a name and type.
********************************************************************/
uint32 local_lookup_alias_name(uint32 rid, char *alias_name, uint32 *type)
NTSTATUS local_lookup_alias_name(uint32 rid, char *alias_name, uint32 *type)
{
int i = 0;
(*type) = SID_NAME_WKN_GRP;
@ -232,7 +232,7 @@ uint32 local_lookup_alias_name(uint32 rid, char *alias_name, uint32 *type)
{
fstrcpy(alias_name, builtin_alias_rids[i].name);
DEBUG(5,(" = %s\n", alias_name));
return 0x0;
return NT_STATUS_OK;
}
DEBUG(5,(" none mapped\n"));
@ -242,7 +242,7 @@ uint32 local_lookup_alias_name(uint32 rid, char *alias_name, uint32 *type)
/*******************************************************************
Look up a local user rid and return a name and type.
********************************************************************/
uint32 local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
NTSTATUS local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
{
SAM_ACCOUNT *sampwd=NULL;
int i = 0;
@ -261,7 +261,7 @@ uint32 local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
if (domain_user_rids[i].rid != 0) {
fstrcpy(user_name, domain_user_rids[i].name);
DEBUG(5,(" = %s\n", user_name));
return 0x0;
return NT_STATUS_OK;
}
pdb_init_sam(&sampwd);
@ -275,7 +275,7 @@ uint32 local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
fstrcpy(user_name, pdb_get_username(sampwd) );
DEBUG(5,(" = %s\n", user_name));
pdb_free_sam(sampwd);
return 0x0;
return NT_STATUS_OK;
}
DEBUG(5,(" none mapped\n"));
@ -286,7 +286,7 @@ uint32 local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
/*******************************************************************
Look up a local (domain) group name and return a rid
********************************************************************/
uint32 local_lookup_group_rid(char *group_name, uint32 *rid)
NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid)
{
char *grp_name;
int i = -1; /* start do loop at -1 */
@ -299,13 +299,13 @@ uint32 local_lookup_group_rid(char *group_name, uint32 *rid)
} while (grp_name != NULL && !strequal(grp_name, group_name));
return (grp_name != NULL) ? 0 : NT_STATUS_NONE_MAPPED;
return (grp_name != NULL) ? NT_STATUS_OK : NT_STATUS_NONE_MAPPED;
}
/*******************************************************************
Look up a local (BUILTIN) alias name and return a rid
********************************************************************/
uint32 local_lookup_alias_rid(char *alias_name, uint32 *rid)
NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid)
{
char *als_name;
int i = -1; /* start do loop at -1 */
@ -318,13 +318,13 @@ uint32 local_lookup_alias_rid(char *alias_name, uint32 *rid)
} while (als_name != NULL && !strequal(als_name, alias_name));
return (als_name != NULL) ? 0 : NT_STATUS_NONE_MAPPED;
return (als_name != NULL) ? NT_STATUS_OK : NT_STATUS_NONE_MAPPED;
}
/*******************************************************************
Look up a local user name and return a rid
********************************************************************/
uint32 local_lookup_user_rid(char *user_name, uint32 *rid)
NTSTATUS local_lookup_user_rid(char *user_name, uint32 *rid)
{
SAM_ACCOUNT *sampass=NULL;
BOOL ret;
@ -341,7 +341,7 @@ uint32 local_lookup_user_rid(char *user_name, uint32 *rid)
if (ret == True) {
(*rid) = pdb_get_user_rid(sampass);
pdb_free_sam(sampass);
return 0x0;
return NT_STATUS_OK;
}
pdb_free_sam(sampass);

View File

@ -60,7 +60,7 @@ static void create_wks_info_100(WKS_INFO_100 *inf)
********************************************************************/
uint32 _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u)
NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u)
{
WKS_INFO_100 *wks100 = NULL;
@ -72,7 +72,7 @@ uint32 _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO
return NT_STATUS_NO_MEMORY;
create_wks_info_100(wks100);
init_wks_r_query_info(r_u, q_u->switch_value, wks100, NT_STATUS_NOPROBLEMO);
init_wks_r_query_info(r_u, q_u->switch_value, wks100, NT_STATUS_OK);
DEBUG(5,("_wks_query_info: %d\n", __LINE__));

View File

@ -53,7 +53,7 @@ static uint32 cmd_dfs_exist(struct cli_state *cli, int argc, char **argv)
result = cli_dfs_exist(cli, mem_ctx, &dfs_exists);
if (result == NT_STATUS_NOPROBLEMO)
if (result == NT_STATUS_OK)
printf("dfs is %spresent\n", dfs_exists ? "" : "not ");
cli_nt_session_close(cli);
@ -252,7 +252,7 @@ static uint32 cmd_dfs_enum(struct cli_state *cli, int argc, char **argv)
/* Call RPC function */
if ((result = cli_dfs_enum(cli, mem_ctx, info_level, &ctr))
== NT_STATUS_NOPROBLEMO) {
== NT_STATUS_OK) {
/* Print results */
display_dfs_info_ctr(&ctr);
@ -302,7 +302,7 @@ static uint32 cmd_dfs_getinfo(struct cli_state *cli, int argc, char **argv)
if ((result = cli_dfs_get_info(cli, mem_ctx, entrypath, servername,
sharename, info_level, &ctr))
== NT_STATUS_NOPROBLEMO) {
== NT_STATUS_OK) {
/* Print results */

View File

@ -59,7 +59,7 @@ static uint32 cmd_lsa_query_info_policy(struct cli_state *cli, int argc, char **
if ((result = cli_lsa_open_policy(cli, mem_ctx, True,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol)) != NT_STATUS_NOPROBLEMO) {
&pol)) != NT_STATUS_OK) {
goto done;
}
@ -69,7 +69,7 @@ static uint32 cmd_lsa_query_info_policy(struct cli_state *cli, int argc, char **
if ((result = cli_lsa_query_info_policy(cli, mem_ctx, &pol, info_class,
domain_name, &dom_sid))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -125,7 +125,7 @@ static uint32 cmd_lsa_lookup_names(struct cli_state *cli, int argc, char **argv)
if ((result = cli_lsa_open_policy(cli, mem_ctx, True,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol)) != NT_STATUS_NOPROBLEMO) {
&pol)) != NT_STATUS_OK) {
goto done;
}
@ -135,7 +135,7 @@ static uint32 cmd_lsa_lookup_names(struct cli_state *cli, int argc, char **argv)
if ((result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1,
&argv[1], &sids, &types, &num_names) !=
NT_STATUS_NOPROBLEMO)) {
NT_STATUS_OK)) {
goto done;
}
@ -193,7 +193,7 @@ static uint32 cmd_lsa_lookup_sids(struct cli_state *cli, int argc, char **argv)
if ((result = cli_lsa_open_policy(cli, mem_ctx, True,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol)) != NT_STATUS_NOPROBLEMO) {
&pol)) != NT_STATUS_OK) {
goto done;
}
@ -216,7 +216,7 @@ static uint32 cmd_lsa_lookup_sids(struct cli_state *cli, int argc, char **argv)
if ((result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids,
&names, &types, &num_names) !=
NT_STATUS_NOPROBLEMO)) {
NT_STATUS_OK)) {
goto done;
}
@ -286,7 +286,7 @@ static uint32 cmd_lsa_enum_trust_dom(struct cli_state *cli, int argc, char **arg
if ((result = cli_lsa_open_policy(cli, mem_ctx, True,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol)) != NT_STATUS_NOPROBLEMO) {
&pol)) != NT_STATUS_OK) {
goto done;
}
@ -297,7 +297,7 @@ static uint32 cmd_lsa_enum_trust_dom(struct cli_state *cli, int argc, char **arg
if ((result = cli_lsa_enum_trust_dom(cli, mem_ctx, &pol, &enum_ctx,
&num_domains, &domain_names,
&domain_sids)
!= NT_STATUS_NOPROBLEMO)) {
!= NT_STATUS_OK)) {
goto done;
}

View File

@ -49,7 +49,7 @@ static uint32 cmd_netlogon_logon_ctrl2(struct cli_state *cli, int argc,
}
if ((result = cli_netlogon_logon_ctrl2(cli, mem_ctx, query_level))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -87,7 +87,7 @@ static uint32 cmd_netlogon_logon_ctrl(struct cli_state *cli, int argc,
#if 0
if ((result = cli_netlogon_logon_ctrl(cli, mem_ctx, query_level))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
#endif

View File

@ -973,7 +973,7 @@ static uint32 cmd_reg_shutdown(struct cli_state *cli, int argc, char **argv)
/* create an entry */
result = cli_reg_shutdown(cli, mem_ctx, srv_name, msg, timeout, flgs);
if (result == NT_STATUS_NOPROBLEMO)
if (result == NT_STATUS_OK)
DEBUG(5,("cmd_reg_shutdown: query succeeded\n"));
else
DEBUG(5,("cmd_reg_shutdown: query failed\n"));
@ -1017,7 +1017,7 @@ static uint32 cmd_reg_abort_shutdown(struct cli_state *cli, int argc, char **arg
result = cli_reg_abort_shutdown(cli, mem_ctx, srv_name);
if (result == NT_STATUS_NOPROBLEMO)
if (result == NT_STATUS_OK)
DEBUG(5,("cmd_reg_abort_shutdown: query succeeded\n"));
else
DEBUG(5,("cmd_reg_abort_shutdown: query failed\n"));

View File

@ -179,7 +179,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol)) !=
NT_STATUS_NOPROBLEMO) {
NT_STATUS_OK) {
goto done;
}
@ -188,7 +188,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -197,7 +197,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_open_user(cli, mem_ctx, &domain_pol,
MAXIMUM_ALLOWED_ACCESS,
user_rid, &user_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -207,7 +207,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_query_userinfo(cli, mem_ctx, &user_pol,
info_level, &user_ctr))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -307,7 +307,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol)) !=
NT_STATUS_NOPROBLEMO) {
NT_STATUS_OK) {
goto done;
}
@ -316,7 +316,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -325,7 +325,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_open_group(cli, mem_ctx, &domain_pol,
MAXIMUM_ALLOWED_ACCESS,
group_rid, &group_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -335,7 +335,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
if ((result = cli_samr_query_groupinfo(cli, mem_ctx, &group_pol,
info_level, &group_ctr))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -397,7 +397,7 @@ static uint32 cmd_samr_query_usergroups(struct cli_state *cli, int argc, char **
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol)) !=
NT_STATUS_NOPROBLEMO) {
NT_STATUS_OK) {
goto done;
}
@ -406,7 +406,7 @@ static uint32 cmd_samr_query_usergroups(struct cli_state *cli, int argc, char **
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -415,7 +415,7 @@ static uint32 cmd_samr_query_usergroups(struct cli_state *cli, int argc, char **
if ((result = cli_samr_open_user(cli, mem_ctx, &domain_pol,
MAXIMUM_ALLOWED_ACCESS,
user_rid, &user_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -423,7 +423,7 @@ static uint32 cmd_samr_query_usergroups(struct cli_state *cli, int argc, char **
if ((result = cli_samr_query_usergroups(cli, mem_ctx, &user_pol,
&num_groups, &user_gids))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -484,7 +484,7 @@ static uint32 cmd_samr_query_groupmem(struct cli_state *cli, int argc, char **ar
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol)) !=
NT_STATUS_NOPROBLEMO) {
NT_STATUS_OK) {
goto done;
}
@ -493,7 +493,7 @@ static uint32 cmd_samr_query_groupmem(struct cli_state *cli, int argc, char **ar
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -502,7 +502,7 @@ static uint32 cmd_samr_query_groupmem(struct cli_state *cli, int argc, char **ar
if ((result = cli_samr_open_group(cli, mem_ctx, &domain_pol,
MAXIMUM_ALLOWED_ACCESS,
group_rid, &group_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -511,7 +511,7 @@ static uint32 cmd_samr_query_groupmem(struct cli_state *cli, int argc, char **ar
if ((result = cli_samr_query_groupmem(cli, mem_ctx, &group_pol,
&num_members, &group_rids,
&group_attrs))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -568,7 +568,7 @@ static uint32 cmd_samr_enum_dom_groups(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol)) !=
NT_STATUS_NOPROBLEMO) {
NT_STATUS_OK) {
goto done;
}
@ -579,7 +579,7 @@ static uint32 cmd_samr_enum_dom_groups(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -647,7 +647,7 @@ static uint32 cmd_samr_query_aliasmem(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol)) !=
NT_STATUS_NOPROBLEMO) {
NT_STATUS_OK) {
goto done;
}
@ -658,7 +658,7 @@ static uint32 cmd_samr_query_aliasmem(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -669,7 +669,7 @@ static uint32 cmd_samr_query_aliasmem(struct cli_state *cli, int argc,
if ((result = cli_samr_open_alias(cli, mem_ctx, &domain_pol,
MAXIMUM_ALLOWED_ACCESS,
alias_rid, &alias_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -677,7 +677,7 @@ static uint32 cmd_samr_query_aliasmem(struct cli_state *cli, int argc,
if ((result = cli_samr_query_aliasmem(cli, mem_ctx, &alias_pol,
&num_members, &alias_sids))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -738,7 +738,7 @@ static uint32 cmd_samr_query_dispinfo(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -749,7 +749,7 @@ static uint32 cmd_samr_query_dispinfo(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -824,7 +824,7 @@ static uint32 cmd_samr_query_dominfo(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -835,7 +835,7 @@ static uint32 cmd_samr_query_dominfo(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -845,7 +845,7 @@ static uint32 cmd_samr_query_dominfo(struct cli_state *cli, int argc,
if ((result = cli_samr_query_dom_info(cli, mem_ctx, &domain_pol,
switch_value, &ctr))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -912,7 +912,7 @@ static uint32 cmd_samr_create_dom_user(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -923,7 +923,7 @@ static uint32 cmd_samr_create_dom_user(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -937,7 +937,7 @@ static uint32 cmd_samr_create_dom_user(struct cli_state *cli, int argc,
if ((result = cli_samr_create_dom_user(cli, mem_ctx, &domain_pol,
acct_name, acb_info, unknown,
&user_pol, &user_rid))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -992,7 +992,7 @@ static uint32 cmd_samr_lookup_names(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1001,7 +1001,7 @@ static uint32 cmd_samr_lookup_names(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1018,7 +1018,7 @@ static uint32 cmd_samr_lookup_names(struct cli_state *cli, int argc,
if ((result = cli_samr_lookup_names(cli, mem_ctx, &domain_pol,
flags, num_names, names,
&num_rids, &rids, &name_types))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1076,7 +1076,7 @@ static uint32 cmd_samr_lookup_rids(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1085,7 +1085,7 @@ static uint32 cmd_samr_lookup_rids(struct cli_state *cli, int argc,
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1102,7 +1102,7 @@ static uint32 cmd_samr_lookup_rids(struct cli_state *cli, int argc,
if ((result = cli_samr_lookup_rids(cli, mem_ctx, &domain_pol,
flags, num_rids, rids,
&num_names, &names, &name_types))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1154,14 +1154,14 @@ static uint32 cmd_samr_delete_dom_user(struct cli_state *cli, int argc,
if ((result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
if ((result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -1175,14 +1175,14 @@ static uint32 cmd_samr_delete_dom_user(struct cli_state *cli, int argc,
flags, 1, &argv[1],
&num_rids, &user_rids,
&name_types))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
if ((result = cli_samr_open_user(cli, mem_ctx, &domain_pol,
MAXIMUM_ALLOWED_ACCESS,
user_rids[0], &user_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
}
@ -1190,7 +1190,7 @@ static uint32 cmd_samr_delete_dom_user(struct cli_state *cli, int argc,
/* Delete user */
if ((result = cli_samr_delete_dom_user(cli, mem_ctx, &user_pol))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}

View File

@ -84,7 +84,7 @@ static uint32 cmd_spoolss_not_implemented (struct cli_state *cli,
int argc, char **argv)
{
printf ("(*) This command is not currently implemented.\n");
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/****************************************************************************
@ -152,7 +152,7 @@ static uint32 cmd_spoolss_open_printer_ex(struct cli_state *cli, int argc, char
if (argc != 2) {
printf("Usage: %s <printername>\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!cli)
@ -182,10 +182,10 @@ static uint32 cmd_spoolss_open_printer_ex(struct cli_state *cli, int argc, char
result = cli_spoolss_open_printer_ex (cli, mem_ctx, printername, "",
MAXIMUM_ALLOWED_ACCESS, servername, user, &hnd);
if (result == NT_STATUS_NOPROBLEMO) {
if (result == NT_STATUS_OK) {
printf ("Printer %s opened successfully\n", printername);
result = cli_spoolss_close_printer (cli, mem_ctx, &hnd);
if (result != NT_STATUS_NOPROBLEMO) {
if (result != NT_STATUS_OK) {
printf ("Error closing printer handle! (%s)\n", get_nt_error_msg(result));
}
}
@ -344,7 +344,7 @@ static uint32 cmd_spoolss_enum_printers(struct cli_state *cli, int argc, char **
if (argc > 2)
{
printf("Usage: %s [level]\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -371,7 +371,7 @@ static uint32 cmd_spoolss_enum_printers(struct cli_state *cli, int argc, char **
result = cli_spoolss_enum_printers(cli, mem_ctx, PRINTER_ENUM_LOCAL,
info_level, &returned, &ctr);
if (result == NT_STATUS_NOPROBLEMO)
if (result == NT_STATUS_OK)
{
if (!returned)
printf ("No Printers printers returned.\n");
@ -452,7 +452,7 @@ static uint32 cmd_spoolss_enum_ports(struct cli_state *cli, int argc, char **arg
if (argc > 2) {
printf("Usage: %s [level]\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -478,7 +478,7 @@ static uint32 cmd_spoolss_enum_ports(struct cli_state *cli, int argc, char **arg
result = cli_spoolss_enum_ports(cli, mem_ctx, info_level, &returned, &ctr);
if (result == NT_STATUS_NOPROBLEMO) {
if (result == NT_STATUS_OK) {
int i;
for (i = 0; i < returned; i++) {
@ -519,7 +519,7 @@ static uint32 cmd_spoolss_getprinter(struct cli_state *cli, int argc, char **arg
if (argc == 1 || argc > 3) {
printf("Usage: %s <printername> [level]\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -549,7 +549,7 @@ static uint32 cmd_spoolss_getprinter(struct cli_state *cli, int argc, char **arg
/* get a printer handle */
if ((result = cli_spoolss_open_printer_ex(
cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, servername,
user, &pol)) != NT_STATUS_NOPROBLEMO) {
user, &pol)) != NT_STATUS_OK) {
goto done;
}
@ -557,7 +557,7 @@ static uint32 cmd_spoolss_getprinter(struct cli_state *cli, int argc, char **arg
/* Get printer info */
if ((result = cli_spoolss_getprinter(cli, mem_ctx, &pol, info_level, &ctr))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto done;
}
@ -720,7 +720,7 @@ static uint32 cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv
if ((argc == 1) || (argc > 3))
{
printf("Usage: %s <printername> [level]\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -747,7 +747,7 @@ static uint32 cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv
/* Open a printer handle */
if ((result=cli_spoolss_open_printer_ex (cli, mem_ctx, printername, "",
MAXIMUM_ALLOWED_ACCESS, servername, user, &pol)) != NT_STATUS_NOPROBLEMO)
MAXIMUM_ALLOWED_ACCESS, servername, user, &pol)) != NT_STATUS_OK)
{
printf ("Error opening printer handle for %s!\n", printername);
return result;
@ -763,7 +763,7 @@ static uint32 cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv
switch (result)
{
case ERRsuccess:
case NT_STATUS_OK:
break;
case ERRunknownprinterdriver:
@ -805,7 +805,7 @@ static uint32 cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv
talloc_destroy(mem_ctx);
if (result==ERRunknownprinterdriver)
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
else
return result;
@ -827,7 +827,7 @@ static uint32 cmd_spoolss_enum_drivers(struct cli_state *cli, int argc, char **a
if (argc > 2)
{
printf("Usage: enumdrivers [level]\n");
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -862,7 +862,7 @@ static uint32 cmd_spoolss_enum_drivers(struct cli_state *cli, int argc, char **a
continue;
if (result != NT_STATUS_NOPROBLEMO)
if (result != NT_STATUS_OK)
{
printf ("Error getting driver for environment [%s] - %s\n",
archi_table[i].long_archi, get_nt_error_msg(result));
@ -900,7 +900,7 @@ static uint32 cmd_spoolss_enum_drivers(struct cli_state *cli, int argc, char **a
talloc_destroy(mem_ctx);
if (result==ERRunknownprinterdriver)
return ERRsuccess;
return NT_STATUS_OK;
else
return result;
@ -933,7 +933,7 @@ static uint32 cmd_spoolss_getdriverdir(struct cli_state *cli, int argc, char **a
if (argc > 2)
{
printf("Usage: %s [environment]\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
/* Initialise RPC connection */
@ -958,7 +958,7 @@ static uint32 cmd_spoolss_getdriverdir(struct cli_state *cli, int argc, char **a
/* Get the directory. Only use Info level 1 */
if ((result = cli_spoolss_getprinterdriverdir (cli, mem_ctx, 1, env, &ctr))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
{
return result;
}
@ -1100,7 +1100,7 @@ static uint32 cmd_spoolss_addprinterdriver (struct cli_state *cli, int argc, cha
printf ("\t<Config File Name>:<Help File Name>:<Language Monitor Name>:\\\n");
printf ("\t<Default Data Type>:<Comma Separated list of Files>\n");
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -1137,7 +1137,7 @@ static uint32 cmd_spoolss_addprinterdriver (struct cli_state *cli, int argc, cha
ctr.info3 = &info3;
if ((result = cli_spoolss_addprinterdriver (cli, mem_ctx, level, &ctr))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
{
return result;
}
@ -1167,7 +1167,7 @@ static uint32 cmd_spoolss_addprinterex (struct cli_state *cli, int argc, char **
if (argc != 5)
{
printf ("Usage: %s <name> <shared name> <driver> <port>\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -1219,7 +1219,7 @@ static uint32 cmd_spoolss_addprinterex (struct cli_state *cli, int argc, char **
ctr.printers_2 = &info2;
if ((result = cli_spoolss_addprinterex (cli, mem_ctx, level, &ctr))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
{
cli_nt_session_close (cli);
return result;
@ -1252,7 +1252,7 @@ static uint32 cmd_spoolss_setdriver (struct cli_state *cli, int argc, char **arg
if (argc != 3)
{
printf ("Usage: %s <printer> <driver>\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -1278,7 +1278,7 @@ static uint32 cmd_spoolss_setdriver (struct cli_state *cli, int argc, char **arg
/* get a printer handle */
if ((result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
MAXIMUM_ALLOWED_ACCESS, servername, user, &pol))
!= NT_STATUS_NOPROBLEMO)
!= NT_STATUS_OK)
{
goto done;
}
@ -1288,7 +1288,7 @@ static uint32 cmd_spoolss_setdriver (struct cli_state *cli, int argc, char **arg
/* Get printer info */
ZERO_STRUCT (info2);
ctr.printers_2 = &info2;
if ((result = cli_spoolss_getprinter(cli, mem_ctx, &pol, level, &ctr)) != NT_STATUS_NOPROBLEMO)
if ((result = cli_spoolss_getprinter(cli, mem_ctx, &pol, level, &ctr)) != NT_STATUS_OK)
{
printf ("Unable to retrieve printer information!\n");
goto done;
@ -1296,7 +1296,7 @@ static uint32 cmd_spoolss_setdriver (struct cli_state *cli, int argc, char **arg
/* set the printer driver */
init_unistr(&ctr.printers_2->drivername, argv[2]);
if ((result = cli_spoolss_setprinter(cli, mem_ctx, &pol, level, &ctr, 0)) != NT_STATUS_NOPROBLEMO)
if ((result = cli_spoolss_setprinter(cli, mem_ctx, &pol, level, &ctr, 0)) != NT_STATUS_OK)
{
printf ("SetPrinter call failed!\n");
goto done;;
@ -1326,7 +1326,7 @@ static uint32 cmd_spoolss_deletedriver (struct cli_state *cli, int argc, char **
if (argc != 2)
{
printf ("Usage: %s <driver>\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (!(mem_ctx=talloc_init()))
@ -1351,7 +1351,7 @@ static uint32 cmd_spoolss_deletedriver (struct cli_state *cli, int argc, char **
{
/* make the call to remove the driver */
if ((result = cli_spoolss_deleteprinterdriver(cli, mem_ctx,
archi_table[i].long_archi, argv[1])) != NT_STATUS_NOPROBLEMO)
archi_table[i].long_archi, argv[1])) != NT_STATUS_OK)
{
printf ("Failed to remove driver %s for arch [%s] - error %s!\n",
argv[1], archi_table[i].long_archi, get_nt_error_msg(result));
@ -1365,7 +1365,7 @@ static uint32 cmd_spoolss_deletedriver (struct cli_state *cli, int argc, char **
cli_nt_session_close (cli);
talloc_destroy(mem_ctx);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}

View File

@ -212,7 +212,7 @@ static uint32 cmd_srvsvc_srv_query_info(struct cli_state *cli, int argc,
if ((result = cli_srvsvc_net_srv_get_info(cli, mem_ctx, info_level,
&ctr)
!= NT_STATUS_NOPROBLEMO)) {
!= NT_STATUS_OK)) {
goto done;
}

View File

@ -213,13 +213,13 @@ void fetch_domain_sid(struct cli_state *cli)
if ((result = cli_lsa_open_policy(cli, mem_ctx, True,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol) != NT_STATUS_NOPROBLEMO)) {
&pol) != NT_STATUS_OK)) {
goto error;
}
if ((result = cli_lsa_query_info_policy(cli, mem_ctx, &pol, info_class,
domain_name, &domain_sid))
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
goto error;
}
@ -234,7 +234,7 @@ void fetch_domain_sid(struct cli_state *cli)
error:
fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain);
if (result != NT_STATUS_NOPROBLEMO) {
if (result != NT_STATUS_OK) {
fprintf(stderr, "error: %s\n", get_nt_error_msg(result));
}
@ -327,7 +327,7 @@ static uint32 cmd_debuglevel(struct cli_state *cli, int argc, char **argv)
{
if (argc > 2) {
printf("Usage: %s [debuglevel]\n", argv[0]);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
if (argc == 2) {
@ -336,13 +336,13 @@ static uint32 cmd_debuglevel(struct cli_state *cli, int argc, char **argv)
printf("debuglevel is %d\n", DEBUGLEVEL);
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
static uint32 cmd_quit(struct cli_state *cli, int argc, char **argv)
{
exit(0);
return NT_STATUS_NOPROBLEMO; /* NOTREACHED */
return NT_STATUS_OK; /* NOTREACHED */
}
/* Build in rpcclient commands */

View File

@ -68,15 +68,15 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
return NT_STATUS_LOGON_FAILURE;
}
if (nt_status != NT_STATUS_NOPROBLEMO) {
if (nt_status != NT_STATUS_OK) {
nt_status = check_rhosts_security(user_info, server_info);
}
if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_NOPROBLEMO)) {
if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_OK)) {
nt_status = check_domain_security(user_info, server_info);
}
if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_NOPROBLEMO)) {
if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_OK)) {
nt_status = check_server_security(user_info, server_info);
}
@ -84,7 +84,7 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
smb_user_control(user_info->smb_username.str, nt_status);
}
if (nt_status != NT_STATUS_NOPROBLEMO) {
if (nt_status != NT_STATUS_OK) {
if ((user_info->plaintext_password.len > 0)
&& (!lp_plaintext_to_smbpasswd())) {
nt_status = check_unix_security(user_info, server_info);
@ -94,14 +94,14 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
}
}
if ((nt_status == NT_STATUS_NOPROBLEMO) && !done_pam) {
if ((nt_status == NT_STATUS_OK) && !done_pam) {
/* We might not be root if we are an RPC call */
become_root();
nt_status = smb_pam_accountcheck(user_info->smb_username.str);
unbecome_root();
}
if (nt_status == NT_STATUS_NOPROBLEMO) {
if (nt_status == NT_STATUS_OK) {
DEBUG(5, ("check_password: Password for user %s suceeded\n", user_info->smb_username.str));
} else {
DEBUG(3, ("check_password: Password for user %s FAILED with error %s\n", user_info->smb_username.str, get_nt_error_msg(nt_status)));
@ -233,11 +233,11 @@ BOOL password_ok(char *user, char *password, int pwlen)
/* The password could be either NTLM or plain LM. Try NTLM first, but fall-through as
required. */
if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_NOPROBLEMO) {
if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_OK) {
return True;
}
if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_NOPROBLEMO) {
if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_OK) {
return True;
}

View File

@ -175,7 +175,7 @@ uint32 check_rhosts_security(const auth_usersupplied_info *user_info,
become_root();
if (check_hosts_equiv(user_info->smb_username.str)) {
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
}
unbecome_root();

View File

@ -214,7 +214,7 @@ use this machine as the password server.\n"));
/* Make this cli_nt_error() when the conversion is in */
nt_status = NT_STATUS_LOGON_FAILURE;
} else {
nt_status = NT_STATUS_NOPROBLEMO;
nt_status = NT_STATUS_OK;
}
/* if logged in as guest then reject */

View File

@ -127,7 +127,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
if (lp_null_passwords())
{
DEBUG(3,("Account for user '%s' has no password and null passwords are allowed.\n", user_info->smb_username.str));
return(NT_STATUS_NOPROBLEMO);
return(NT_STATUS_OK);
}
else
{
@ -156,7 +156,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
user_info->requested_domain.str,
(char *)server_info->session_key))
{
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
}
DEBUG(4,("smb_password_ok: NTLMv2 password check failed\n"));
@ -169,7 +169,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
nt_pw, user_info->chal,
server_info->session_key)) {
DEBUG(4,("smb_password_ok: NT MD4 password check succeeded\n"));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
} else {
DEBUG(4,("smb_password_ok: NT MD4 password check failed\n"));
return NT_STATUS_WRONG_PASSWORD;
@ -185,7 +185,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
lm_pw, user_info->chal,
server_info->session_key)) {
DEBUG(4,("smb_password_ok: LM password check succeeded\n"));
return NT_STATUS_NOPROBLEMO;
return NT_STATUS_OK;
} else {
DEBUG(4,("smb_password_ok: LM password check failed\n"));
return NT_STATUS_WRONG_PASSWORD;

View File

@ -76,7 +76,7 @@ uint32 check_unix_security(const auth_usersupplied_info *user_info, auth_servers
nt_status = (pass_check(user_info->smb_username.str, user_info->plaintext_password.str,
user_info->plaintext_password.len,
lp_update_encrypted() ? update_smbpassword_file : NULL)
? NT_STATUS_NOPROBLEMO : NT_STATUS_LOGON_FAILURE);
? NT_STATUS_OK : NT_STATUS_LOGON_FAILURE);
unbecome_root();
return nt_status;

View File

@ -105,7 +105,7 @@ void smb_user_control(char *unix_user, uint32 nt_status)
{
struct passwd *pwd=NULL;
if(nt_status == NT_STATUS_NOPROBLEMO) {
if(nt_status == NT_STATUS_OK) {
/*
* User validated ok against Domain controller.
* If the admin wants us to try and create a UNIX

View File

@ -84,7 +84,7 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code,int line)
}
}
return error_packet(outbuf,NT_STATUS_OK,eclass,ecode,line);
return error_packet(outbuf,NT_STATUS(0),eclass,ecode,line);
}
@ -119,7 +119,7 @@ int error_packet(char *outbuf,NTSTATUS ntstatus,
}
SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)&~FLAGS2_32_BIT_ERROR_CODES);
SVAL(outbuf,smb_rcls) = eclass;
SSVAL(outbuf,smb_rcls,eclass);
SSVAL(outbuf,smb_err,ecode);
DEBUG(3,("error packet at line %d cmd=%d (%s) eclass=%d ecode=%d\n",

View File

@ -217,14 +217,13 @@ int find_service(char *service)
do some basic sainity checks on the share.
This function modifies dev, ecode.
****************************************************************************/
static BOOL share_sanity_checks(int snum, char* service, char *dev, int *ecode)
static NTSTATUS share_sanity_checks(int snum, char* service, char *dev)
{
if (!lp_snum_ok(snum) ||
!check_access(smbd_server_fd(),
lp_hostsallow(snum), lp_hostsdeny(snum))) {
*ecode = ERRaccess;
return False;
return NT_STATUS_ACCESS_DENIED;
}
/* you can only connect to the IPC$ service as an ipc device */
@ -243,15 +242,15 @@ static BOOL share_sanity_checks(int snum, char* service, char *dev, int *ecode)
strupper(dev);
if (!lp_print_ok(snum) && (strncmp(dev,"LPT",3) == 0)) {
DEBUG(1,("Attempt to connect to non-printer as a printer\n"));
*ecode = ERRinvdevice;
return False;
return NT_STATUS_BAD_DEVICE_TYPE;
}
/* Behave as a printer if we are supposed to */
if (lp_print_ok(snum) && (strcmp(dev, "A:") == 0)) {
pstrcpy(dev, "LPT1:");
}
return True;
return NT_STATUS_OK;
}
@ -319,7 +318,8 @@ static void set_admin_user(connection_struct *conn)
/****************************************************************************
make a connection to a service
****************************************************************************/
connection_struct *make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid, int *ecode)
connection_struct *make_connection(char *service,char *user,char *password,
int pwlen, char *dev,uint16 vuid, NTSTATUS *status)
{
int snum;
struct passwd *pass = NULL;
@ -334,13 +334,13 @@ connection_struct *make_connection(char *service,char *user,char *password, int
if (snum < 0) {
if (strequal(service,"IPC$") || strequal(service,"ADMIN$")) {
DEBUG(3,("refusing IPC connection\n"));
*ecode = ERRnoipc;
*status = NT_STATUS_ACCESS_DENIED;
return NULL;
}
DEBUG(0,("%s (%s) couldn't find service %s\n",
remote_machine, client_addr(), service));
*ecode = ERRnosuchshare;
*status = NT_STATUS_BAD_NETWORK_PATH;
return NULL;
}
@ -349,7 +349,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
fstring dos_username;
fstrcpy(dos_username, user);
return(make_connection(dos_username,user,password,
pwlen,dev,vuid,ecode));
pwlen,dev,vuid,status));
}
if(lp_security() != SEC_SHARE) {
@ -357,7 +357,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
fstring dos_username;
fstrcpy(user,validated_username(vuid));
fstrcpy(dos_username, user);
return(make_connection(dos_username,user,password,pwlen,dev,vuid,ecode));
return(make_connection(dos_username,user,password,pwlen,dev,vuid,status));
}
} else {
/* Security = share. Try with current_user_info.smb_name
@ -366,12 +366,12 @@ connection_struct *make_connection(char *service,char *user,char *password, int
fstring dos_username;
fstrcpy(user,current_user_info.smb_name);
fstrcpy(dos_username, user);
return(make_connection(dos_username,user,password,pwlen,dev,vuid,ecode));
return(make_connection(dos_username,user,password,pwlen,dev,vuid,status));
}
}
}
if (!share_sanity_checks(snum, service, dev, ecode)) {
if (NT_STATUS_IS_ERR(share_sanity_checks(snum, service, dev))) {
return NULL;
}
@ -387,14 +387,14 @@ connection_struct *make_connection(char *service,char *user,char *password, int
/* shall we let them in? */
if (!authorise_login(snum,user,password,pwlen,&guest,&force,vuid)) {
DEBUG( 2, ( "Invalid username/password for %s [%s]\n", service, user ) );
*ecode = ERRbadpw;
*status = NT_STATUS_WRONG_PASSWORD;
return NULL;
}
conn = conn_new();
if (!conn) {
DEBUG(0,("Couldn't find free connection.\n"));
*ecode = ERRnoresource;
*status = NT_STATUS_INSUFFICIENT_RESOURCES;
return NULL;
}
@ -403,7 +403,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
if (pass == NULL) {
DEBUG(0,( "Couldn't find account %s\n",user));
*ecode = ERRbaduid;
*status = NT_STATUS_NO_SUCH_USER;
conn_free(conn);
return NULL;
}
@ -543,7 +543,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
if (!can_write) {
if (!share_access_check(conn, snum, vuid, FILE_READ_DATA)) {
/* No access, read or write. */
*ecode = ERRaccess;
*status = NT_STATUS_ACCESS_DENIED;
DEBUG(0,( "make_connection: connection to %s denied due to security descriptor.\n",
service ));
conn_free(conn);
@ -567,7 +567,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
lp_max_connections(SNUM(conn)),
False)) {
DEBUG(1,("too many connections - rejected\n"));
*ecode = ERRnoresource;
*status = NT_STATUS_INSUFFICIENT_RESOURCES;
conn_free(conn);
return NULL;
}
@ -585,7 +585,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
lp_servicename(SNUM(conn)),
lp_max_connections(SNUM(conn)));
conn_free(conn);
*ecode = ERRsrverror;
*status = NT_STATUS_UNSUCCESSFUL;
return NULL;
}
}
@ -596,7 +596,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
lp_servicename(SNUM(conn)),
lp_max_connections(SNUM(conn)));
conn_free(conn);
*ecode = ERRbadpw;
*status = NT_STATUS_WRONG_PASSWORD;
return NULL;
}
@ -609,7 +609,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
lp_servicename(SNUM(conn)),
lp_max_connections(SNUM(conn)));
conn_free(conn);
*ecode = ERRnosuchshare;
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
}
@ -638,7 +638,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
DEBUG(1,("preexec gave %d - failing connection\n", ret));
yield_connection(conn, lp_servicename(SNUM(conn)), lp_max_connections(SNUM(conn)));
conn_free(conn);
*ecode = ERRsrverror;
*status = NT_STATUS_UNSUCCESSFUL;
return NULL;
}
}

View File

@ -30,7 +30,7 @@
/****************************************************************************
look for a partial hit
****************************************************************************/
static void trans2_check_hit(char *format, int op, int level, uint32 status)
static void trans2_check_hit(char *format, int op, int level, NTSTATUS status)
{
switch (status) {
case NT_STATUS_INVALID_LEVEL:
@ -103,7 +103,7 @@ static uint32 try_trans2_len(struct cli_state *cli,
if (ret == 0) break;
*data_len += 2;
}
if (ret == NT_STATUS_NOPROBLEMO) {
if (ret == NT_STATUS_OK) {
printf("found %s level=%d data_len=%d rparam_len=%d rdata_len=%d\n",
format, level, *data_len, *rparam_len, *rdata_len);
} else {
@ -122,7 +122,7 @@ static BOOL scan_trans2(struct cli_state *cli, int op, int level,
int param_len = 0;
int rparam_len, rdata_len;
pstring param, data;
uint32 status;
NTSTATUS status;
memset(data, 0, sizeof(data));
data_len = 4;
@ -236,7 +236,7 @@ BOOL torture_trans2_scan(int dummy)
/****************************************************************************
look for a partial hit
****************************************************************************/
static void nttrans_check_hit(char *format, int op, int level, uint32 status)
static void nttrans_check_hit(char *format, int op, int level, NTSTATUS status)
{
switch (status) {
case NT_STATUS_INVALID_LEVEL:
@ -307,7 +307,7 @@ static uint32 try_nttrans_len(struct cli_state *cli,
if (ret == 0) break;
*data_len += 2;
}
if (ret == NT_STATUS_NOPROBLEMO) {
if (ret == NT_STATUS_OK) {
printf("found %s level=%d data_len=%d rparam_len=%d rdata_len=%d\n",
format, level, *data_len, *rparam_len, *rdata_len);
} else {
@ -326,7 +326,7 @@ static BOOL scan_nttrans(struct cli_state *cli, int op, int level,
int param_len = 0;
int rparam_len, rdata_len;
pstring param, data;
uint32 status;
NTSTATUS status;
memset(data, 0, sizeof(data));
data_len = 4;

View File

@ -188,7 +188,7 @@ static BOOL check_error(int line, struct cli_state *c,
}
} else {
uint32 status;
NTSTATUS status;
/* Check NT error */

View File

@ -94,7 +94,7 @@ static BOOL cacls_open_policy_hnd(void)
if (cli_lsa_open_policy(&lsa_cli, lsa_cli.mem_ctx, True,
GENERIC_EXECUTE_ACCESS, &pol)
!= NT_STATUS_NOPROBLEMO) {
!= NT_STATUS_OK) {
return False;
}
@ -119,7 +119,7 @@ static void SidToString(fstring str, DOM_SID *sid)
if (!cacls_open_policy_hnd() ||
cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, sid, &names, &types,
&num_names) != NT_STATUS_NOPROBLEMO ||
&num_names) != NT_STATUS_OK ||
!names || !names[0]) {
return;
}
@ -143,7 +143,7 @@ static BOOL StringToSid(DOM_SID *sid, char *str)
if (!cacls_open_policy_hnd() ||
cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, &str, &sids, &types,
&num_sids) != NT_STATUS_NOPROBLEMO) {
&num_sids) != NT_STATUS_OK) {
result = False;
goto done;
}

View File

@ -162,13 +162,13 @@ Join a domain using the administrator username and password
/* Macro for checking RPC error codes to make things more readable */
#define CHECK_RPC_ERR(rpc, msg) \
if ((result = rpc) != NT_STATUS_NOPROBLEMO) { \
if ((result = rpc) != NT_STATUS_OK) { \
DEBUG(0, (msg ": %s\n", get_nt_error_msg(result))); \
goto done; \
}
#define CHECK_RPC_ERR_DEBUG(rpc, debug_args) \
if ((result = rpc) != NT_STATUS_NOPROBLEMO) { \
if ((result = rpc) != NT_STATUS_OK) { \
DEBUG(0, debug_args); \
goto done; \
}
@ -330,7 +330,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
("could not re-open existing user %s: %s\n",
acct_name, get_nt_error_msg(result)));
} else if (result != NT_STATUS_NOPROBLEMO) {
} else if (result != NT_STATUS_OK) {
DEBUG(0, ("error creating domain user: %s\n",
get_nt_error_msg(result)));
goto done;