attributes and a user SID.
*********************************************************************/
-static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *pwd, BOOL create)
+static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *pwd, bool create)
{
const char *guest_account = lp_guestaccount();
const char *domain = global_myname();
uint32 pdb_decode_acct_ctrl(const char *p)
{
uint32 acct_ctrl = 0;
- BOOL finished = False;
+ bool finished = False;
/*
* Check if the account type bits have been encoded after the
into a 16 byte array.
**************************************************************/
-BOOL pdb_gethexpwd(const char *p, unsigned char *pwd)
+bool pdb_gethexpwd(const char *p, unsigned char *pwd)
{
int i;
unsigned char lonybble, hinybble;
into a 21 byte array.
**************************************************************/
-BOOL pdb_gethexhours(const char *p, unsigned char *hours)
+bool pdb_gethexhours(const char *p, unsigned char *hours)
{
int i;
unsigned char lonybble, hinybble;
Decides if a RID is a well known RID.
********************************************************************/
-static BOOL rid_is_well_known(uint32 rid)
+static bool rid_is_well_known(uint32 rid)
{
/* Not using rid_offset here, because this is the actual
NT fixed value (1000) */
Decides if a RID is a user or group RID.
********************************************************************/
-BOOL algorithmic_pdb_rid_is_user(uint32 rid)
+bool algorithmic_pdb_rid_is_user(uint32 rid)
{
if ( rid_is_well_known(rid) ) {
/*
Convert a name into a SID. Used in the lookup name rpc.
********************************************************************/
-BOOL lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
+bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
enum lsa_SidType *type)
{
GROUP_MAP map;
- BOOL ret;
+ bool ret;
/* Windows treats "MACHINE\None" as a special name for
rid 513 on non-DCs. You cannot create a user or group
/*********************************************************************
*********************************************************************/
-BOOL init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen)
+bool init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen)
{
/* times are stored as 32bit integer
uint32 len = 0;
uint32 lm_pw_len, nt_pw_len, nt_pw_hist_len, hourslen;
uint32 pwHistLen = 0;
- BOOL ret = True;
+ bool ret = True;
fstring tmpstring;
- BOOL expand_explicit = lp_passdb_expand_explicit();
+ bool expand_explicit = lp_passdb_expand_explicit();
if(sampass == NULL || buf == NULL) {
DEBUG(0, ("init_sam_from_buffer_v3: NULL parameters found!\n"));
/*********************************************************************
*********************************************************************/
-uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, BOOL size_only)
+uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, bool size_only)
{
size_t len, buflen;
/*********************************************************************
*********************************************************************/
-BOOL pdb_copy_sam_account(struct samu *dst, struct samu *src )
+bool pdb_copy_sam_account(struct samu *dst, struct samu *src )
{
uint8 *buf = NULL;
int len;
Update the bad password count checking the AP_RESET_COUNT_TIME
*********************************************************************/
-BOOL pdb_update_bad_password_count(struct samu *sampass, BOOL *updated)
+bool pdb_update_bad_password_count(struct samu *sampass, bool *updated)
{
time_t LastBadPassword;
uint16 BadPasswordCount;
uint32 resettime;
- BOOL res;
+ bool res;
BadPasswordCount = pdb_get_bad_password_count(sampass);
if (!BadPasswordCount) {
Update the ACB_AUTOLOCK flag checking the AP_LOCK_ACCOUNT_DURATION
*********************************************************************/
-BOOL pdb_update_autolock_flag(struct samu *sampass, BOOL *updated)
+bool pdb_update_autolock_flag(struct samu *sampass, bool *updated)
{
uint32 duration;
time_t LastBadPassword;
- BOOL res;
+ bool res;
if (!(pdb_get_acct_ctrl(sampass) & ACB_AUTOLOCK)) {
DEBUG(9, ("pdb_update_autolock_flag: Account %s not autolocked, no check needed\n",
Increment the bad_password_count
*********************************************************************/
-BOOL pdb_increment_bad_password_count(struct samu *sampass)
+bool pdb_increment_bad_password_count(struct samu *sampass)
{
uint32 account_policy_lockout;
- BOOL autolock_updated = False, badpw_updated = False;
- BOOL ret;
+ bool autolock_updated = False, badpw_updated = False;
+ bool ret;
/* Retrieve the account lockout policy */
become_root();
Wrapper around retrieving the trust account password
*******************************************************************/
-BOOL get_trust_pw(const char *domain, uint8 ret_pwd[16], uint32 *channel)
+bool get_trust_pw(const char *domain, uint8 ret_pwd[16], uint32 *channel)
{
DOM_SID sid;
char *pwd;