summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
committerJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
commit30191d1a5704ad2b158386b511558972d539ce47 (patch)
tree4f46e5c4f28f672ab661aa18f45745860970a88c /source3/auth
parent789856f63ff73fec66298e95c91c60db7bdaf14e (diff)
downloadsamba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz
samba-30191d1a5704ad2b158386b511558972d539ce47.tar.bz2
samba-30191d1a5704ad2b158386b511558972d539ce47.zip
RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth.c8
-rw-r--r--source3/auth/auth_compat.c8
-rw-r--r--source3/auth/auth_domain.c6
-rw-r--r--source3/auth/auth_ntlmssp.c4
-rw-r--r--source3/auth/auth_sam.c10
-rw-r--r--source3/auth/auth_server.c10
-rw-r--r--source3/auth/auth_unix.c4
-rw-r--r--source3/auth/auth_util.c50
-rw-r--r--source3/auth/pampass.c24
-rw-r--r--source3/auth/pass_check.c8
-rw-r--r--source3/auth/token_util.c8
11 files changed, 70 insertions, 70 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 29f9be9bf6..0a9ae32472 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -156,7 +156,7 @@ static const uint8 *get_ntlm_challenge(struct auth_context *auth_context)
* False otherwise.
**/
-static BOOL check_domain_match(const char *user, const char *domain)
+static bool check_domain_match(const char *user, const char *domain)
{
/*
* If we aren't serving to trusted domains, we must make sure that
@@ -366,16 +366,16 @@ static NTSTATUS make_auth_context(struct auth_context **auth_context)
return NT_STATUS_OK;
}
-BOOL load_auth_module(struct auth_context *auth_context,
+bool load_auth_module(struct auth_context *auth_context,
const char *module, auth_methods **ret)
{
- static BOOL initialised_static_modules = False;
+ static bool initialised_static_modules = False;
struct auth_init_function_entry *entry;
char *module_name = smb_xstrdup(module);
char *module_params = NULL;
char *p;
- BOOL good = False;
+ bool good = False;
/* Initialise static modules if not done so yet */
if(!initialised_static_modules) {
diff --git a/source3/auth/auth_compat.c b/source3/auth/auth_compat.c
index 9035f8917a..f10585d9dd 100644
--- a/source3/auth/auth_compat.c
+++ b/source3/auth/auth_compat.c
@@ -20,7 +20,7 @@
#include "includes.h"
extern struct auth_context *negprot_global_auth_context;
-extern BOOL global_encrypted_passwords_negotiated;
+extern bool global_encrypted_passwords_negotiated;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
@@ -66,7 +66,7 @@ static NTSTATUS pass_check_smb(const char *smb_name,
DATA_BLOB lm_pwd,
DATA_BLOB nt_pwd,
DATA_BLOB plaintext_password,
- BOOL encrypted)
+ bool encrypted)
{
NTSTATUS nt_status;
@@ -92,11 +92,11 @@ check if a username/password pair is ok via the auth subsystem.
return True if the password is correct, False otherwise
****************************************************************************/
-BOOL password_ok(char *smb_name, DATA_BLOB password_blob)
+bool password_ok(char *smb_name, DATA_BLOB password_blob)
{
DATA_BLOB null_password = data_blob_null;
- BOOL encrypted = (global_encrypted_passwords_negotiated && (password_blob.length == 24 || password_blob.length > 46));
+ bool encrypted = (global_encrypted_passwords_negotiated && (password_blob.length == 24 || password_blob.length > 46));
if (encrypted) {
/*
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 1e6857230f..72bdbab182 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -23,7 +23,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
-extern BOOL global_machine_password_needs_changing;
+extern bool global_machine_password_needs_changing;
/**
* Connect to a remote server for (inter)domain security authenticaion.
@@ -44,7 +44,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
const char *dc_name,
struct in_addr dc_ip,
struct rpc_pipe_client **pipe_ret,
- BOOL *retry)
+ bool *retry)
{
NTSTATUS result;
struct rpc_pipe_client *netlogon_pipe = NULL;
@@ -191,7 +191,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *netlogon_pipe = NULL;
NTSTATUS nt_status = NT_STATUS_NO_LOGON_SERVERS;
int i;
- BOOL retry = True;
+ bool retry = True;
/*
* At this point, smb_apasswd points to the lanman response to
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 742be2156f..526f2c93df 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -39,7 +39,7 @@ static const uint8 *auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlms
*
* @return If the effective challenge used by the auth subsystem may be modified
*/
-static BOOL auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
+static bool auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
{
AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
(AUTH_NTLMSSP_STATE *)ntlmssp_state->auth_context;
@@ -83,7 +83,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
(AUTH_NTLMSSP_STATE *)ntlmssp_state->auth_context;
auth_usersupplied_info *user_info = NULL;
NTSTATUS nt_status;
- BOOL username_was_mapped;
+ bool username_was_mapped;
/* the client has given us its machine name (which we otherwise would not get on port 445).
we need to possibly reload smb.conf if smb.conf includes depend on the machine name */
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 9070de1ce4..13fc968b88 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -70,7 +70,7 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
bitmask.
****************************************************************************/
-static BOOL logon_hours_ok(struct samu *sampass)
+static bool logon_hours_ok(struct samu *sampass)
{
/* In logon hours first bit is Sunday from 12AM to 1AM */
const uint8 *hours;
@@ -187,7 +187,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
if (*workstation_list) {
- BOOL invalid_ws = True;
+ bool invalid_ws = True;
fstring tok;
const char *s = workstation_list;
@@ -251,12 +251,12 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
auth_serversupplied_info **server_info)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
NTSTATUS update_login_attempts_status;
DATA_BLOB user_sess_key = data_blob_null;
DATA_BLOB lm_sess_key = data_blob_null;
- BOOL updated_autolock = False, updated_badpw = False;
+ bool updated_autolock = False, updated_badpw = False;
if (!user_info || !auth_context) {
return NT_STATUS_UNSUCCESSFUL;
@@ -395,7 +395,7 @@ static NTSTATUS check_samstrict_security(const struct auth_context *auth_context
const auth_usersupplied_info *user_info,
auth_serversupplied_info **server_info)
{
- BOOL is_local_name, is_my_domain;
+ bool is_local_name, is_my_domain;
if (!user_info || !auth_context) {
return NT_STATUS_LOGON_FAILURE;
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 44f36dc4cf..815c1193d1 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -36,7 +36,7 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
struct in_addr dest_ip;
const char *p;
char *pserver;
- BOOL connected_ok = False;
+ bool connected_ok = False;
if (!(cli = cli_initialise()))
return NULL;
@@ -148,7 +148,7 @@ struct server_security_state {
Send a 'keepalive' packet down the cli pipe.
****************************************************************************/
-static BOOL send_server_keepalive(const struct timeval *now,
+static bool send_server_keepalive(const struct timeval *now,
void *private_data)
{
struct server_security_state *state = talloc_get_type_abort(
@@ -265,10 +265,10 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context
struct cli_state *cli;
static unsigned char badpass[24];
static fstring baduser;
- static BOOL tested_password_server = False;
- static BOOL bad_password_server = False;
+ static bool tested_password_server = False;
+ static bool bad_password_server = False;
NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED;
- BOOL locally_made_cli = False;
+ bool locally_made_cli = False;
cli = (struct cli_state *)my_private_data;
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index b79e7361d3..4fca5bcbe4 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -27,10 +27,10 @@
*
* this ugly hack needs to die, but not quite yet, I think people still use it...
**/
-static BOOL update_smbpassword_file(const char *user, const char *password)
+static bool update_smbpassword_file(const char *user, const char *password)
{
struct samu *sampass;
- BOOL ret;
+ bool ret;
if ( !(sampass = samu_new( NULL )) ) {
return False;
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 2c05f04b9b..99eea6cdd2 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -62,7 +62,7 @@ static NTSTATUS make_user_info(auth_usersupplied_info **user_info,
DATA_BLOB *lm_pwd, DATA_BLOB *nt_pwd,
DATA_BLOB *lm_interactive_pwd, DATA_BLOB *nt_interactive_pwd,
DATA_BLOB *plaintext,
- BOOL encrypted)
+ bool encrypted)
{
DEBUG(5,("attempting to make a user_info for %s (%s)\n", internal_username, smb_name));
@@ -141,11 +141,11 @@ NTSTATUS make_user_info_map(auth_usersupplied_info **user_info,
DATA_BLOB *lm_pwd, DATA_BLOB *nt_pwd,
DATA_BLOB *lm_interactive_pwd, DATA_BLOB *nt_interactive_pwd,
DATA_BLOB *plaintext,
- BOOL encrypted)
+ bool encrypted)
{
const char *domain;
NTSTATUS result;
- BOOL was_mapped;
+ bool was_mapped;
fstring internal_username;
fstrcpy(internal_username, smb_name);
was_mapped = map_username(internal_username);
@@ -186,7 +186,7 @@ NTSTATUS make_user_info_map(auth_usersupplied_info **user_info,
Decrypt and encrypt the passwords.
****************************************************************************/
-BOOL make_user_info_netlogon_network(auth_usersupplied_info **user_info,
+bool make_user_info_netlogon_network(auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *wksta_name,
@@ -196,7 +196,7 @@ BOOL make_user_info_netlogon_network(auth_usersupplied_info **user_info,
const uchar *nt_network_pwd,
int nt_pwd_len)
{
- BOOL ret;
+ bool ret;
NTSTATUS status;
DATA_BLOB lm_blob = data_blob(lm_network_pwd, lm_pwd_len);
DATA_BLOB nt_blob = data_blob(nt_network_pwd, nt_pwd_len);
@@ -224,7 +224,7 @@ BOOL make_user_info_netlogon_network(auth_usersupplied_info **user_info,
Decrypt and encrypt the passwords.
****************************************************************************/
-BOOL make_user_info_netlogon_interactive(auth_usersupplied_info **user_info,
+bool make_user_info_netlogon_interactive(auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *wksta_name,
@@ -286,7 +286,7 @@ BOOL make_user_info_netlogon_interactive(auth_usersupplied_info **user_info,
ZERO_STRUCT(key);
{
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
DATA_BLOB local_lm_blob;
DATA_BLOB local_nt_blob;
@@ -337,7 +337,7 @@ BOOL make_user_info_netlogon_interactive(auth_usersupplied_info **user_info,
Create an auth_usersupplied_data structure
****************************************************************************/
-BOOL make_user_info_for_reply(auth_usersupplied_info **user_info,
+bool make_user_info_for_reply(auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const uint8 chal[8],
@@ -413,7 +413,7 @@ NTSTATUS make_user_info_for_reply_enc(auth_usersupplied_info **user_info,
Create a guest user_info blob, for anonymous authenticaion.
****************************************************************************/
-BOOL make_user_info_guest(auth_usersupplied_info **user_info)
+bool make_user_info_guest(auth_usersupplied_info **user_info)
{
NTSTATUS nt_status;
@@ -680,7 +680,7 @@ NTSTATUS create_local_token(auth_serversupplied_info *server_info)
*/
NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
- BOOL is_guest,
+ bool is_guest,
uid_t *uid, gid_t *gid,
char **found_username,
struct nt_user_token **token)
@@ -721,7 +721,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
}
if (sid_check_is_in_our_domain(&user_sid)) {
- BOOL ret;
+ bool ret;
/* This is a passdb user, so ask passdb */
@@ -900,14 +900,14 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
member of a particular group.
***************************************************************************/
-BOOL user_in_group_sid(const char *username, const DOM_SID *group_sid)
+bool user_in_group_sid(const char *username, const DOM_SID *group_sid)
{
NTSTATUS status;
uid_t uid;
gid_t gid;
char *found_username;
struct nt_user_token *token;
- BOOL result;
+ bool result;
TALLOC_CTX *mem_ctx;
@@ -933,11 +933,11 @@ BOOL user_in_group_sid(const char *username, const DOM_SID *group_sid)
}
-BOOL user_in_group(const char *username, const char *groupname)
+bool user_in_group(const char *username, const char *groupname)
{
TALLOC_CTX *mem_ctx;
DOM_SID group_sid;
- BOOL ret;
+ bool ret;
mem_ctx = talloc_new(NULL);
if (mem_ctx == NULL) {
@@ -1078,7 +1078,7 @@ static NTSTATUS make_new_server_info_guest(auth_serversupplied_info **server_inf
NTSTATUS status;
struct samu *sampass = NULL;
DOM_SID guest_sid;
- BOOL ret;
+ bool ret;
static const char zeros[16] = { 0, };
if ( !(sampass = samu_new( NULL )) ) {
@@ -1177,7 +1177,7 @@ static auth_serversupplied_info *copy_serverinfo(auth_serversupplied_info *src)
static auth_serversupplied_info *guest_info = NULL;
-BOOL init_guest_info(void)
+bool init_guest_info(void)
{
if (guest_info != NULL)
return True;
@@ -1191,7 +1191,7 @@ NTSTATUS make_server_info_guest(auth_serversupplied_info **server_info)
return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
}
-BOOL copy_current_user(struct current_user *dst, struct current_user *src)
+bool copy_current_user(struct current_user *dst, struct current_user *src)
{
gid_t *groups;
NT_USER_TOKEN *nt_token;
@@ -1218,7 +1218,7 @@ BOOL copy_current_user(struct current_user *dst, struct current_user *src)
return True;
}
-BOOL set_current_user_guest(struct current_user *dst)
+bool set_current_user_guest(struct current_user *dst)
{
gid_t *groups;
NT_USER_TOKEN *nt_token;
@@ -1261,7 +1261,7 @@ static NTSTATUS fill_sam_account(TALLOC_CTX *mem_ctx,
char **found_username,
uid_t *uid, gid_t *gid,
struct samu *account,
- BOOL *username_was_mapped)
+ bool *username_was_mapped)
{
NTSTATUS nt_status;
fstring dom_user, lower_username;
@@ -1308,7 +1308,7 @@ static NTSTATUS fill_sam_account(TALLOC_CTX *mem_ctx,
****************************************************************************/
struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, char *domuser,
- fstring save_username, BOOL create )
+ fstring save_username, bool create )
{
struct passwd *pw = NULL;
char *p;
@@ -1405,7 +1405,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
struct samu *sam_account = NULL;
DOM_SID user_sid;
DOM_SID group_sid;
- BOOL username_was_mapped;
+ bool username_was_mapped;
uid_t uid;
gid_t gid;
@@ -1655,7 +1655,7 @@ void free_user_info(auth_usersupplied_info **user_info)
Make an auth_methods struct
***************************************************************************/
-BOOL make_auth_methods(struct auth_context *auth_context, auth_methods **auth_method)
+bool make_auth_methods(struct auth_context *auth_context, auth_methods **auth_method)
{
if (!auth_context) {
smb_panic("no auth_context supplied to "
@@ -1685,10 +1685,10 @@ BOOL make_auth_methods(struct auth_context *auth_context, auth_methods **auth_me
* false if otherwise
**/
-BOOL is_trusted_domain(const char* dom_name)
+bool is_trusted_domain(const char* dom_name)
{
DOM_SID trustdom_sid;
- BOOL ret;
+ bool ret;
/* no trusted domains for a standalone server */
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 0104108e8e..ac3aa3aa64 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -68,7 +68,7 @@ typedef int (*smb_pam_conv_fn)(int, const struct pam_message **, struct pam_resp
PAM error handler.
*********************************************************************/
-static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, const char *msg, int dbglvl)
+static bool smb_pam_error_handler(pam_handle_t *pamh, int pam_error, const char *msg, int dbglvl)
{
if( pam_error != PAM_SUCCESS) {
@@ -85,7 +85,7 @@ static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, const char
failure as sucess.
*********************************************************************/
-static BOOL smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
+static bool smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
const char *msg, int dbglvl,
NTSTATUS *nt_status)
{
@@ -270,7 +270,7 @@ static int smb_pam_passchange_conv(int num_msg,
struct smb_pam_userdata *udp = (struct smb_pam_userdata *)appdata_ptr;
struct chat_struct *pw_chat= make_pw_chat(lp_passwd_chat());
struct chat_struct *t;
- BOOL found;
+ bool found;
*resp = NULL;
DEBUG(10,("smb_pam_passchange_conv: starting converstation for %d messages\n", num_msg));
@@ -430,7 +430,7 @@ static struct pam_conv *smb_setup_pam_conv(smb_pam_conv_fn smb_pam_conv_fnptr, c
* PAM Closing out cleanup handler
*/
-static BOOL smb_pam_end(pam_handle_t *pamh, struct pam_conv *smb_pam_conv_ptr)
+static bool smb_pam_end(pam_handle_t *pamh, struct pam_conv *smb_pam_conv_ptr)
{
int pam_error;
@@ -451,7 +451,7 @@ static BOOL smb_pam_end(pam_handle_t *pamh, struct pam_conv *smb_pam_conv_ptr)
* Start PAM authentication for specified account
*/
-static BOOL smb_pam_start(pam_handle_t **pamh, const char *user, const char *rhost, struct pam_conv *pconv)
+static bool smb_pam_start(pam_handle_t **pamh, const char *user, const char *rhost, struct pam_conv *pconv)
{
int pam_error;
const char *our_rhost;
@@ -624,7 +624,7 @@ static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, const char * user)
/*
* PAM Internal Session Handler
*/
-static BOOL smb_internal_pam_session(pam_handle_t *pamh, const char *user, const char *tty, BOOL flag)
+static bool smb_internal_pam_session(pam_handle_t *pamh, const char *user, const char *tty, bool flag)
{
int pam_error;
@@ -652,7 +652,7 @@ static BOOL smb_internal_pam_session(pam_handle_t *pamh, const char *user, const
* Internal PAM Password Changer.
*/
-static BOOL smb_pam_chauthtok(pam_handle_t *pamh, const char * user)
+static bool smb_pam_chauthtok(pam_handle_t *pamh, const char * user)
{
int pam_error;
@@ -706,7 +706,7 @@ static BOOL smb_pam_chauthtok(pam_handle_t *pamh, const char * user)
* PAM Externally accessible Session handler
*/
-BOOL smb_pam_claim_session(char *user, char *tty, char *rhost)
+bool smb_pam_claim_session(char *user, char *tty, char *rhost)
{
pam_handle_t *pamh = NULL;
struct pam_conv *pconv = NULL;
@@ -734,7 +734,7 @@ BOOL smb_pam_claim_session(char *user, char *tty, char *rhost)
* PAM Externally accessible Session handler
*/
-BOOL smb_pam_close_session(char *user, char *tty, char *rhost)
+bool smb_pam_close_session(char *user, char *tty, char *rhost)
{
pam_handle_t *pamh = NULL;
struct pam_conv *pconv = NULL;
@@ -834,7 +834,7 @@ NTSTATUS smb_pam_passcheck(const char * user, const char * password)
* PAM Password Change Suite
*/
-BOOL smb_pam_passchange(const char * user, const char * oldpassword, const char * newpassword)
+bool smb_pam_passchange(const char * user, const char * oldpassword, const char * newpassword)
{
/* Appropriate quantities of root should be obtained BEFORE calling this function */
struct pam_conv *pconv = NULL;
@@ -864,13 +864,13 @@ NTSTATUS smb_pam_accountcheck(const char * user)
}
/* If PAM not used, also no PAM restrictions on sessions. */
-BOOL smb_pam_claim_session(char *user, char *tty, char *rhost)
+bool smb_pam_claim_session(char *user, char *tty, char *rhost)
{
return True;
}
/* If PAM not used, also no PAM restrictions on sessions. */
-BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost)
+bool smb_pam_close_session(char *in_user, char *tty, char *rhost)
{
return True;
}
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index b1a6e4d402..8773804a38 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -40,7 +40,7 @@ static fstring this_crypted;
/*******************************************************************
check on AFS authentication
********************************************************************/
-static BOOL afs_auth(char *user, char *password)
+static bool afs_auth(char *user, char *password)
{
long password_expires = 0;
char *reason;
@@ -89,7 +89,7 @@ int dcelogin_atmost_once = 0;
/*******************************************************************
check on a DCE/DFS authentication
********************************************************************/
-static BOOL dfs_auth(char *user, char *password)
+static bool dfs_auth(char *user, char *password)
{
struct tm *t;
error_status_t err;
@@ -495,7 +495,7 @@ static NTSTATUS password_check(const char *password)
return smb_pam_passcheck(this_user, password);
#else
- BOOL ret;
+ bool ret;
#ifdef WITH_AFS
if (afs_auth(this_user, password))
@@ -597,7 +597,7 @@ return NT_STATUS_OK on correct match, appropriate error otherwise
****************************************************************************/
NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *password,
- int pwlen, BOOL (*fn) (const char *, const char *), BOOL run_cracker)
+ int pwlen, bool (*fn) (const char *, const char *), bool run_cracker)
{
pstring pass2;
int level = lp_passwordlevel();
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 7514d867ad..bc6bea5d29 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -30,7 +30,7 @@
Check for a SID in an NT_USER_TOKEN
****************************************************************************/
-BOOL nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token )
+bool nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token )
{
int i;
@@ -45,7 +45,7 @@ BOOL nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token )
return False;
}
-BOOL nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid )
+bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid )
{
DOM_SID domain_sid;
@@ -223,7 +223,7 @@ static NTSTATUS create_builtin_administrators( void )
fstring root_name;
enum lsa_SidType type;
TALLOC_CTX *ctx;
- BOOL ret;
+ bool ret;
status = pdb_create_builtin_alias( BUILTIN_ALIAS_RID_ADMINS );
if ( !NT_STATUS_IS_OK(status) ) {
@@ -271,7 +271,7 @@ static NTSTATUS create_builtin_administrators( void )
struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
const DOM_SID *user_sid,
- BOOL is_guest,
+ bool is_guest,
int num_groupsids,
const DOM_SID *groupsids)
{