typedef struct disp_info {
DOM_SID sid; /* identify which domain this is. */
- BOOL builtin_domain; /* Quick flag to check if this is the builtin domain. */
+ bool builtin_domain; /* Quick flag to check if this is the builtin domain. */
struct pdb_search *users; /* querydispinfo 1 and 4 */
struct pdb_search *machines; /* querydispinfo 2 */
struct pdb_search *groups; /* querydispinfo 3 and 5, enumgroups */
struct samr_info {
/* for use by the \PIPE\samr policy */
DOM_SID sid;
- BOOL builtin_domain; /* Quick flag to check if this is the builtin domain. */
+ bool builtin_domain; /* Quick flag to check if this is the builtin domain. */
uint32 status; /* some sort of flag. best to record it. comes from opnum 0x39 */
uint32 acc_granted;
DISP_INFO *disp_info;
/*******************************************************************
********************************************************************/
-static BOOL get_lsa_policy_samr_sid( pipes_struct *p, POLICY_HND *pol,
+static bool get_lsa_policy_samr_sid( pipes_struct *p, POLICY_HND *pol,
DOM_SID *sid, uint32 *acc_granted,
DISP_INFO **ppdisp_info)
{
DOM_SID pol_sid;
uint32 acc_granted, i;
SEC_ACL *dacl;
- BOOL ret;
+ bool ret;
struct samu *sampass=NULL;
NTSTATUS status;
/*******************************************************************
build correct perms based on policies and password times for _samr_query_sec_obj
*******************************************************************/
-static BOOL check_change_pw_access(TALLOC_CTX *mem_ctx, DOM_SID *user_sid)
+static bool check_change_pw_access(TALLOC_CTX *mem_ctx, DOM_SID *user_sid)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
if ( !(sampass = samu_new( mem_ctx )) ) {
DEBUG(0,("No memory!\n"));
makes a SAMR_R_LOOKUP_RIDS structure.
********************************************************************/
-static BOOL make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names,
+static bool make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names,
const char **names, UNIHDR **pp_hdr_name,
UNISTR2 **pp_uni_name)
{
uint32 acc_granted;
uint32 des_access = q_u->access_mask;
size_t sd_size;
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
SE_PRIV se_rights;
static NTSTATUS get_user_info_7(TALLOC_CTX *mem_ctx, SAM_USER_INFO_7 *id7, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if ( !(smbpass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
static NTSTATUS get_user_info_9(TALLOC_CTX *mem_ctx, SAM_USER_INFO_9 * id9, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if ( !(smbpass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
static NTSTATUS get_user_info_16(TALLOC_CTX *mem_ctx, SAM_USER_INFO_16 *id16, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if ( !(smbpass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
static NTSTATUS get_user_info_18(pipes_struct *p, TALLOC_CTX *mem_ctx, SAM_USER_INFO_18 * id18, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if (p->auth.auth_type != PIPE_AUTH_TYPE_NTLMSSP || p->auth.auth_type != PIPE_AUTH_TYPE_SPNEGO_NTLMSSP) {
return NT_STATUS_ACCESS_DENIED;
static NTSTATUS get_user_info_20(TALLOC_CTX *mem_ctx, SAM_USER_INFO_20 *id20, DOM_SID *user_sid)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
if ( !(sampass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
DOM_SID *user_sid, DOM_SID *domain_sid)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
if ( !(sampass = samu_new( mem_ctx )) ) {
gid_t *unix_gids;
size_t i, num_gids;
uint32 acc_granted;
- BOOL ret;
+ bool ret;
NTSTATUS result;
- BOOL success = False;
+ bool success = False;
/*
* from the SID in the request:
static NTSTATUS can_create(TALLOC_CTX *mem_ctx, const char *new_name)
{
enum lsa_SidType type;
- BOOL result;
+ bool result;
DEBUG(10, ("Checking whether [%s] can be created\n", new_name));
size_t sd_size;
/* check this, when giving away 'add computer to domain' privs */
uint32 des_access = GENERIC_RIGHTS_USER_ALL_ACCESS;
- BOOL can_add_account = False;
+ bool can_add_account = False;
SE_PRIV se_rights;
DISP_INFO *disp_info = NULL;
makes a SAMR_R_ENUM_DOMAINS structure.
********************************************************************/
-static BOOL make_enum_domains(TALLOC_CTX *ctx, SAM_ENTRY **pp_sam,
+static bool make_enum_domains(TALLOC_CTX *ctx, SAM_ENTRY **pp_sam,
UNISTR2 **pp_uni_name, uint32 num_sam_entries, fstring doms[])
{
uint32 i;
{
/* Check we actually have the requested alias */
enum lsa_SidType type;
- BOOL result;
+ bool result;
gid_t gid;
become_root();
set_user_info_16
********************************************************************/
-static BOOL set_user_info_16(const SAM_USER_INFO_16 *id16, struct samu *pwd)
+static bool set_user_info_16(const SAM_USER_INFO_16 *id16, struct samu *pwd)
{
if (id16 == NULL) {
DEBUG(5, ("set_user_info_16: NULL id16\n"));
set_user_info_18
********************************************************************/
-static BOOL set_user_info_18(SAM_USER_INFO_18 *id18, struct samu *pwd)
+static bool set_user_info_18(SAM_USER_INFO_18 *id18, struct samu *pwd)
{
if (id18 == NULL) {
set_user_info_20
********************************************************************/
-static BOOL set_user_info_20(SAM_USER_INFO_20 *id20, struct samu *pwd)
+static bool set_user_info_20(SAM_USER_INFO_20 *id20, struct samu *pwd)
{
if (id20 == NULL) {
DEBUG(5, ("set_user_info_20: NULL id20\n"));
set_user_info_pw
********************************************************************/
-static BOOL set_user_info_pw(uint8 *pass, struct samu *pwd)
+static bool set_user_info_pw(uint8 *pass, struct samu *pwd)
{
uint32 len;
pstring plaintext_buf;
SAM_USERINFO_CTR *ctr = q_u->ctr;
uint32 acc_granted;
uint32 acc_required;
- BOOL ret;
- BOOL has_enough_rights = False;
+ bool ret;
+ bool has_enough_rights = False;
uint32 acb_info;
DISP_INFO *disp_info = NULL;
uint16 switch_value = q_u->switch_value;
uint32 acc_granted;
uint32 acc_required;
- BOOL ret;
- BOOL has_enough_rights = False;
+ bool ret;
+ bool has_enough_rights = False;
uint32 acb_info;
DISP_INFO *disp_info = NULL;
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
NTSTATUS ret;
DISP_INFO *disp_info = NULL;
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
NTSTATUS ret;
DISP_INFO *disp_info = NULL;
uint32 group_rid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
uint32 group_rid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/*
DOM_SID user_sid;
struct samu *sam_pass=NULL;
uint32 acc_granted;
- BOOL can_add_accounts;
+ bool can_add_accounts;
uint32 acb_info;
DISP_INFO *disp_info = NULL;
- BOOL ret;
+ bool ret;
DEBUG(5, ("_samr_delete_dom_user: %d\n", __LINE__));
uint32 group_rid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
DEBUG(5, ("samr_delete_dom_group: %d\n", __LINE__));
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
NTSTATUS status;
DISP_INFO *disp_info = NULL;
struct samr_info *info;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
gid_t gid;
NTSTATUS result;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
GROUP_MAP map;
GROUP_INFO_CTR *ctr;
uint32 acc_granted;
- BOOL ret;
+ bool ret;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted, NULL))
return NT_STATUS_INVALID_HANDLE;
GROUP_INFO_CTR *ctr;
uint32 acc_granted;
NTSTATUS ret;
- BOOL result;
- BOOL can_mod_accounts;
+ bool result;
+ bool can_mod_accounts;
DISP_INFO *disp_info = NULL;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted, &disp_info))
struct acct_info info;
ALIAS_INFO_CTR *ctr;
uint32 acc_granted;
- BOOL can_mod_accounts;
+ bool can_mod_accounts;
NTSTATUS status;
DISP_INFO *disp_info = NULL;
size_t sd_size;
NTSTATUS status;
fstring sid_string;
- BOOL ret;
+ bool ret;
SE_PRIV se_rights;
if (!get_lsa_policy_samr_sid(p, &q_u->domain_pol, &sid, &acc_granted, NULL))