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

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 f35a266b3c)
This commit is contained in:
Jeremy Allison 2007-10-18 17:40:25 -07:00
parent 789856f63f
commit 30191d1a57
449 changed files with 5317 additions and 5344 deletions

View File

@ -49,7 +49,7 @@
Directories are always displayed...
*/
static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
{
uint32 num = 3;
uint32 i;

View File

@ -53,7 +53,7 @@ static void skel_disconnect(vfs_handle_struct *handle, connection_struct *conn)
}
static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle, const char *path,
BOOL small_query, SMB_BIG_UINT *bsize,
bool small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
return vfswrap_disk_free(NULL, path, small_query, bsize,
@ -70,7 +70,7 @@ static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
return vfswrap_set_quota(NULL, qtype, id, dq);
}
static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
{
return vfswrap_get_shadow_copy_data(NULL, fsp, shadow_copy_data, labels);
}
@ -230,12 +230,12 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd,
return vfswrap_ftruncate(NULL, fsp, fd, offset);
}
static BOOL skel_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
return vfswrap_lock(NULL, fsp, fd, op, offset, count, type);
}
static BOOL skel_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
{
return vfswrap_getlock(NULL, fsp, fd, poffset, pcount, ptype, ppid);
}

View File

@ -47,7 +47,7 @@ static void skel_disconnect(vfs_handle_struct *handle)
}
static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle, const char *path,
BOOL small_query, SMB_BIG_UINT *bsize,
bool small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
return SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize,
@ -64,7 +64,7 @@ static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
return SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, dq);
}
static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
{
return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
}
@ -224,12 +224,12 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd,
return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, fd, offset);
}
static BOOL skel_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
return SMB_VFS_NEXT_LOCK(handle, fsp, fd, op, offset, count, type);
}
static BOOL skel_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
{
return SMB_VFS_NEXT_GETLOCK(handle, fsp, fd, poffset, pcount, ptype, ppid);
}

View File

@ -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) {

View File

@ -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) {
/*

View File

@ -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

View File

@ -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 */

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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;
}

View File

@ -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();

View File

@ -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)
{

View File

@ -27,10 +27,10 @@
#define REGISTER 0
#endif
extern BOOL AllowDebugChange;
extern BOOL override_logfile;
extern bool AllowDebugChange;
extern bool override_logfile;
extern char tar_type;
extern BOOL in_client;
extern bool in_client;
static int port = 0;
pstring cur_dir = "\\";
static pstring cd_path = "";
@ -38,7 +38,7 @@ static pstring service;
static pstring desthost;
static pstring username;
static pstring calling_name;
static BOOL grepable=False;
static bool grepable=False;
static char *cmdstr = NULL;
static int io_bufsize = 64512;
@ -63,27 +63,27 @@ static pstring cwd;
time_t newer_than = 0;
static int archive_level = 0;
static BOOL translation = False;
static BOOL have_ip;
static bool translation = False;
static bool have_ip;
/* clitar bits insert */
extern int blocksize;
extern BOOL tar_inc;
extern BOOL tar_reset;
extern bool tar_inc;
extern bool tar_reset;
/* clitar bits end */
static BOOL prompt = True;
static bool prompt = True;
static BOOL recurse = False;
static BOOL showacls = False;
BOOL lowercase = False;
static bool recurse = False;
static bool showacls = False;
bool lowercase = False;
static struct in_addr dest_ip;
#define SEPARATORS " \t\n\r"
static BOOL abort_mget = True;
static bool abort_mget = True;
static pstring fileselection = "";
@ -364,7 +364,7 @@ static int cmd_cd_oneup(void)
Decide if a file should be operated on.
********************************************************************/
static BOOL do_this_one(file_info *finfo)
static bool do_this_one(file_info *finfo)
{
if (finfo->mode & aDIR)
return(True);
@ -450,8 +450,8 @@ static void do_du(file_info *finfo)
}
}
static BOOL do_list_recurse;
static BOOL do_list_dirs;
static bool do_list_recurse;
static bool do_list_dirs;
static char *do_list_queue = 0;
static long do_list_queue_size = 0;
static long do_list_queue_start = 0;
@ -621,7 +621,7 @@ static void do_list_helper(const char *mntpoint, file_info *f, const char *mask,
A wrapper around cli_list that adds recursion.
****************************************************************************/
void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs)
void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),bool rec, bool dirs)
{
static int in_do_list = 0;
struct cli_state *targetcli;
@ -803,10 +803,10 @@ static int cmd_echo(void)
Get a file from rname to lname
****************************************************************************/
static int do_get(char *rname, char *lname, BOOL reget)
static int do_get(char *rname, char *lname, bool reget)
{
int handle = 0, fnum;
BOOL newhandle = False;
bool newhandle = False;
char *data;
struct timeval tp_start;
int read_size = io_bufsize;
@ -1113,7 +1113,7 @@ static int cmd_mget(void)
Make a directory of name "name".
****************************************************************************/
static BOOL do_mkdir(char *name)
static bool do_mkdir(char *name)
{
struct cli_state *targetcli;
pstring targetname;
@ -1136,7 +1136,7 @@ static BOOL do_mkdir(char *name)
Show 8.3 name of a file.
****************************************************************************/
static BOOL do_altname(char *name)
static bool do_altname(char *name)
{
pstring altname;
if (!NT_STATUS_IS_OK(cli_qpathinfo_alt_name(cli, name, altname))) {
@ -1237,7 +1237,7 @@ static int cmd_altname(void)
Put a single file.
****************************************************************************/
static int do_put(char *rname, char *lname, BOOL reput)
static int do_put(char *rname, char *lname, bool reput)
{
int fnum;
XFILE *f;
@ -1416,7 +1416,7 @@ static int cmd_put(void)
static struct file_list {
struct file_list *prev, *next;
char *file_path;
BOOL isdir;
bool isdir;
} *file_list;
/****************************************************************************
@ -1440,7 +1440,7 @@ static void free_file_list (struct file_list *list_head)
the specified name.
****************************************************************************/
static BOOL seek_list(struct file_list *list, char *name)
static bool seek_list(struct file_list *list, char *name)
{
while (list) {
trim_string(list->file_path,"./","\n");
@ -1471,14 +1471,14 @@ static int cmd_select(void)
****************************************************************************/
static int file_find(struct file_list **list, const char *directory,
const char *expression, BOOL match)
const char *expression, bool match)
{
SMB_STRUCT_DIR *dir;
struct file_list *entry;
struct stat statbuf;
int ret;
char *path;
BOOL isdir;
bool isdir;
const char *dname;
dir = sys_opendir(directory);
@ -2800,7 +2800,7 @@ static int cmd_prompt(void)
static int cmd_newer(void)
{
pstring buf;
BOOL ok;
bool ok;
SMB_STRUCT_STAT sbuf;
ok = next_token_nr(NULL,buf,NULL,sizeof(buf));
@ -2854,7 +2854,7 @@ static int cmd_lowercase(void)
static int cmd_setcase(void)
{
BOOL orig_case_sensitive = cli_set_case_sensitive(cli, False);
bool orig_case_sensitive = cli_set_case_sensitive(cli, False);
cli_set_case_sensitive(cli, !orig_case_sensitive);
DEBUG(2,("filename case sensitivity is now %s\n",!orig_case_sensitive ?
@ -3019,7 +3019,7 @@ static void browse_fn(const char *name, uint32 m,
}
}
static BOOL browse_host_rpc(BOOL sort)
static bool browse_host_rpc(bool sort)
{
NTSTATUS status;
struct rpc_pipe_client *pipe_hnd;
@ -3074,7 +3074,7 @@ static BOOL browse_host_rpc(BOOL sort)
Try and browse available connections on a host.
****************************************************************************/
static BOOL browse_host(BOOL sort)
static bool browse_host(bool sort)
{
int ret;
if (!grepable) {
@ -3111,7 +3111,7 @@ static void server_fn(const char *name, uint32 m,
Try and browse available connections on a host.
****************************************************************************/
static BOOL list_servers(const char *wk_grp)
static bool list_servers(const char *wk_grp)
{
fstring state;
@ -3894,15 +3894,15 @@ static int do_message_op(void)
pstring base_directory;
int opt;
pstring query_host;
BOOL message = False;
bool message = False;
pstring term_code;
static const char *new_name_resolve_order = NULL;
poptContext pc;
char *p;
int rc = 0;
fstring new_workgroup;
BOOL tar_opt = False;
BOOL service_opt = False;
bool tar_opt = False;
bool service_opt = False;
struct poptOption long_options[] = {
POPT_AUTOHELP

View File

@ -80,32 +80,32 @@ static char *tarbuf, *buffer_p;
static int tp, ntarf, tbufsiz;
static double ttarf;
/* Incremental mode */
static BOOL tar_inc=False;
static bool tar_inc=False;
/* Reset archive bit */
static BOOL tar_reset=False;
static bool tar_reset=False;
/* Include / exclude mode (true=include, false=exclude) */
static BOOL tar_excl=True;
static bool tar_excl=True;
/* use regular expressions for search on file names */
static BOOL tar_re_search=False;
static bool tar_re_search=False;
/* Do not dump anything, just calculate sizes */
static BOOL dry_run=False;
static bool dry_run=False;
/* Dump files with System attribute */
static BOOL tar_system=True;
static bool tar_system=True;
/* Dump files with Hidden attribute */
static BOOL tar_hidden=True;
static bool tar_hidden=True;
/* Be noisy - make a catalogue */
static BOOL tar_noisy=True;
static BOOL tar_real_noisy=False; /* Don't want to be really noisy by default */
static bool tar_noisy=True;
static bool tar_real_noisy=False; /* Don't want to be really noisy by default */
char tar_type='\0';
static char **cliplist=NULL;
static int clipn=0;
static BOOL must_free_cliplist = False;
static bool must_free_cliplist = False;
extern file_info def_finfo;
extern BOOL lowercase;
extern bool lowercase;
extern uint16 cnum;
extern BOOL readbraw_supported;
extern bool readbraw_supported;
extern int max_xmit;
extern pstring cur_dir;
extern int get_total_time_ms;
@ -129,7 +129,7 @@ static void initarbuf(void);
static long readtarheader(union hblock *hb, file_info2 *finfo, char *prefix);
static long unoct(char *p, int ndgs);
static void do_tarput(void);
static void unfixtarname(char *tptr, char *fp, int l, BOOL first);
static void unfixtarname(char *tptr, char *fp, int l, bool first);
/*
* tar specific utitlities
@ -512,7 +512,7 @@ static int strslashcmp(char *s1, char *s2)
Ensure a remote path exists (make if necessary)
***************************************************************************/
static BOOL ensurepath(char *fname)
static bool ensurepath(char *fname)
{
/* *must* be called with buffer ready malloc'ed */
/* ensures path exists */
@ -608,8 +608,8 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
SMB_BIG_UINT nread=0;
char ftype;
file_info2 finfo;
BOOL close_done = False;
BOOL shallitime=True;
bool close_done = False;
bool shallitime=True;
char data[65520];
int read_size = 65520;
int datalen=0;
@ -689,7 +689,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
DEBUG(4, ("skipping %s - hidden bit is set\n", finfo.name));
shallitime=0;
} else {
BOOL wrote_tar_header = False;
bool wrote_tar_header = False;
DEBUG(3,("getting file %s of size %.0f bytes as a tar file %s",
finfo.name, (double)finfo.size, lname));
@ -861,7 +861,7 @@ strlen(finfo->name)=%d\nname=%s,cur_dir=%s\n",
Convert from UNIX to DOS file names
***************************************************************************/
static void unfixtarname(char *tptr, char *fp, int l, BOOL first)
static void unfixtarname(char *tptr, char *fp, int l, bool first)
{
/* remove '.' from start of file name, convert from unix /'s to
* dos \'s in path. Kill any absolute path names. But only if first!
@ -1076,7 +1076,7 @@ static char *get_longfilename(file_info2 finfo)
int namesize = finfo.size + strlen(cur_dir) + 2;
char *longname = (char *)SMB_MALLOC(namesize);
int offset = 0, left = finfo.size;
BOOL first = True;
bool first = True;
DEBUG(5, ("Restoring a long file name: %s\n", finfo.name));
DEBUG(5, ("Len = %.0f\n", (double)finfo.size));

0
source3/client/mount.cifs.c Executable file → Normal file
View File

View File

@ -28,10 +28,10 @@
#define REGISTER 0
#endif
extern BOOL AllowDebugChange;
extern BOOL override_logfile;
extern bool AllowDebugChange;
extern bool override_logfile;
extern char tar_type;
extern BOOL in_client;
extern bool in_client;
static int port = 0;
pstring cur_dir = "/";
static pstring service;
@ -39,7 +39,7 @@ static pstring desthost;
static pstring username;
static pstring workgroup;
static pstring calling_name;
static BOOL grepable=False;
static bool grepable=False;
static char *cmdstr = NULL;
static int io_bufsize = 64512;
@ -60,26 +60,26 @@ static int cmd_help(void);
time_t newer_than = 0;
static int archive_level = 0;
static BOOL translation = False;
static BOOL have_ip;
static bool translation = False;
static bool have_ip;
/* clitar bits insert */
extern int blocksize;
extern BOOL tar_inc;
extern BOOL tar_reset;
extern bool tar_inc;
extern bool tar_reset;
/* clitar bits end */
static BOOL prompt = True;
static bool prompt = True;
static BOOL recurse = False;
BOOL lowercase = False;
static bool recurse = False;
bool lowercase = False;
static struct in_addr dest_ip;
#define SEPARATORS " \t\n\r"
static BOOL abort_mget = True;
static bool abort_mget = True;
static pstring fileselection = "";
@ -408,7 +408,7 @@ static int cmd_cd(void)
Decide if a file should be operated on.
********************************************************************/
static BOOL do_this_one(file_info *finfo)
static bool do_this_one(file_info *finfo)
{
if (finfo->mode & aDIR)
return(True);
@ -474,8 +474,8 @@ static void do_du(file_info *finfo)
}
}
static BOOL do_list_recurse;
static BOOL do_list_dirs;
static bool do_list_recurse;
static bool do_list_dirs;
static char *do_list_queue = 0;
static long do_list_queue_size = 0;
static long do_list_queue_start = 0;
@ -628,8 +628,8 @@ static void tool_list_helper(const char *mntpoint, struct stat *f, const char *m
int tool_list( char *mask,
mode_t mode,
void (*fn)(char *, struct stat *),
BOOL rec,
BOOL dirs)
bool rec,
bool dirs)
{
int dh;
pstring dentname;
@ -727,7 +727,7 @@ static void do_list_helper(const char *mntpoint, file_info *f, const char *mask,
A wrapper around cli_list that adds recursion.
****************************************************************************/
void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs)
void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),bool rec, bool dirs)
{
static int in_do_list = 0;
struct cli_state *targetcli;
@ -865,10 +865,10 @@ static int cmd_du(void)
Get a file from rname to lname
****************************************************************************/
static int do_get(char *rname, char *lname, BOOL reget)
static int do_get(char *rname, char *lname, bool reget)
{
int handle = 0, fnum;
BOOL newhandle = False;
bool newhandle = False;
char *data;
struct timeval tp_start;
int read_size = io_bufsize;
@ -1193,7 +1193,7 @@ static int cmd_mget(void)
Make a directory of name "name".
****************************************************************************/
static BOOL do_mkdir(char *name)
static bool do_mkdir(char *name)
{
if (smbc_mkdir(name, 755) < 0)
{
@ -1208,7 +1208,7 @@ static BOOL do_mkdir(char *name)
Show 8.3 name of a file.
****************************************************************************/
static BOOL do_altname(char *name)
static bool do_altname(char *name)
{
pstring altname;
if (!NT_STATUS_IS_OK(cli_qpathinfo_alt_name(cli, name, altname))) {
@ -1320,7 +1320,7 @@ static int cmd_altname(void)
Put a single file.
****************************************************************************/
static int do_put(char *rname, char *lname, BOOL reput)
static int do_put(char *rname, char *lname, bool reput)
{
int fnum;
XFILE *f;
@ -1514,7 +1514,7 @@ static int cmd_put(void)
static struct file_list {
struct file_list *prev, *next;
char *file_path;
BOOL isdir;
bool isdir;
} *file_list;
/****************************************************************************
@ -1538,7 +1538,7 @@ static void free_file_list (struct file_list * list)
the specified name.
****************************************************************************/
static BOOL seek_list(struct file_list *list, char *name)
static bool seek_list(struct file_list *list, char *name)
{
while (list) {
trim_string(list->file_path,"./","\n");
@ -1569,14 +1569,14 @@ static int cmd_select(void)
****************************************************************************/
static int file_find(struct file_list **list, const char *directory,
const char *expression, BOOL match)
const char *expression, bool match)
{
DIR *dir;
struct file_list *entry;
struct stat statbuf;
int ret;
char *path;
BOOL isdir;
bool isdir;
const char *dname;
dir = opendir(directory);
@ -2553,7 +2553,7 @@ static int cmd_prompt(void)
static int cmd_newer(void)
{
pstring buf;
BOOL ok;
bool ok;
SMB_STRUCT_STAT sbuf;
ok = next_token_nr(NULL,buf,NULL,sizeof(buf));
@ -2607,7 +2607,7 @@ static int cmd_lowercase(void)
static int cmd_setcase(void)
{
BOOL orig_case_sensitive = cli_set_case_sensitive(cli, False);
bool orig_case_sensitive = cli_set_case_sensitive(cli, False);
cli_set_case_sensitive(cli, !orig_case_sensitive);
DEBUG(2,("filename case sensitivity is now %s\n",!orig_case_sensitive ?
@ -2757,7 +2757,7 @@ static void browse_fn(const char *name, uint32 m,
Try and browse available connections on a host.
****************************************************************************/
static BOOL browse_host(BOOL sort)
static bool browse_host(bool sort)
{
int ret;
if (!grepable) {
@ -2790,7 +2790,7 @@ static void server_fn(const char *name, uint32 m,
Try and browse available connections on a host.
****************************************************************************/
static BOOL list_servers(const char *wk_grp)
static bool list_servers(const char *wk_grp)
{
fstring state;
@ -3521,7 +3521,7 @@ static int do_message_op(void)
pstring base_directory;
int opt;
pstring query_host;
BOOL message = False;
bool message = False;
pstring term_code;
static const char *new_name_resolve_order = NULL;
poptContext pc;

View File

@ -23,7 +23,7 @@
#include <asm/types.h>
#include <linux/smb_fs.h>
extern BOOL in_client;
extern bool in_client;
extern pstring user_socket_options;
extern char *optarg;
extern int optind;
@ -38,20 +38,20 @@ static pstring service;
static pstring options;
static struct in_addr dest_ip;
static BOOL have_ip;
static bool have_ip;
static int smb_port = 0;
static BOOL got_user;
static BOOL got_pass;
static bool got_user;
static bool got_pass;
static uid_t mount_uid;
static gid_t mount_gid;
static int mount_ro;
static unsigned mount_fmask;
static unsigned mount_dmask;
static BOOL use_kerberos;
static bool use_kerberos;
/* TODO: Add code to detect smbfs version in kernel */
static BOOL status32_smbfs = False;
static BOOL smbfs_has_unicode = False;
static BOOL smbfs_has_lfs = False;
static bool status32_smbfs = False;
static bool smbfs_has_unicode = False;
static bool smbfs_has_lfs = False;
static void usage(void);
@ -549,7 +549,7 @@ static void get_password_file(void)
{
int fd = -1;
char *p;
BOOL close_it = False;
bool close_it = False;
pstring spec;
char pass[128];

View File

@ -35,7 +35,7 @@
* Globals...
*/
extern BOOL in_client; /* Boolean for client library */
extern bool in_client; /* Boolean for client library */
/*

View File

@ -28,7 +28,7 @@ static const struct mapping_backend *backend;
/*
initialise a group mapping backend
*/
static BOOL init_group_mapping(void)
static bool init_group_mapping(void)
{
if (backend != NULL) {
/* already initialised */
@ -101,10 +101,10 @@ struct aliasmem_closure {
/* get a domain group from it's SID */
BOOL get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map)
bool get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map)
{
struct group *grp;
BOOL ret;
bool ret;
if(!init_group_mapping()) {
DEBUG(0,("failed to initialize group mapping\n"));
@ -387,7 +387,7 @@ NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
const DOM_SID *sid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap, size_t *p_num_entries,
BOOL unix_only)
bool unix_only)
{
if (!init_group_mapping()) {
DEBUG(0,("failed to initialize group mapping\n"));
@ -404,7 +404,7 @@ NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
enum lsa_SidType type;
uint32 new_rid;
gid_t gid;
BOOL exists;
bool exists;
GROUP_MAP map;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
@ -626,7 +626,7 @@ NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
enum lsa_SidType sid_name_use,
GROUP_MAP **rmap, size_t *num_entries,
BOOL unix_only)
bool unix_only)
{
return NT_STATUS_UNSUCCESSFUL;
}
@ -634,10 +634,10 @@ NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
/****************************************************************************
These need to be redirected through pdb_interface.c
****************************************************************************/
BOOL pdb_get_dom_grp_info(const DOM_SID *sid, struct acct_info *info)
bool pdb_get_dom_grp_info(const DOM_SID *sid, struct acct_info *info)
{
GROUP_MAP map;
BOOL res;
bool res;
become_root();
res = get_domain_group_from_sid(*sid, &map);
@ -652,7 +652,7 @@ BOOL pdb_get_dom_grp_info(const DOM_SID *sid, struct acct_info *info)
return True;
}
BOOL pdb_set_dom_grp_info(const DOM_SID *sid, const struct acct_info *info)
bool pdb_set_dom_grp_info(const DOM_SID *sid, const struct acct_info *info)
{
GROUP_MAP map;

View File

@ -14,15 +14,15 @@
groupdb mapping backend abstraction
*/
struct mapping_backend {
BOOL (*init_group_mapping)(void);
BOOL (*add_mapping_entry)(GROUP_MAP *map, int flag);
BOOL (*get_group_map_from_sid)(DOM_SID sid, GROUP_MAP *map);
BOOL (*get_group_map_from_gid)(gid_t gid, GROUP_MAP *map);
BOOL (*get_group_map_from_ntname)(const char *name, GROUP_MAP *map);
BOOL (*group_map_remove)(const DOM_SID *sid);
BOOL (*enum_group_mapping)(const DOM_SID *domsid, enum lsa_SidType sid_name_use,
bool (*init_group_mapping)(void);
bool (*add_mapping_entry)(GROUP_MAP *map, int flag);
bool (*get_group_map_from_sid)(DOM_SID sid, GROUP_MAP *map);
bool (*get_group_map_from_gid)(gid_t gid, GROUP_MAP *map);
bool (*get_group_map_from_ntname)(const char *name, GROUP_MAP *map);
bool (*group_map_remove)(const DOM_SID *sid);
bool (*enum_group_mapping)(const DOM_SID *domsid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap,
size_t *p_num_entries, BOOL unix_only);
size_t *p_num_entries, bool unix_only);
NTSTATUS (*one_alias_membership)(const DOM_SID *member,
DOM_SID **sids, size_t *num);
NTSTATUS (*add_aliasmem)(const DOM_SID *alias, const DOM_SID *member);

View File

@ -28,14 +28,14 @@
static struct ldb_context *ldb;
static BOOL mapping_upgrade(const char *tdb_path);
static bool mapping_upgrade(const char *tdb_path);
/*
connect to the group mapping ldb
*/
static BOOL init_group_mapping(void)
static bool init_group_mapping(void)
{
BOOL existed;
bool existed;
const char *init_ldif[] =
{ "dn: @ATTRIBUTES\n" \
"ntName: CASE_INSENSITIVE\n" \
@ -131,7 +131,7 @@ static struct ldb_dn *mapping_dn(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
/*
add a group mapping entry
*/
static BOOL add_mapping_entry(GROUP_MAP *map, int flag)
static bool add_mapping_entry(GROUP_MAP *map, int flag)
{
struct ldb_message *msg;
int ret, i;
@ -180,7 +180,7 @@ failed:
/*
unpack a ldb message into a GROUP_MAP structure
*/
static BOOL msg_to_group_map(struct ldb_message *msg, GROUP_MAP *map)
static bool msg_to_group_map(struct ldb_message *msg, GROUP_MAP *map)
{
const char *sidstr;
@ -203,7 +203,7 @@ static BOOL msg_to_group_map(struct ldb_message *msg, GROUP_MAP *map)
/*
return a group map entry for a given sid
*/
static BOOL get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
static bool get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
{
int ret;
struct ldb_dn *dn;
@ -231,7 +231,7 @@ failed:
/*
return a group map entry for a given gid
*/
static BOOL get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
static bool get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
{
int ret;
char *expr;
@ -258,7 +258,7 @@ failed:
/*
Return the sid and the type of the unix group.
*/
static BOOL get_group_map_from_ntname(const char *name, GROUP_MAP *map)
static bool get_group_map_from_ntname(const char *name, GROUP_MAP *map)
{
int ret;
char *expr;
@ -284,7 +284,7 @@ failed:
/*
Remove a group mapping entry.
*/
static BOOL group_map_remove(const DOM_SID *sid)
static bool group_map_remove(const DOM_SID *sid)
{
struct ldb_dn *dn;
int ret;
@ -303,9 +303,9 @@ static BOOL group_map_remove(const DOM_SID *sid)
/*
Enumerate the group mappings for a domain
*/
static BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use,
static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap,
size_t *p_num_entries, BOOL unix_only)
size_t *p_num_entries, bool unix_only)
{
int i, ret;
char *expr;
@ -614,7 +614,7 @@ static int upgrade_alias_record(TDB_CONTEXT *tdb_ctx, TDB_DATA key,
/*
upgrade from a old style tdb
*/
static BOOL mapping_upgrade(const char *tdb_path)
static bool mapping_upgrade(const char *tdb_path)
{
static TDB_CONTEXT *tdb;
int ret, status=0;

View File

@ -25,14 +25,14 @@
static TDB_CONTEXT *tdb; /* used for driver files */
static BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
size_t *p_num_entries, BOOL unix_only);
static BOOL group_map_remove(const DOM_SID *sid);
static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
size_t *p_num_entries, bool unix_only);
static bool group_map_remove(const DOM_SID *sid);
/****************************************************************************
Open the group mapping tdb.
****************************************************************************/
static BOOL init_group_mapping(void)
static bool init_group_mapping(void)
{
const char *vstring = "INFO/version";
int32 vers_id;
@ -88,7 +88,7 @@ static BOOL init_group_mapping(void)
/****************************************************************************
****************************************************************************/
static BOOL add_mapping_entry(GROUP_MAP *map, int flag)
static bool add_mapping_entry(GROUP_MAP *map, int flag)
{
TDB_DATA dbuf;
pstring key, buf;
@ -117,7 +117,7 @@ static BOOL add_mapping_entry(GROUP_MAP *map, int flag)
Return the sid and the type of the unix group.
****************************************************************************/
static BOOL get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
static bool get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
{
TDB_DATA dbuf;
pstring key;
@ -152,7 +152,7 @@ static BOOL get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
Return the sid and the type of the unix group.
****************************************************************************/
static BOOL get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
static bool get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
{
TDB_DATA kbuf, dbuf, newkey;
fstring string_sid;
@ -197,7 +197,7 @@ static BOOL get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
Return the sid and the type of the unix group.
****************************************************************************/
static BOOL get_group_map_from_ntname(const char *name, GROUP_MAP *map)
static bool get_group_map_from_ntname(const char *name, GROUP_MAP *map)
{
TDB_DATA kbuf, dbuf, newkey;
fstring string_sid;
@ -242,7 +242,7 @@ static BOOL get_group_map_from_ntname(const char *name, GROUP_MAP *map)
Remove a group mapping entry.
****************************************************************************/
static BOOL group_map_remove(const DOM_SID *sid)
static bool group_map_remove(const DOM_SID *sid)
{
TDB_DATA dbuf;
pstring key;
@ -269,8 +269,8 @@ static BOOL group_map_remove(const DOM_SID *sid)
Enumerate the group mapping.
****************************************************************************/
static BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
size_t *p_num_entries, BOOL unix_only)
static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
size_t *p_num_entries, bool unix_only)
{
TDB_DATA kbuf, dbuf, newkey;
fstring string_sid;
@ -411,7 +411,7 @@ static NTSTATUS alias_memberships(const DOM_SID *members, size_t num_members,
return NT_STATUS_OK;
}
static BOOL is_aliasmem(const DOM_SID *alias, const DOM_SID *member)
static bool is_aliasmem(const DOM_SID *alias, const DOM_SID *member)
{
DOM_SID *sids;
size_t i, num;
@ -561,7 +561,7 @@ static NTSTATUS del_aliasmem(const DOM_SID *alias, const DOM_SID *member)
NTSTATUS result;
DOM_SID *sids;
size_t i, num;
BOOL found = False;
bool found = False;
char *member_string;
TDB_DATA dbuf;
pstring key;

View File

@ -17,15 +17,15 @@ char **ads_pull_strings_range(ADS_STRUCT *ads,
char **current_strings,
const char **next_attribute,
size_t *num_strings,
BOOL *more_strings);
BOOL ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
bool *more_strings);
bool ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
uint32 *v);
BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
BOOL ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
bool ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
bool ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
DOM_SID *sid);
int ads_pull_sids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg, const char *field, DOM_SID **sids);
BOOL ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
bool ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg, const char *field, SEC_DESC **sd);
char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg);
@ -90,7 +90,7 @@ ADS_STATUS ads_search_retry_sid(ADS_STRUCT *ads, LDAPMessage **res,
LDAPMessage *ads_first_entry(ADS_STRUCT *ads, LDAPMessage *res);
LDAPMessage *ads_next_entry(ADS_STRUCT *ads, LDAPMessage *res);
void ads_process_results(ADS_STRUCT *ads, LDAPMessage *res,
BOOL(*fn)(ADS_STRUCT *,char *, void **, void *),
bool (*fn)(ADS_STRUCT *,char *, void **, void *),
void *data_area);
void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);

View File

@ -20,12 +20,6 @@
#ifndef ADT_TREE_H
#define ADT_TREE_H
#ifndef _UPPER_BOOL
typedef int BOOL;
#define _UPPER_BOOL
#endif
/* data structure used to build the tree */
typedef struct _tree_node {
@ -53,7 +47,7 @@ SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*) );
/* add a new path component */
BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p );
bool pathtree_add( SORTED_TREE *tree, const char *path, void *data_p );
/* search path */

View File

@ -31,7 +31,7 @@ typedef struct asn1_data {
size_t length;
off_t ofs;
struct nesting *nesting;
BOOL has_error;
bool has_error;
} ASN1_DATA;

View File

@ -26,9 +26,9 @@ typedef struct auth_usersupplied_info {
DATA_BLOB nt_interactive_pwd;
DATA_BLOB plaintext_password;
BOOL encrypted;
bool encrypted;
BOOL was_mapped; /* Did the username map actually match? */
bool was_mapped; /* Did the username map actually match? */
char *client_domain; /* domain name string */
char *domain; /* domain name after mapping */
char *internal_username; /* username after mapping */
@ -41,7 +41,7 @@ typedef struct auth_usersupplied_info {
} auth_usersupplied_info;
typedef struct auth_serversupplied_info {
BOOL guest;
bool guest;
DOM_SID *sids; /* These SIDs are preliminary between
check_ntlm_password and the token creation. */
@ -67,7 +67,7 @@ typedef struct auth_serversupplied_info {
void *pam_handle;
BOOL was_mapped; /* Did the username map match? */
bool was_mapped; /* Did the username map match? */
char *unix_name;
} auth_serversupplied_info;
@ -78,7 +78,7 @@ struct auth_context {
/* Who set this up in the first place? */
const char *challenge_set_by;
BOOL challenge_may_be_modified;
bool challenge_may_be_modified;
struct auth_methods *challenge_set_method;
/* What order are the various methods in? Try to stop it changing under us */

View File

@ -128,10 +128,10 @@ struct cli_state {
unsigned int bufsize;
int initialised;
int win95;
BOOL is_samba;
bool is_samba;
uint32 capabilities;
uint32 posix_capabilities;
BOOL dfsroot;
bool dfsroot;
TALLOC_CTX *mem_ctx;
@ -144,18 +144,18 @@ struct cli_state {
/* The list of pipes currently open on this connection. */
struct rpc_pipe_client *pipe_list;
BOOL use_kerberos;
BOOL fallback_after_kerberos;
BOOL use_spnego;
bool use_kerberos;
bool fallback_after_kerberos;
bool use_spnego;
BOOL use_oplocks; /* should we use oplocks? */
BOOL use_level_II_oplocks; /* should we use level II oplocks? */
bool use_oplocks; /* should we use oplocks? */
bool use_level_II_oplocks; /* should we use level II oplocks? */
/* a oplock break request handler */
BOOL (*oplock_handler)(struct cli_state *cli, int fnum, unsigned char level);
bool (*oplock_handler)(struct cli_state *cli, int fnum, unsigned char level);
BOOL force_dos_errors;
BOOL case_sensitive; /* False by default. */
bool force_dos_errors;
bool case_sensitive; /* False by default. */
};
typedef struct file_info {

View File

@ -33,7 +33,7 @@ NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn,
uint32 dst_vnn, uint64 dst_srvid,
struct messaging_rec *msg);
BOOL ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn,
bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn,
pid_t pid);
char *ctdbd_dbpath(struct ctdbd_connection *conn,

View File

@ -39,8 +39,8 @@
/* PRINTFLIKE1 */
int Debug1( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
/* PRINTFLIKE1 */
BOOL dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
BOOL dbghdr( int level, int cls, const char *file, const char *func, int line );
bool dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
bool dbghdr( int level, int cls, const char *file, const char *func, int line );
#if defined(sgi) && (_COMPILER_VERSION >= 730)
#pragma mips_frequency_hint NEVER Debug1
@ -110,7 +110,7 @@ extern int DEBUGLEVEL;
#endif
extern int *DEBUGLEVEL_CLASS;
extern BOOL *DEBUGLEVEL_CLASS_ISSET;
extern bool *DEBUGLEVEL_CLASS_ISSET;
/* Debugging macros
*

View File

@ -36,11 +36,11 @@
struct idmap_domain {
const char *name;
BOOL default_domain;
BOOL readonly;
bool default_domain;
bool readonly;
void *private_data;
struct idmap_methods *methods;
BOOL initialized;
bool initialized;
const char *params;
};

View File

@ -608,11 +608,6 @@ struct timespec {
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
#ifndef _UPPER_BOOL
typedef int BOOL;
#define _UPPER_BOOL
#endif
#ifdef HAVE_BROKEN_GETGROUPS
#define GID_T int
#else
@ -1131,18 +1126,18 @@ void krb5_free_unparsed_name(krb5_context ctx, char *val);
void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr);
int create_kerberos_key_from_string(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype);
int create_kerberos_key_from_string_direct(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype);
BOOL get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt);
bool get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt);
krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt);
krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters);
#if defined(HAVE_KRB5_LOCATE_KDC)
krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters);
#endif
krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes);
BOOL get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, BOOL remote);
bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, bool remote);
krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry);
krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context, krb5_principal host_princ, int enctype);
void kerberos_set_creds_enctype(krb5_creds *pcreds, int enctype);
BOOL kerberos_compatible_enctypes(krb5_context context, krb5_enctype enctype1, krb5_enctype enctype2);
bool kerberos_compatible_enctypes(krb5_context context, krb5_enctype enctype1, krb5_enctype enctype2);
void kerberos_free_data_contents(krb5_context context, krb5_data *pdata);
NTSTATUS decode_pac_data(TALLOC_CTX *mem_ctx,
DATA_BLOB *pac_data_blob,
@ -1177,7 +1172,7 @@ krb5_error_code krb5_rd_req_return_keyblock_from_keytab(krb5_context context,
krb5_error_code smb_krb5_parse_name_norealm(krb5_context context,
const char *name,
krb5_principal *principal);
BOOL smb_krb5_principal_compare_any_realm(krb5_context context,
bool smb_krb5_principal_compare_any_realm(krb5_context context,
krb5_const_principal princ1,
krb5_const_principal princ2);
int cli_krb5_get_ticket(const char *principal, time_t time_offset,
@ -1207,7 +1202,7 @@ krb5_error_code smb_krb5_enctype_to_string(krb5_context context,
char **etype_s);
krb5_error_code smb_krb5_open_keytab(krb5_context context,
const char *keytab_name,
BOOL write_access,
bool write_access,
krb5_keytab *keytab);
#endif /* HAVE_KRB5 */

View File

@ -184,7 +184,7 @@ typedef struct _CACLOOKUPRIDSRECORD {
uint32 type;
/*if the name or RID was looked up, then found = True*/
BOOL found;
bool found;
} CacLookupRidsRecord;
typedef struct _CACUSERINFO {
@ -228,7 +228,7 @@ typedef struct _CACUSERINFO {
uint16 logon_count;
/**Change password at next logon?*/
BOOL pass_must_change;
bool pass_must_change;
/**Username*/
char *username;
@ -464,7 +464,7 @@ void cac_Init(int debug);
* @return - un-initialized server handle
* - NULL if no memory could be allocated
*/
CacServerHandle * cac_NewServerHandle(BOOL allocate_fields);
CacServerHandle * cac_NewServerHandle(bool allocate_fields);
/**
* Specifies the smbc_get_auth_data_fn to use if you do not want to use the default.
@ -553,7 +553,7 @@ struct LsaOpenPolicy {
uint32 access;
/**Use security quality of service? (True/False)*/
BOOL security_qos;
bool security_qos;
} in;
/**Outputs*/
@ -1238,7 +1238,7 @@ struct RegDeleteKey {
char *name;
/**delete recursively. WARNING: this might not always work as planned*/
BOOL recursive;
bool recursive;
} in;
};
@ -1576,10 +1576,10 @@ struct Shutdown {
uint32 timeout;
/**False = shutdown, True = reboot*/
BOOL reboot;
bool reboot;
/**force the*/
BOOL force;
bool force;
/*FIXME: make this useful*/
uint32 reason;
@ -1776,7 +1776,7 @@ struct SamEnumUsers {
/**Array storing the names of all the users returned*/
char **names;
BOOL done;
bool done;
} out;
};
@ -2068,7 +2068,7 @@ struct SamEnumGroups {
/**Array storing the descriptions of all the groups returned*/
char **descriptions;
BOOL done;
bool done;
} out;
};
@ -2104,7 +2104,7 @@ struct SamEnumAliases {
/**Array storing the descriptions of all the groups returned*/
char **descriptions;
BOOL done;
bool done;
} out;
};
@ -2634,7 +2634,7 @@ struct SamGetDisplayInfo {
/**Internal value. Do not modify.*/
uint32 loop_count;
BOOL done;
bool done;
} out;
};

View File

@ -29,19 +29,19 @@ struct CacServerHandleInternal {
uint16 srv_level;
/*stores the initialized/active pipes*/
BOOL pipes[PI_MAX_PIPES];
bool pipes[PI_MAX_PIPES];
/*underlying smbc context*/
SMBCCTX *ctx;
/*did the user supply this SMBCCTX?*/
BOOL user_supplied_ctx;
bool user_supplied_ctx;
};
/*used to get a struct rpc_pipe_client* to be passed into rpccli* calls*/
/*nessecary prototypes*/
BOOL rid_in_list(uint32 rid, uint32 *list, uint32 list_len);
bool rid_in_list(uint32 rid, uint32 *list, uint32 list_len);
int cac_ParseRegPath(char *path, uint32 *reg_type, char **key_name);

View File

@ -12,9 +12,9 @@
struct _SMBCSRV {
struct cli_state *cli;
dev_t dev;
BOOL no_pathinfo;
BOOL no_pathinfo2;
BOOL no_nt_session;
bool no_pathinfo;
bool no_pathinfo2;
bool no_nt_session;
SMBCSRV *next, *prev;
@ -37,7 +37,7 @@ struct _SMBCFILE {
char *fname;
SMB_OFF_T offset;
struct _SMBCSRV *srv;
BOOL file;
bool file;
struct smbc_dir_list *dir_list, *dir_end, *dir_next;
int dir_type, dir_error;
@ -50,7 +50,7 @@ struct smbc_internal_data {
/*
* Is this handle initialized ?
*/
BOOL _initialized;
bool _initialized;
/* dirent pointer location
*
@ -78,7 +78,7 @@ struct smbc_internal_data {
/*
* Log to standard error instead of the more typical standard output
*/
BOOL _debug_stderr;
bool _debug_stderr;
/*
* Support "Create Time" in get/set with the *xattr() functions, if
@ -87,7 +87,7 @@ struct smbc_internal_data {
* CREATE_TIME. Default is FALSE, i.e. to use the old-style shorter
* names and to not support CREATE time, for backward compatibility.
*/
BOOL _full_time_names;
bool _full_time_names;
/*
* The share mode of a file being opened. To match POSIX semantics

View File

@ -54,8 +54,8 @@ struct file_id {
struct byte_range_lock {
struct files_struct *fsp;
unsigned int num_locks;
BOOL modified;
BOOL read_only;
bool modified;
bool read_only;
struct file_id key;
struct lock_struct *lock_data;
struct db_record *record;

View File

@ -6,17 +6,17 @@
struct mangle_fns {
void (*reset)(void);
BOOL (*is_mangled)(const char *s, const struct share_params *p);
BOOL (*must_mangle)(const char *s, const struct share_params *p);
BOOL (*is_8_3)(const char *fname, BOOL check_case, BOOL allow_wildcards,
bool (*is_mangled)(const char *s, const struct share_params *p);
bool (*must_mangle)(const char *s, const struct share_params *p);
bool (*is_8_3)(const char *fname, bool check_case, bool allow_wildcards,
const struct share_params *p);
BOOL (*lookup_name_from_8_3)(TALLOC_CTX *ctx,
bool (*lookup_name_from_8_3)(TALLOC_CTX *ctx,
const char *in,
char **out, /* talloced on the given context. */
const struct share_params *p);
BOOL (*name_to_8_3)(const char *in,
bool (*name_to_8_3)(const char *in,
char out[13],
BOOL cache83,
bool cache83,
int default_case,
const struct share_params *p);
};

View File

@ -192,7 +192,7 @@ NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
struct messaging_backend **presult);
struct ctdbd_connection *messaging_ctdbd_connection(void);
BOOL message_send_all(struct messaging_context *msg_ctx,
bool message_send_all(struct messaging_context *msg_ctx,
int msg_type,
const void *buf, size_t len,
int *n_sent);

View File

@ -61,7 +61,7 @@ struct dfs_path {
char *hostname;
char *servicename;
char *reqpath;
BOOL posix_path;
bool posix_path;
};
#define init_dfsroot(conn, inbuf, outbuf) \

View File

@ -271,14 +271,14 @@ struct work_record {
/* Announce info. */
time_t lastannounce_time;
int announce_interval;
BOOL needannounce;
bool needannounce;
/* Timeout time for this workgroup. 0 means permanent. */
time_t death_time;
/* Election info */
BOOL RunningElection;
BOOL needelection;
bool RunningElection;
bool needelection;
int ElectionCount;
uint32 ElectionCriterion;
@ -398,7 +398,7 @@ struct response_record {
int repeat_count;
/* Recursion protection. */
BOOL in_expiration_processing;
bool in_expiration_processing;
};
/* A subnet structure. It contains a list of workgroups and netbios names. */
@ -427,8 +427,8 @@ struct subnet_record {
struct name_record *namelist; /* List of netbios names. */
struct response_record *responselist; /* List of responses expected. */
BOOL namelist_changed;
BOOL work_changed;
bool namelist_changed;
bool work_changed;
struct in_addr bcast_ip;
struct in_addr mask_ip;
@ -460,13 +460,13 @@ struct nmb_packet {
struct {
int name_trn_id;
int opcode;
BOOL response;
bool response;
struct {
BOOL bcast;
BOOL recursion_available;
BOOL recursion_desired;
BOOL trunc;
BOOL authoritative;
bool bcast;
bool recursion_available;
bool recursion_desired;
bool trunc;
bool authoritative;
} nm_flags;
int rcode;
int qdcount;
@ -503,8 +503,8 @@ struct dgram_packet {
int msg_type;
struct {
enum node_type node_type;
BOOL first;
BOOL more;
bool first;
bool more;
} flags;
int dgm_id;
struct in_addr source_ip;
@ -525,7 +525,7 @@ struct packet_struct
{
struct packet_struct *next;
struct packet_struct *prev;
BOOL locked;
bool locked;
struct in_addr ip;
int port;
int fd;

View File

@ -365,7 +365,7 @@ typedef struct {
uint32 dblspool;
fstring ipaddr;
uint32 port;
BOOL enable_snmp;
bool enable_snmp;
uint32 snmp_index;
} NT_PORT_DATA_1;
@ -448,10 +448,10 @@ typedef struct {
/* that's the central struct */
typedef struct _Printer{
struct _Printer *prev, *next;
BOOL document_started;
BOOL page_started;
bool document_started;
bool page_started;
uint32 jobid; /* jobid in printing backend */
BOOL printer_type;
int printer_type;
TALLOC_CTX *ctx;
fstring servername;
fstring sharename;
@ -464,10 +464,10 @@ typedef struct _Printer{
uint32 printerlocal;
SPOOL_NOTIFY_OPTION *option;
POLICY_HND client_hnd;
BOOL client_connected;
bool client_connected;
uint32 change;
/* are we in a FindNextPrinterChangeNotify() call? */
BOOL fnpcn;
bool fnpcn;
} notify;
struct {
fstring machine;

View File

@ -30,7 +30,7 @@
/* the following rather strange looking definitions of NTSTATUS and WERROR
and there in order to catch common coding errors where different error types
are mixed up. This is especially important as we slowly convert Samba
from using BOOL for internal functions
from using bool for internal functions
*/
#if defined(HAVE_IMMEDIATE_STRUCTURES)

View File

@ -29,14 +29,14 @@
*/
typedef struct _prs_struct {
BOOL io; /* parsing in or out of data stream */
bool io; /* parsing in or out of data stream */
/*
* If the (incoming) data is big-endian. On output we are
* always little-endian.
*/
BOOL bigendian_data;
bool bigendian_data;
uint8 align; /* data alignment */
BOOL is_dynamic; /* Do we own this memory or not ? */
bool is_dynamic; /* Do we own this memory or not ? */
uint32 data_offset; /* Current working offset into data. */
uint32 buffer_size; /* Current allocated size of the buffer. */
uint32 grow_size; /* size requested via prs_grow() calls */
@ -147,8 +147,8 @@ struct dcinfo {
fstring remote_machine; /* Machine name we've authenticated. */
fstring domain;
BOOL challenge_sent;
BOOL authenticated;
bool challenge_sent;
bool authenticated;
};
typedef struct pipe_rpc_fns {
@ -251,31 +251,31 @@ typedef struct pipes_struct {
* Set to true when an RPC bind has been done on this pipe.
*/
BOOL pipe_bound;
bool pipe_bound;
/*
* Set to true when we should return fault PDU's for everything.
*/
BOOL fault_state;
bool fault_state;
/*
* Set to true when we should return fault PDU's for a bad handle.
*/
BOOL bad_handle_fault_state;
bool bad_handle_fault_state;
/*
* Set to true when the backend does not support a call.
*/
BOOL rng_fault_state;
bool rng_fault_state;
/*
* Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
*/
BOOL endian;
bool endian;
/*
* Struct to deal with multiple pdu inputs.
@ -303,7 +303,7 @@ typedef struct smb_np_struct {
int pnum;
connection_struct *conn;
uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
BOOL open; /* open connection */
bool open; /* open connection */
uint16 device_state;
uint16 priority;
fstring name;
@ -341,7 +341,7 @@ typedef struct smb_np_struct {
ssize_t (*namedpipe_transact)(void *np_state,
char *data, int len,
char *rdata, int rlen,
BOOL *pipe_outstanding);
bool *pipe_outstanding);
/* call to perform a write namedpipe operation
*/
@ -361,7 +361,7 @@ typedef struct smb_np_struct {
*/
ssize_t (*namedpipe_read)(void * np_state,
char *data, size_t max_len,
BOOL *pipe_outstanding);
bool *pipe_outstanding);
/* call to close a namedpipe.
* function is expected to perform all cleanups
@ -370,14 +370,14 @@ typedef struct smb_np_struct {
* returns True if cleanup was successful (not that
* we particularly care).
*/
BOOL (*namedpipe_close)(void * np_state);
bool (*namedpipe_close)(void * np_state);
} smb_np_struct;
struct api_struct {
const char *name;
uint8 opnum;
BOOL (*fn) (pipes_struct *);
bool (*fn) (pipes_struct *);
};
typedef struct {

View File

@ -83,8 +83,8 @@ typedef struct ntlmssp_state
enum server_types server_role;
uint32 expected_state;
BOOL unicode;
BOOL use_ntlmv2;
bool unicode;
bool use_ntlmv2;
char *user;
char *domain;
char *workstation;
@ -122,7 +122,7 @@ typedef struct ntlmssp_state
* @return Can the challenge be set to arbitary values?
*
*/
BOOL (*may_set_challenge)(const struct ntlmssp_state *ntlmssp_state);
bool (*may_set_challenge)(const struct ntlmssp_state *ntlmssp_state);
/**
* Callback to set the 'challenge' used for NTLM authentication.

View File

@ -83,7 +83,7 @@ typedef struct _SMB_NTQUOTA_LIST {
} SMB_NTQUOTA_LIST;
typedef struct _SMB_NTQUOTA_HANDLE {
BOOL valid;
bool valid;
SMB_NTQUOTA_LIST *quota_list;
SMB_NTQUOTA_LIST *tmp_list;
} SMB_NTQUOTA_HANDLE;

View File

@ -45,8 +45,8 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx);
* Return False if none is available
* Otherwise return True and store the callback result in *status
*/
BOOL packet_handler(struct packet_context *ctx,
BOOL (*full_req)(const struct data_blob *data,
bool packet_handler(struct packet_context *ctx,
bool (*full_req)(const struct data_blob *data,
size_t *length,
void *private_data),
NTSTATUS (*callback)(const struct data_blob *data,

View File

@ -221,9 +221,9 @@ struct pdb_search {
struct samr_displayentry *cache;
uint32 num_entries;
ssize_t cache_size;
BOOL search_ended;
bool search_ended;
void *private_data;
BOOL (*next_entry)(struct pdb_search *search,
bool (*next_entry)(struct pdb_search *search,
struct samr_displayentry *entry);
void (*search_end)(struct pdb_search *search);
};
@ -250,7 +250,7 @@ struct pdb_methods
{
const char *name; /* What name got this module */
NTSTATUS (*setsampwent)(struct pdb_methods *, BOOL update, uint32 acb_mask);
NTSTATUS (*setsampwent)(struct pdb_methods *, bool update, uint32 acb_mask);
void (*endsampwent)(struct pdb_methods *);
@ -275,7 +275,7 @@ struct pdb_methods
NTSTATUS (*rename_sam_account)(struct pdb_methods *, struct samu *oldname, const char *newname);
NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, BOOL success);
NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, bool success);
NTSTATUS (*getgrsid)(struct pdb_methods *methods, GROUP_MAP *map, DOM_SID sid);
@ -302,7 +302,7 @@ struct pdb_methods
NTSTATUS (*enum_group_mapping)(struct pdb_methods *methods,
const DOM_SID *sid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap, size_t *p_num_entries,
BOOL unix_only);
bool unix_only);
NTSTATUS (*enum_group_members)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
@ -379,35 +379,35 @@ struct pdb_methods
NTSTATUS (*get_seq_num)(struct pdb_methods *methods, time_t *seq_num);
BOOL (*search_users)(struct pdb_methods *methods,
bool (*search_users)(struct pdb_methods *methods,
struct pdb_search *search,
uint32 acct_flags);
BOOL (*search_groups)(struct pdb_methods *methods,
bool (*search_groups)(struct pdb_methods *methods,
struct pdb_search *search);
BOOL (*search_aliases)(struct pdb_methods *methods,
bool (*search_aliases)(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid);
BOOL (*uid_to_rid)(struct pdb_methods *methods, uid_t uid,
bool (*uid_to_rid)(struct pdb_methods *methods, uid_t uid,
uint32 *rid);
BOOL (*uid_to_sid)(struct pdb_methods *methods, uid_t uid,
bool (*uid_to_sid)(struct pdb_methods *methods, uid_t uid,
DOM_SID *sid);
BOOL (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
bool (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
DOM_SID *sid);
BOOL (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
bool (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
union unid_t *id, enum lsa_SidType *type);
BOOL (*rid_algorithm)(struct pdb_methods *methods);
BOOL (*new_rid)(struct pdb_methods *methods, uint32 *rid);
bool (*rid_algorithm)(struct pdb_methods *methods);
bool (*new_rid)(struct pdb_methods *methods, uint32 *rid);
BOOL (*get_trusteddom_pw)(struct pdb_methods *methods,
bool (*get_trusteddom_pw)(struct pdb_methods *methods,
const char *domain, char** pwd,
DOM_SID *sid, time_t *pass_last_set_time);
BOOL (*set_trusteddom_pw)(struct pdb_methods *methods,
bool (*set_trusteddom_pw)(struct pdb_methods *methods,
const char* domain, const char* pwd,
const DOM_SID *sid);
BOOL (*del_trusteddom_pw)(struct pdb_methods *methods,
bool (*del_trusteddom_pw)(struct pdb_methods *methods,
const char *domain);
NTSTATUS (*enum_trusteddoms)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx, uint32 *num_domains,

View File

@ -44,8 +44,8 @@ extern const struct poptOption popt_common_dynconfig[];
struct user_auth_info {
pstring username;
pstring password;
BOOL got_pass;
BOOL use_kerberos;
bool got_pass;
bool use_kerberos;
int signing_state;
};

View File

@ -34,8 +34,8 @@ struct printjob {
int status; /* the status of this job */
size_t size; /* the size of the job so far */
int page_count; /* then number of pages so far */
BOOL spooled; /* has it been sent to the spooler yet? */
BOOL smbjob; /* set if the job is a SMB job */
bool spooled; /* has it been sent to the spooler yet? */
bool smbjob; /* set if the job is a SMB job */
fstring filename; /* the filename used to spool the file */
fstring jobname; /* the job name given to us by the client */
fstring user; /* the user who started the job */

View File

@ -94,14 +94,9 @@ typedef struct {
uint32 attr;
} LUID_ATTR;
#ifndef _UPPER_BOOL
typedef int BOOL;
#define _UPPER_BOOL
#endif
typedef struct {
TALLOC_CTX *mem_ctx;
BOOL ext_ctx;
bool ext_ctx;
uint32 count;
uint32 control;
LUID_ATTR *set;

0
source3/include/rap.h Executable file → Normal file
View File

View File

@ -119,9 +119,9 @@ typedef struct {
/* functions for enumerating subkeys and values */
int (*fetch_subkeys)( const char *key, REGSUBKEY_CTR *subkeys);
int (*fetch_values) ( const char *key, REGVAL_CTR *val );
BOOL (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys );
BOOL (*store_values)( const char *key, REGVAL_CTR *val );
BOOL (*reg_access_check)( const char *keyname, uint32 requested,
bool (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys );
bool (*store_values)( const char *key, REGVAL_CTR *val );
bool (*reg_access_check)( const char *keyname, uint32 requested,
uint32 *granted,
const NT_USER_TOKEN *token );
WERROR (*get_secdesc)(TALLOC_CTX *mem_ctx, const char *key,

View File

@ -71,7 +71,7 @@ typedef struct regf_hbin {
prs_struct ps; /* data */
BOOL dirty; /* has this hbin block been modified? */
bool dirty; /* has this hbin block been modified? */
} REGF_HBIN;
/* ??? List -- list of key offsets and hashed names for consistency */

View File

@ -24,7 +24,7 @@
#define _RPC_MISC_H
#define SMB_RPC_INTERFACE_VERSION 1
#define PRS_POINTER_CAST BOOL (*)(const char*, prs_struct*, int, void*)
#define PRS_POINTER_CAST bool (*)(const char*, prs_struct*, int, void*)
enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3, UNI_STR_DBLTERMINATE = 4 };

0
source3/include/rpc_spoolss.h Executable file → Normal file
View File

View File

@ -46,8 +46,8 @@
#define SMB_PORTS "445 139"
#define Undefined (-1)
#define False (0)
#define True (1)
#define False false
#define True true
#define Auto (2)
#define Required (3)
@ -311,7 +311,7 @@ struct id_map {
#include "librpc/gen_ndr/svcctl.h"
struct lsa_dom_info {
BOOL valid;
bool valid;
DOM_SID sid;
const char *name;
int num_idxs;
@ -483,7 +483,7 @@ typedef struct files_struct {
struct timeval open_time;
uint32 access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */
uint32 share_access; /* NTCreateX share constants (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
BOOL pending_modtime_owner;
bool pending_modtime_owner;
struct timespec pending_modtime;
struct timespec last_write_time;
int oplock_type;
@ -495,17 +495,17 @@ typedef struct files_struct {
struct share_mode_entry *pending_break_messages;
int num_pending_break_messages;
BOOL can_lock;
BOOL can_read;
BOOL can_write;
BOOL print_file;
BOOL modified;
BOOL is_directory;
BOOL is_stat;
BOOL aio_write_behind;
BOOL lockdb_clean;
BOOL initial_delete_on_close; /* Only set at NTCreateX if file was created. */
BOOL posix_open;
bool can_lock;
bool can_read;
bool can_write;
bool print_file;
bool modified;
bool is_directory;
bool is_stat;
bool aio_write_behind;
bool lockdb_clean;
bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
bool posix_open;
char *fsp_name;
struct vfs_fsp_data *vfs_extension;
@ -538,8 +538,8 @@ typedef struct {
struct vuid_cache_entry {
uint16 vuid;
BOOL read_only;
BOOL admin_user;
bool read_only;
bool admin_user;
};
struct vuid_cache {
@ -549,7 +549,7 @@ struct vuid_cache {
typedef struct {
char *name;
BOOL is_wild;
bool is_wild;
} name_compare_entry;
struct trans_state {
@ -566,8 +566,8 @@ struct trans_state {
fstring name; /* for trans requests */
uint16 call; /* for trans2 and nttrans requests */
BOOL close_on_completion;
BOOL one_way;
bool close_on_completion;
bool one_way;
unsigned int setup_count;
uint16 *setup;
@ -610,14 +610,14 @@ typedef struct connection_struct {
TALLOC_CTX *mem_ctx; /* long-lived memory context for things hanging off this struct. */
unsigned cnum; /* an index passed over the wire */
struct share_params *params;
BOOL force_user;
BOOL force_group;
bool force_user;
bool force_group;
struct vuid_cache vuid_cache;
struct dptr_struct *dirptr;
BOOL printer;
BOOL ipc;
BOOL read_only; /* Attributes for the current user of the share. */
BOOL admin_user; /* Attributes for the current user of the share. */
bool printer;
bool ipc;
bool read_only; /* Attributes for the current user of the share. */
bool admin_user; /* Attributes for the current user of the share. */
char *dirpath;
char *connectpath;
char *origpath;
@ -642,13 +642,13 @@ typedef struct connection_struct {
time_t lastused;
time_t lastused_count;
BOOL used;
bool used;
int num_files_open;
unsigned int num_smb_operations; /* Count of smb operations on this tree. */
BOOL case_sensitive;
BOOL case_preserve;
BOOL short_case_preserve;
bool case_sensitive;
bool case_preserve;
bool short_case_preserve;
name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */
@ -720,7 +720,7 @@ struct server_info_struct {
uint32 type;
fstring comment;
fstring domain; /* used ONLY in ipc.c NOT namework.c */
BOOL server_added; /* used ONLY in ipc.c NOT namework.c */
bool server_added; /* used ONLY in ipc.c NOT namework.c */
};
/* used for network interfaces */
@ -795,9 +795,9 @@ struct share_mode_lock {
int num_share_modes;
struct share_mode_entry *share_modes;
UNIX_USER_TOKEN *delete_token;
BOOL delete_on_close;
BOOL fresh;
BOOL modified;
bool delete_on_close;
bool fresh;
bool modified;
struct db_record *record;
};
@ -810,7 +810,7 @@ struct locking_data {
union {
struct {
int num_share_mode_entries;
BOOL delete_on_close;
bool delete_on_close;
uint32 delete_token_size; /* Only valid if either of
the two previous fields
are True. */
@ -914,11 +914,11 @@ struct parm_struct {
parm_type type;
parm_class p_class;
void *ptr;
BOOL (*special)(int snum, const char *, char **);
bool (*special)(int snum, const char *, char **);
const struct enum_list *enum_list;
unsigned flags;
union {
BOOL bvalue;
bool bvalue;
int ivalue;
char *svalue;
char cvalue;
@ -1699,9 +1699,9 @@ enum smbd_capability {
typee is used to describe how to interact with the kernel */
struct kernel_oplocks {
files_struct * (*receive_message)(fd_set *fds);
BOOL (*set_oplock)(files_struct *fsp, int oplock_type);
bool (*set_oplock)(files_struct *fsp, int oplock_type);
void (*release_oplock)(files_struct *fsp);
BOOL (*msg_waiting)(fd_set *fds);
bool (*msg_waiting)(fd_set *fds);
int notification_fd;
};
@ -1734,8 +1734,8 @@ struct node_status_extra {
};
struct pwd_info {
BOOL null_pwd;
BOOL cleartext;
bool null_pwd;
bool cleartext;
fstring password;
};
@ -1760,7 +1760,7 @@ typedef struct user_struct {
const char *unix_homedir;
const char *logon_script;
BOOL guest;
bool guest;
/* following groups stuff added by ih */
/* This groups info is needed for when we become_user() for this uid */
@ -1861,15 +1861,15 @@ struct ip_service {
typedef struct smb_sign_info {
void (*sign_outgoing_message)(char *outbuf, struct smb_sign_info *si);
BOOL (*check_incoming_message)(const char *inbuf, struct smb_sign_info *si, BOOL must_be_ok);
bool (*check_incoming_message)(const char *inbuf, struct smb_sign_info *si, bool must_be_ok);
void (*free_signing_context)(struct smb_sign_info *si);
void *signing_context;
BOOL negotiated_smb_signing;
BOOL allow_smb_signing;
BOOL doing_signing;
BOOL mandatory_signing;
BOOL seen_valid; /* Have I ever seen a validly signed packet? */
bool negotiated_smb_signing;
bool allow_smb_signing;
bool doing_signing;
bool mandatory_signing;
bool seen_valid; /* Have I ever seen a validly signed packet? */
} smb_sign_info;
struct ea_struct {

View File

@ -114,7 +114,7 @@ struct ldap_SearchRequest {
enum ldap_deref deref;
uint32 timelimit;
uint32 sizelimit;
BOOL attributesonly;
bool attributesonly;
char *filter;
int num_attributes;
const char **attributes;
@ -162,7 +162,7 @@ struct ldap_DelRequest {
struct ldap_ModifyDNRequest {
const char *dn;
const char *newrdn;
BOOL deleteolddn;
bool deleteolddn;
const char *newsuperior;
};
@ -212,7 +212,7 @@ union ldap_Request {
struct ldap_Control {
const char *oid;
BOOL critical;
bool critical;
DATA_BLOB value;
};
@ -237,7 +237,7 @@ struct ldap_connection {
int next_msgid;
char *host;
uint16 port;
BOOL ldaps;
bool ldaps;
const char *auth_dn;
const char *simple_pw;

View File

@ -138,10 +138,10 @@ void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, con
void smbldap_make_mod(LDAP *ldap_struct, LDAPMessage *existing,
LDAPMod ***mods,
const char *attribute, const char *newval);
BOOL smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
bool smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
const char *attribute, char *value,
int max_len);
BOOL smbldap_get_single_pstring (LDAP * ldap_struct, LDAPMessage * entry,
bool smbldap_get_single_pstring (LDAP * ldap_struct, LDAPMessage * entry,
const char *attribute, pstring value);
char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry);
int smbldap_modify(struct smbldap_state *ldap_state,
@ -161,11 +161,11 @@ struct smbldap_state {
const char *uri;
/* credentials */
BOOL anonymous;
bool anonymous;
char *bind_dn;
char *bind_secret;
BOOL paged_results;
bool paged_results;
unsigned int num_failures;

View File

@ -764,8 +764,8 @@ struct profile_header {
extern struct profile_header *profile_h;
extern struct profile_stats *profile_p;
extern BOOL do_profile_flag;
extern BOOL do_profile_times;
extern bool do_profile_flag;
extern bool do_profile_times;
#ifdef WITH_PROFILE

View File

@ -22,11 +22,6 @@
#include "tdb.h"
#ifndef _BOOL
typedef int BOOL;
#define _BOOL
#endif
/* single node of a list returned by tdb_search_keys */
typedef struct keys_node
{
@ -41,11 +36,11 @@ struct tdb_wrap {
};
struct tdb_validation_status {
BOOL tdb_error;
BOOL bad_freelist;
BOOL bad_entry;
BOOL unknown_key;
BOOL success;
bool tdb_error;
bool bad_freelist;
bool bad_entry;
bool unknown_key;
bool success;
};
typedef int (*tdb_validate_data_func)(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *state);
@ -61,9 +56,9 @@ int tdb_read_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
unsigned int timeout);
void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval);
int32 tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
int tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32 value);
bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32 value);
int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32 v);
int tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value);
bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value);
int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA dbuf,
void *state);
int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags);
@ -78,7 +73,7 @@ TDB_DATA string_tdb_data(const char *string);
TDB_DATA string_term_tdb_data(const char *string);
int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf,
int flag);
BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
uint32 *oldval, uint32 change_val);
int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key,
unsigned int timeout);

View File

@ -72,6 +72,7 @@
/* Changed to version22 to add lchown operation -- jra */
/* Leave at 22 - not yet released. But change set_nt_acl to return an NTSTATUS. jra. */
/* Leave at 22 - not yet released. Add file_id_create operation. --metze */
/* Leave at 22 - not yet released. Change all BOOL parameters (int) to bool. jra. */
#define SMB_VFS_INTERFACE_VERSION 22
@ -237,11 +238,11 @@ struct vfs_ops {
int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user);
void (*disconnect)(struct vfs_handle_struct *handle);
SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels);
int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels);
int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf);
/* Directory operations */
@ -280,10 +281,10 @@ struct vfs_ops {
char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
int (*ntimes)(struct vfs_handle_struct *handle, const char *path, const struct timespec ts[2]);
int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset);
BOOL (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode);
int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int leasetype);
BOOL (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
bool (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
int (*readlink)(struct vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz);
int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);

View File

@ -26,7 +26,7 @@ static char *current_lang;
/* load a msg file into the tdb */
static BOOL load_msg(const char *msg_file)
static bool load_msg(const char *msg_file)
{
char **lines;
int num_lines, i;
@ -93,14 +93,14 @@ static const char *get_lang(void)
/* initialise the message translation subsystem. If the "lang" argument
is NULL then get the language from the normal environment variables */
BOOL lang_tdb_init(const char *lang)
bool lang_tdb_init(const char *lang)
{
char *path = NULL;
char *msg_path = NULL;
struct stat st;
static int initialised;
time_t loadtime;
BOOL result = False;
bool result = False;
/* we only want to init once per process, unless given
an override */

View File

@ -166,7 +166,7 @@ int account_policy_name_to_fieldnum(const char *name)
Get default value for account policy
*****************************************************************************/
BOOL account_policy_get_default(int account_policy, uint32 *val)
bool account_policy_get_default(int account_policy, uint32 *val)
{
int i;
for (i=0; account_policy_names[i].field; i++) {
@ -184,7 +184,7 @@ BOOL account_policy_get_default(int account_policy, uint32 *val)
Set default for a field if it is empty
*****************************************************************************/
static BOOL account_policy_set_default_on_empty(int account_policy)
static bool account_policy_set_default_on_empty(int account_policy)
{
uint32 value;
@ -201,7 +201,7 @@ static BOOL account_policy_set_default_on_empty(int account_policy)
Open the account policy tdb.
***`*************************************************************************/
BOOL init_account_policy(void)
bool init_account_policy(void)
{
const char *vstring = "INFO/version";
@ -262,7 +262,7 @@ BOOL init_account_policy(void)
Get an account policy (from tdb)
*****************************************************************************/
BOOL account_policy_get(int field, uint32 *value)
bool account_policy_get(int field, uint32 *value)
{
const char *name;
uint32 regval;
@ -299,7 +299,7 @@ BOOL account_policy_get(int field, uint32 *value)
Set an account policy (in tdb)
****************************************************************************/
BOOL account_policy_set(int field, uint32 value)
bool account_policy_set(int field, uint32 value)
{
const char *name;
@ -327,12 +327,12 @@ BOOL account_policy_set(int field, uint32 value)
Set an account policy in the cache
****************************************************************************/
BOOL cache_account_policy_set(int field, uint32 value)
bool cache_account_policy_set(int field, uint32 value)
{
const char *policy_name = NULL;
char *cache_key = NULL;
char *cache_value = NULL;
BOOL ret = False;
bool ret = False;
policy_name = decode_account_policy_name(field);
if (policy_name == NULL) {
@ -364,12 +364,12 @@ BOOL cache_account_policy_set(int field, uint32 value)
Get an account policy from the cache
*****************************************************************************/
BOOL cache_account_policy_get(int field, uint32 *value)
bool cache_account_policy_get(int field, uint32 *value)
{
const char *policy_name = NULL;
char *cache_key = NULL;
char *cache_value = NULL;
BOOL ret = False;
bool ret = False;
policy_name = decode_account_policy_name(field);
if (policy_name == NULL) {

View File

@ -24,7 +24,7 @@
/**************************************************************************
*************************************************************************/
static BOOL trim_tree_keypath( char *path, char **base, char **new_path )
static bool trim_tree_keypath( char *path, char **base, char **new_path )
{
char *p;
@ -191,11 +191,11 @@ static TREE_NODE* pathtree_find_child( TREE_NODE *node, char* key )
Add a new node into the tree given a key path and a blob of data
*************************************************************************/
BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p )
bool pathtree_add( SORTED_TREE *tree, const char *path, void *data_p )
{
char *str, *base, *path2;
TREE_NODE *current, *next;
BOOL ret = True;
bool ret = True;
DEBUG(8,("pathtree_add: Enter\n"));

View File

@ -72,7 +72,7 @@ static char *afs_encode_token(const char *cell, const DATA_BLOB ticket,
/* Create a ClearToken and an encrypted ticket. ClearToken has not yet the
* ViceId set, this should be set by the caller. */
static BOOL afs_createtoken(const char *username, const char *cell,
static bool afs_createtoken(const char *username, const char *cell,
DATA_BLOB *ticket, struct ClearToken *ct)
{
fstring clear_ticket;
@ -208,14 +208,14 @@ char *afs_createtoken_str(const char *username, const char *cell)
For the comments "Alice" is the User to be auth'ed, and "Bob" is the
AFS server. */
BOOL afs_login(connection_struct *conn)
bool afs_login(connection_struct *conn)
{
extern userdom_struct current_user_info;
extern struct current_user current_user;
DATA_BLOB ticket;
pstring afs_username;
char *cell;
BOOL result;
bool result;
char *ticket_str;
const DOM_SID *user_sid;
@ -268,7 +268,7 @@ BOOL afs_login(connection_struct *conn)
#else
BOOL afs_login(connection_struct *conn)
bool afs_login(connection_struct *conn)
{
return True;
}

View File

@ -48,7 +48,7 @@ struct ClearToken {
uint32 EndTimestamp;
};
static BOOL afs_decode_token(const char *string, char **cell,
static bool afs_decode_token(const char *string, char **cell,
DATA_BLOB *ticket, struct ClearToken *ct)
{
DATA_BLOB blob;
@ -151,7 +151,7 @@ static BOOL afs_decode_token(const char *string, char **cell,
to avoid.
*/
static BOOL afs_settoken(const char *cell,
static bool afs_settoken(const char *cell,
const struct ClearToken *ctok,
DATA_BLOB ticket)
{
@ -207,11 +207,11 @@ static BOOL afs_settoken(const char *cell,
return (ret == 0);
}
BOOL afs_settoken_str(const char *token_string)
bool afs_settoken_str(const char *token_string)
{
DATA_BLOB ticket;
struct ClearToken ct;
BOOL result;
bool result;
char *cell;
if (!afs_decode_token(token_string, &cell, &ticket, &ct))
@ -230,7 +230,7 @@ BOOL afs_settoken_str(const char *token_string)
#else
BOOL afs_settoken_str(const char *token_string)
bool afs_settoken_str(const char *token_string)
{
return False;
}

View File

@ -88,7 +88,7 @@ const char *audit_description_str(uint32 category)
return NULL;
}
BOOL get_audit_category_from_param(const char *param, uint32 *audit_category)
bool get_audit_category_from_param(const char *param, uint32 *audit_category)
{
*audit_category = Undefined;

View File

@ -99,7 +99,7 @@ int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src)
/****************************************************************************
set a bit in a bitmap
****************************************************************************/
BOOL bitmap_set(struct bitmap *bm, unsigned i)
bool bitmap_set(struct bitmap *bm, unsigned i)
{
if (i >= bm->n) {
DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n",
@ -113,7 +113,7 @@ BOOL bitmap_set(struct bitmap *bm, unsigned i)
/****************************************************************************
clear a bit in a bitmap
****************************************************************************/
BOOL bitmap_clear(struct bitmap *bm, unsigned i)
bool bitmap_clear(struct bitmap *bm, unsigned i)
{
if (i >= bm->n) {
DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n",
@ -127,7 +127,7 @@ BOOL bitmap_clear(struct bitmap *bm, unsigned i)
/****************************************************************************
query a bit in a bitmap
****************************************************************************/
BOOL bitmap_query(struct bitmap *bm, unsigned i)
bool bitmap_query(struct bitmap *bm, unsigned i)
{
if (i >= bm->n) return False;
if (bm->b[i/32] & (1<<(i%32))) {

View File

@ -46,7 +46,7 @@ char lp_failed_convert_char(void)
static smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS];
static BOOL conv_silent; /* Should we do a debug if the conversion fails ? */
static bool conv_silent; /* Should we do a debug if the conversion fails ? */
/**
* Return the name of a charset to give to iconv().
@ -128,7 +128,7 @@ void gfree_charcnv(void)
void init_iconv(void)
{
int c1, c2;
BOOL did_reload = False;
bool did_reload = False;
/* so that charset_name() works we need to get the UNIX<->UCS2 going
first */
@ -201,7 +201,7 @@ void init_iconv(void)
static size_t convert_string_internal(charset_t from, charset_t to,
void const *src, size_t srclen,
void *dest, size_t destlen, BOOL allow_bad_conv)
void *dest, size_t destlen, bool allow_bad_conv)
{
size_t i_len, o_len;
size_t retval;
@ -375,7 +375,7 @@ static size_t convert_string_internal(charset_t from, charset_t to,
size_t convert_string(charset_t from, charset_t to,
void const *src, size_t srclen,
void *dest, size_t destlen, BOOL allow_bad_conv)
void *dest, size_t destlen, bool allow_bad_conv)
{
/*
* NB. We deliberately don't do a strlen here if srclen == -1.
@ -523,7 +523,7 @@ size_t convert_string(charset_t from, charset_t to,
**/
size_t convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
void const *src, size_t srclen, void *dst, BOOL allow_bad_conv)
void const *src, size_t srclen, void *dst, bool allow_bad_conv)
{
size_t i_len, o_len, destlen = MAX(srclen, 512);
size_t retval;
@ -724,7 +724,7 @@ size_t convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
**/
size_t convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to,
void const *src, size_t srclen, void *dst,
BOOL allow_bad_conv)
bool allow_bad_conv)
{
void **dest = (void **)dst;
size_t dest_len;

View File

@ -19,7 +19,7 @@
#include "includes.h"
static struct db_context *connections_db_ctx(BOOL rw)
static struct db_context *connections_db_ctx(bool rw)
{
static struct db_context *db_ctx;
@ -120,7 +120,7 @@ int connections_forall(int (*fn)(struct db_record *rec,
return connections_traverse(conn_traverse_fn, (void *)&state);
}
BOOL connections_init(BOOL rw)
bool connections_init(bool rw)
{
return (connections_db_ctx(rw) != NULL);
}

View File

@ -155,7 +155,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx,
* Do we have a complete ctdb packet in the queue?
*/
static BOOL ctdb_req_complete(const struct data_blob *data,
static bool ctdb_req_complete(const struct data_blob *data,
size_t *length,
void *private_data)
{
@ -765,7 +765,7 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn,
/*
* see if a remote process exists
*/
BOOL ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn, pid_t pid)
bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn, pid_t pid)
{
NTSTATUS status;
TDB_DATA data;

View File

@ -79,15 +79,15 @@
XFILE *dbf = NULL;
pstring debugf = "";
BOOL debug_warn_unknown_class = True;
BOOL debug_auto_add_unknown_class = True;
BOOL AllowDebugChange = True;
bool debug_warn_unknown_class = True;
bool debug_auto_add_unknown_class = True;
bool AllowDebugChange = True;
/*
used to check if the user specified a
logfile on the command line
*/
BOOL override_logfile;
bool override_logfile;
/*
@ -95,11 +95,11 @@ BOOL override_logfile;
* system has been initialised.
*/
static int debug_all_class_hack = 1;
static BOOL debug_all_class_isset_hack = True;
static bool debug_all_class_isset_hack = True;
static int debug_num_classes = 0;
int *DEBUGLEVEL_CLASS = &debug_all_class_hack;
BOOL *DEBUGLEVEL_CLASS_ISSET = &debug_all_class_isset_hack;
bool *DEBUGLEVEL_CLASS_ISSET = &debug_all_class_isset_hack;
/* DEBUGLEVEL is #defined to *debug_level */
int DEBUGLEVEL = &debug_all_class_hack;
@ -132,14 +132,14 @@ int DEBUGLEVEL = &debug_all_class_hack;
* are unable to open a new log file for some reason.
*/
static BOOL stdout_logging = False;
static bool stdout_logging = False;
static int debug_count = 0;
#ifdef WITH_SYSLOG
static int syslog_level = 0;
#endif
static pstring format_bufr = { '\0' };
static size_t format_pos = 0;
static BOOL log_overflow = False;
static bool log_overflow = False;
/*
* Define all the debug class selection names here. Names *MUST NOT* contain
@ -211,7 +211,7 @@ static char *debug_list_class_names_and_levels(void)
char **list;
char *buf = NULL;
char *b;
BOOL err = False;
bool err = False;
if (DEBUGLEVEL_CLASS == &debug_all_class_hack) {
return NULL;
@ -334,10 +334,10 @@ int debug_add_class(const char *classname)
if (new_ptr == &debug_all_class_isset_hack) {
new_ptr = NULL;
}
new_ptr = SMB_REALLOC_ARRAY(new_ptr, BOOL, debug_num_classes + 1);
new_ptr = SMB_REALLOC_ARRAY(new_ptr, bool, debug_num_classes + 1);
if (!new_ptr)
return -1;
DEBUGLEVEL_CLASS_ISSET = (int *)new_ptr;
DEBUGLEVEL_CLASS_ISSET = (bool *)new_ptr;
DEBUGLEVEL_CLASS_ISSET[ndx] = False;
new_ptr = SMB_REALLOC_ARRAY(classname_table, char *, debug_num_classes + 1);
@ -403,7 +403,7 @@ static void debug_dump_status(int level)
printdrivers:7
****************************************************************************/
static BOOL debug_parse_params(char **params)
static bool debug_parse_params(char **params)
{
int i, ndx;
char *class_name;
@ -445,7 +445,7 @@ static BOOL debug_parse_params(char **params)
Note: the 1st param has no "name:" preceeding it.
****************************************************************************/
BOOL debug_parse_levels(const char *params_str)
bool debug_parse_levels(const char *params_str)
{
char **params;
@ -525,7 +525,7 @@ Init debugging (one time stuff)
void debug_init(void)
{
static BOOL initialised = False;
static bool initialised = False;
const char **p;
if (initialised)
@ -549,7 +549,7 @@ void debug_register_msgs(struct messaging_context *msg_ctx)
Get ready for syslog stuff
**************************************************************************/
void setup_logging(const char *pname, BOOL interactive)
void setup_logging(const char *pname, bool interactive)
{
debug_init();
@ -591,13 +591,13 @@ void setup_logging(const char *pname, BOOL interactive)
Fix from dgibson@linuxcare.com.
**************************************************************************/
BOOL reopen_logs( void )
bool reopen_logs( void )
{
pstring fname;
mode_t oldumask;
XFILE *new_dbf = NULL;
XFILE *old_dbf = NULL;
BOOL ret = True;
bool ret = True;
if (stdout_logging)
return True;
@ -662,7 +662,7 @@ void force_check_log_size( void )
Check to see if there is any need to check if the logfile has grown too big.
**************************************************************************/
BOOL need_to_check_log_size( void )
bool need_to_check_log_size( void )
{
int maxlog;
@ -864,7 +864,7 @@ static void bufr_print( void )
static void format_debug_text( const char *msg )
{
size_t i;
BOOL timestamp = (!stdout_logging && (lp_timestamp_logs() || !(lp_loaded())));
bool timestamp = (!stdout_logging && (lp_timestamp_logs() || !(lp_loaded())));
for( i = 0; msg[i]; i++ ) {
/* Indent two spaces at each new line. */
@ -931,7 +931,7 @@ void dbgflush( void )
****************************************************************************/
BOOL dbghdr(int level, int cls, const char *file, const char *func, int line)
bool dbghdr(int level, int cls, const char *file, const char *func, int line)
{
/* Ensure we don't lose any real errno value. */
int old_errno = errno;
@ -1015,7 +1015,7 @@ BOOL dbghdr(int level, int cls, const char *file, const char *func, int line)
***************************************************************************/
BOOL dbgtext( const char *format_str, ... )
bool dbgtext( const char *format_str, ... )
{
va_list ap;
pstring msgbuf;

View File

@ -28,7 +28,7 @@ int find_service(fstring service)
return -1;
}
BOOL conn_snum_used(int snum)
bool conn_snum_used(int snum)
{
return False;
}

View File

@ -188,14 +188,14 @@ void event_fd_set_not_readable(struct fd_event *fde)
* Return if there's something in the queue
*/
BOOL event_add_to_select_args(struct event_context *event_ctx,
bool event_add_to_select_args(struct event_context *event_ctx,
const struct timeval *now,
fd_set *read_fds, fd_set *write_fds,
struct timeval *timeout, int *maxfd)
{
struct fd_event *fde;
struct timeval diff;
BOOL ret = False;
bool ret = False;
for (fde = event_ctx->fd_events; fde; fde = fde->next) {
if (fde->flags & EVENT_FD_READ) {
@ -223,7 +223,7 @@ BOOL event_add_to_select_args(struct event_context *event_ctx,
return True;
}
BOOL events_pending(struct event_context *event_ctx)
bool events_pending(struct event_context *event_ctx)
{
struct fd_event *fde;
@ -238,10 +238,10 @@ BOOL events_pending(struct event_context *event_ctx)
return False;
}
BOOL run_events(struct event_context *event_ctx,
bool run_events(struct event_context *event_ctx,
int selrtn, fd_set *read_fds, fd_set *write_fds)
{
BOOL fired = False;
bool fired = False;
struct fd_event *fde, *next;
/* Run all events that are pending, not just one (as we

View File

@ -47,7 +47,7 @@ struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_S
/*
return True if two file_id structures are equal
*/
BOOL file_id_equal(const struct file_id *id1, const struct file_id *id2)
bool file_id_equal(const struct file_id *id1, const struct file_id *id2)
{
return id1->inode == id2->inode && id1->devid == id2->devid;
}

View File

@ -32,7 +32,7 @@
#define BLOB_TYPE_LEN 9
static TDB_CONTEXT *cache;
static BOOL cache_readonly;
static bool cache_readonly;
/**
* @file gencache.c
@ -50,7 +50,7 @@ static BOOL cache_readonly;
* false on failure
**/
BOOL gencache_init(void)
bool gencache_init(void)
{
char* cache_fname = NULL;
@ -87,7 +87,7 @@ BOOL gencache_init(void)
* false on failure during cache shutdown
**/
BOOL gencache_shutdown(void)
bool gencache_shutdown(void)
{
int ret;
/* tdb_close routine returns -1 on error */
@ -112,7 +112,7 @@ BOOL gencache_shutdown(void)
* @retval false on failure
**/
BOOL gencache_set(const char *keystr, const char *value, time_t timeout)
bool gencache_set(const char *keystr, const char *value, time_t timeout)
{
int ret;
TDB_DATA databuf;
@ -152,7 +152,7 @@ BOOL gencache_set(const char *keystr, const char *value, time_t timeout)
* @retval false in case of failure
**/
BOOL gencache_del(const char *keystr)
bool gencache_del(const char *keystr)
{
int ret;
@ -185,7 +185,7 @@ BOOL gencache_del(const char *keystr)
* @retval False for failure
**/
BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
bool gencache_get(const char *keystr, char **valstr, time_t *timeout)
{
TDB_DATA databuf;
time_t t;
@ -250,19 +250,19 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
*
* @param keystr string that represents a key of this entry
* @param blob DATA_BLOB that is filled with entry's blob
* @param expired pointer to a BOOL that indicates whether the entry is expired
* @param expired pointer to a bool that indicates whether the entry is expired
*
* @retval true when entry is successfuly fetched
* @retval False for failure
**/
BOOL gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, BOOL *expired)
bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired)
{
TDB_DATA databuf;
time_t t;
char *blob_type;
unsigned char *buf = NULL;
BOOL ret = False;
bool ret = False;
fstring valstr;
int buflen = 0, len = 0, blob_len = 0;
unsigned char *blob_buf = NULL;
@ -335,9 +335,9 @@ BOOL gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, BOOL *expired)
* @retval false on failure
**/
BOOL gencache_set_data_blob(const char *keystr, DATA_BLOB *blob, time_t timeout)
bool gencache_set_data_blob(const char *keystr, DATA_BLOB *blob, time_t timeout)
{
BOOL ret = False;
bool ret = False;
int tdb_ret;
TDB_DATA databuf;
char *valstr = NULL;

View File

@ -24,7 +24,7 @@
static unsigned char smb_arc4_state[258];
static uint32 counter;
static BOOL done_reseed = False;
static bool done_reseed = False;
static void (*reseed_callback)(int *newseed);
/****************************************************************
@ -86,7 +86,7 @@ static void do_filehash(const char *fname, unsigned char *the_hash)
above...
**************************************************************/
static int do_reseed(BOOL use_fd, int fd)
static int do_reseed(bool use_fd, int fd)
{
unsigned char seed_inbuf[40];
uint32 v1, v2; struct timeval tval; pid_t mypid;

View File

@ -116,7 +116,7 @@ NTSTATUS smb_register_charset(struct charset_functions *funcs)
static void lazy_initialize_iconv(void)
{
static BOOL initialized;
static bool initialized;
int i;
if (!initialized) {
@ -189,7 +189,7 @@ size_t smb_iconv(smb_iconv_t cd,
}
static BOOL is_utf16(const char *name)
static bool is_utf16(const char *name)
{
return strcasecmp(name, "UCS-2LE") == 0 ||
strcasecmp(name, "UTF-16LE") == 0;

View File

@ -144,7 +144,7 @@ static int traverse_fn(struct db_record *rec,
*
* @retval True for success.
**/
BOOL message_send_all(struct messaging_context *msg_ctx,
bool message_send_all(struct messaging_context *msg_ctx,
int msg_type,
const void *buf, size_t len,
int *n_sent)

View File

@ -26,7 +26,7 @@
/* Load a dynamic module. Only log a level 0 error if we are not checking
for the existence of a module (probling). */
static NTSTATUS do_smb_load_module(const char *module_name, BOOL is_probe)
static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
{
void *handle;
init_module_function *init;

View File

@ -55,7 +55,7 @@ struct max_n {
*/
static int ms_fnmatch_core(const smb_ucs2_t *p, const smb_ucs2_t *n,
struct max_n *max_n, const smb_ucs2_t *ldot,
BOOL is_case_sensitive)
bool is_case_sensitive)
{
smb_ucs2_t c;
int i;
@ -145,8 +145,8 @@ static int ms_fnmatch_core(const smb_ucs2_t *p, const smb_ucs2_t *n,
return -1;
}
int ms_fnmatch(const char *pattern, const char *string, BOOL translate_pattern,
BOOL is_case_sensitive)
int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern,
bool is_case_sensitive)
{
smb_ucs2_t *p = NULL;
smb_ucs2_t *s = NULL;

View File

@ -119,8 +119,8 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx)
return packet_fd_read(ctx);
}
BOOL packet_handler(struct packet_context *ctx,
BOOL (*full_req)(const struct data_blob *data,
bool packet_handler(struct packet_context *ctx,
bool (*full_req)(const struct data_blob *data,
size_t *length,
void *private_data),
NTSTATUS (*callback)(const struct data_blob *data,

View File

@ -34,8 +34,8 @@
*/
extern pstring user_socket_options;
extern BOOL AllowDebugChange;
extern BOOL override_logfile;
extern bool AllowDebugChange;
extern bool override_logfile;
struct user_auth_info cmdline_auth_info;
@ -57,7 +57,7 @@ static void set_logfile(poptContext con, const char * arg)
lp_set_logfile(logfile);
}
static BOOL PrintSambaVersionString;
static bool PrintSambaVersionString;
static void popt_common_callback(poptContext con,
enum poptCallbackReason reason,
@ -290,7 +290,7 @@ static void get_password_file(struct user_auth_info *a)
{
int fd = -1;
char *p;
BOOL close_it = False;
bool close_it = False;
pstring spec;
char pass[128];

View File

@ -37,7 +37,7 @@ typedef struct {
} PRIV_SID_LIST;
static BOOL get_privileges( const DOM_SID *sid, SE_PRIV *mask )
static bool get_privileges( const DOM_SID *sid, SE_PRIV *mask )
{
TDB_CONTEXT *tdb = get_account_pol_tdb();
fstring keystr;
@ -76,7 +76,7 @@ static BOOL get_privileges( const DOM_SID *sid, SE_PRIV *mask )
Store the privilege mask (set) for a given SID
****************************************************************************/
static BOOL set_privileges( const DOM_SID *sid, SE_PRIV *mask )
static bool set_privileges( const DOM_SID *sid, SE_PRIV *mask )
{
TDB_CONTEXT *tdb = get_account_pol_tdb();
fstring keystr;
@ -109,11 +109,11 @@ static BOOL set_privileges( const DOM_SID *sid, SE_PRIV *mask )
get a list of all privileges for all sids in the list
*********************************************************************/
BOOL get_privileges_for_sids(SE_PRIV *privileges, DOM_SID *slist, int scount)
bool get_privileges_for_sids(SE_PRIV *privileges, DOM_SID *slist, int scount)
{
SE_PRIV mask;
int i;
BOOL found = False;
bool found = False;
se_priv_copy( privileges, &se_priv_none );
@ -252,7 +252,7 @@ NTSTATUS privilege_enum_sids(const SE_PRIV *mask, TALLOC_CTX *mem_ctx,
Add privilege to sid
****************************************************************************/
BOOL grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
bool grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
{
SE_PRIV old_mask, new_mask;
@ -281,7 +281,7 @@ BOOL grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
Add a privilege based on its name
*********************************************************************/
BOOL grant_privilege_by_name(DOM_SID *sid, const char *name)
bool grant_privilege_by_name(DOM_SID *sid, const char *name)
{
SE_PRIV mask;
@ -298,7 +298,7 @@ BOOL grant_privilege_by_name(DOM_SID *sid, const char *name)
Remove privilege from sid
****************************************************************************/
BOOL revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
bool revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
{
SE_PRIV mask;
@ -324,7 +324,7 @@ BOOL revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
Revoke all privileges
*********************************************************************/
BOOL revoke_all_privileges( DOM_SID *sid )
bool revoke_all_privileges( DOM_SID *sid )
{
return revoke_privilege( sid, &se_priv_all );
}
@ -333,7 +333,7 @@ BOOL revoke_all_privileges( DOM_SID *sid )
Add a privilege based on its name
*********************************************************************/
BOOL revoke_privilege_by_name(DOM_SID *sid, const char *name)
bool revoke_privilege_by_name(DOM_SID *sid, const char *name)
{
SE_PRIV mask;
@ -439,7 +439,7 @@ NTSTATUS dup_luid_attr(TALLOC_CTX *mem_ctx, LUID_ATTR **new_la, LUID_ATTR *old_l
/*******************************************************************
*******************************************************************/
BOOL is_privileged_sid( const DOM_SID *sid )
bool is_privileged_sid( const DOM_SID *sid )
{
SE_PRIV mask;
@ -449,7 +449,7 @@ BOOL is_privileged_sid( const DOM_SID *sid )
/*******************************************************************
*******************************************************************/
BOOL grant_all_privileges( const DOM_SID *sid )
bool grant_all_privileges( const DOM_SID *sid )
{
SE_PRIV mask;

View File

@ -114,7 +114,7 @@ PRIVS privs[] = {
copy an SE_PRIV structure
****************************************************************************/
BOOL se_priv_copy( SE_PRIV *dst, const SE_PRIV *src )
bool se_priv_copy( SE_PRIV *dst, const SE_PRIV *src )
{
if ( !dst || !src )
return False;
@ -128,7 +128,7 @@ BOOL se_priv_copy( SE_PRIV *dst, const SE_PRIV *src )
put all privileges into a mask
****************************************************************************/
BOOL se_priv_put_all_privileges(SE_PRIV *mask)
bool se_priv_put_all_privileges(SE_PRIV *mask)
{
int i;
uint32 num_privs = count_all_privileges();
@ -186,7 +186,7 @@ static void se_priv_invert( SE_PRIV *new_mask, const SE_PRIV *mask )
check if 2 SE_PRIV structure are equal
****************************************************************************/
BOOL se_priv_equal( const SE_PRIV *mask1, const SE_PRIV *mask2 )
bool se_priv_equal( const SE_PRIV *mask1, const SE_PRIV *mask2 )
{
return ( memcmp(mask1, mask2, sizeof(SE_PRIV)) == 0 );
}
@ -195,7 +195,7 @@ BOOL se_priv_equal( const SE_PRIV *mask1, const SE_PRIV *mask2 )
check if a SE_PRIV has any assigned privileges
****************************************************************************/
static BOOL se_priv_empty( const SE_PRIV *mask )
static bool se_priv_empty( const SE_PRIV *mask )
{
SE_PRIV p1;
int i;
@ -213,7 +213,7 @@ static BOOL se_priv_empty( const SE_PRIV *mask )
Lookup the SE_PRIV value for a privilege name
*********************************************************************/
BOOL se_priv_from_name( const char *name, SE_PRIV *mask )
bool se_priv_from_name( const char *name, SE_PRIV *mask )
{
int i;
@ -248,7 +248,7 @@ void dump_se_priv( int dbg_cl, int dbg_lvl, const SE_PRIV *mask )
check if the privilege is in the privilege list
****************************************************************************/
BOOL is_privilege_assigned(const SE_PRIV *privileges,
bool is_privilege_assigned(const SE_PRIV *privileges,
const SE_PRIV *check)
{
SE_PRIV p1, p2;
@ -280,7 +280,7 @@ BOOL is_privilege_assigned(const SE_PRIV *privileges,
check if the privilege is in the privilege list
****************************************************************************/
static BOOL is_any_privilege_assigned( SE_PRIV *privileges, const SE_PRIV *check )
static bool is_any_privilege_assigned( SE_PRIV *privileges, const SE_PRIV *check )
{
SE_PRIV p1, p2;
@ -336,7 +336,7 @@ const char* get_privilege_dispname( const char *name )
at a time here.
*****************************************************************************/
BOOL user_has_privileges(const NT_USER_TOKEN *token, const SE_PRIV *privilege)
bool user_has_privileges(const NT_USER_TOKEN *token, const SE_PRIV *privilege)
{
if ( !token )
return False;
@ -349,7 +349,7 @@ BOOL user_has_privileges(const NT_USER_TOKEN *token, const SE_PRIV *privilege)
at a time here.
*****************************************************************************/
BOOL user_has_any_privilege(NT_USER_TOKEN *token, const SE_PRIV *privilege)
bool user_has_any_privilege(NT_USER_TOKEN *token, const SE_PRIV *privilege)
{
if ( !token )
return False;
@ -419,7 +419,7 @@ const char *luid_to_privilege_name(const LUID *set)
add a privilege to a privilege array
****************************************************************************/
static BOOL privilege_set_add(PRIVILEGE_SET *priv_set, LUID_ATTR set)
static bool privilege_set_add(PRIVILEGE_SET *priv_set, LUID_ATTR set)
{
LUID_ATTR *new_set;
@ -444,7 +444,7 @@ static BOOL privilege_set_add(PRIVILEGE_SET *priv_set, LUID_ATTR set)
/*******************************************************************
*******************************************************************/
BOOL se_priv_to_privilege_set( PRIVILEGE_SET *set, SE_PRIV *mask )
bool se_priv_to_privilege_set( PRIVILEGE_SET *set, SE_PRIV *mask )
{
int i;
uint32 num_privs = count_all_privileges();
@ -469,7 +469,7 @@ BOOL se_priv_to_privilege_set( PRIVILEGE_SET *set, SE_PRIV *mask )
/*******************************************************************
*******************************************************************/
static BOOL luid_to_se_priv( LUID *luid, SE_PRIV *mask )
static bool luid_to_se_priv( LUID *luid, SE_PRIV *mask )
{
int i;
uint32 num_privs = count_all_privileges();
@ -487,7 +487,7 @@ static BOOL luid_to_se_priv( LUID *luid, SE_PRIV *mask )
/*******************************************************************
*******************************************************************/
BOOL privilege_set_to_se_priv( SE_PRIV *mask, PRIVILEGE_SET *privset )
bool privilege_set_to_se_priv( SE_PRIV *mask, PRIVILEGE_SET *privset )
{
int i;

View File

@ -88,7 +88,7 @@ char *smb_readline(const char *prompt, void (*callback)(void),
char **(completion_fn)(const char *text, int start, int end))
{
char *ret;
BOOL interactive;
bool interactive;
interactive = isatty(x_fileno(x_stdin)) || getenv("CLI_FORCE_INTERACTIVE");
if (!interactive) {

View File

@ -26,7 +26,7 @@
Check if ACE has OBJECT type.
********************************************************************/
BOOL sec_ace_object(uint8 type)
bool sec_ace_object(uint8 type)
{
if (type == SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT ||
type == SEC_ACE_TYPE_ACCESS_DENIED_OBJECT ||
@ -146,7 +146,7 @@ NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32
Compares two SEC_ACE structures
********************************************************************/
BOOL sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2)
bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2)
{
/* Trivial case */
@ -279,7 +279,7 @@ void dacl_sort_into_canonical_order(SEC_ACE *srclist, unsigned int num_aces)
Check if this ACE has a SID in common with the token.
********************************************************************/
BOOL token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace)
bool token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace)
{
size_t i;

View File

@ -74,7 +74,7 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src)
Compares two SEC_ACL structures
********************************************************************/
BOOL sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2)
bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2)
{
unsigned int i, j;
@ -101,7 +101,7 @@ BOOL sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2)
each ACE in s2. */
for (i = 0; i < s1->num_aces; i++) {
BOOL found = False;
bool found = False;
for (j = 0; j < s2->num_aces; j++) {
if (sec_ace_equal(&s1->aces[i], &s2->aces[j])) {

View File

@ -64,7 +64,7 @@ size_t sec_desc_size(SEC_DESC *psd)
Compares two SEC_DESC structures
********************************************************************/
BOOL sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
{
/* Trivial case */
@ -464,7 +464,7 @@ NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t
non-container object. */
SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
BOOL child_container)
bool child_container)
{
SEC_DESC_BUF *sdb;
SEC_DESC *sd;
@ -490,7 +490,7 @@ SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
SEC_ACE *ace = &the_acl->aces[i];
SEC_ACE *new_ace = &new_ace_list[new_ace_list_ndx];
uint8 new_flags = 0;
BOOL inherit = False;
bool inherit = False;
fstring sid_str;
/* The OBJECT_INHERIT_ACE flag causes the ACE to be

View File

@ -30,7 +30,7 @@
static char *mutex_server_name;
BOOL grab_server_mutex(const char *name)
bool grab_server_mutex(const char *name)
{
mutex_server_name = SMB_STRDUP(name);
if (!mutex_server_name) {

View File

@ -37,7 +37,7 @@ static const struct generic_mapping file_generic_mapping = {
};
BOOL share_info_db_init(void)
bool share_info_db_init(void)
{
const char *vstring = "INFO/version";
int32 vers_id;
@ -151,11 +151,11 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
Store a security descriptor in the share db.
********************************************************************/
BOOL set_share_security(const char *share_name, SEC_DESC *psd)
bool set_share_security(const char *share_name, SEC_DESC *psd)
{
TALLOC_CTX *frame;
char *key;
BOOL ret = False;
bool ret = False;
TDB_DATA blob;
NTSTATUS status;
@ -197,7 +197,7 @@ BOOL set_share_security(const char *share_name, SEC_DESC *psd)
Delete a security descriptor.
********************************************************************/
BOOL delete_share_security(const char *servicename)
bool delete_share_security(const char *servicename)
{
TDB_DATA kbuf;
char *key;
@ -221,7 +221,7 @@ BOOL delete_share_security(const char *servicename)
Can this user access with share with the required permissions ?
********************************************************************/
BOOL share_access_check(const NT_USER_TOKEN *token, const char *sharename,
bool share_access_check(const NT_USER_TOKEN *token, const char *sharename,
uint32 desired_access)
{
uint32 granted;
@ -229,7 +229,7 @@ BOOL share_access_check(const NT_USER_TOKEN *token, const char *sharename,
TALLOC_CTX *mem_ctx = NULL;
SEC_DESC *psd = NULL;
size_t sd_size;
BOOL ret = True;
bool ret = True;
if (!(mem_ctx = talloc_init("share_access_check"))) {
return False;
@ -252,7 +252,7 @@ BOOL share_access_check(const NT_USER_TOKEN *token, const char *sharename,
Parse the contents of an acl string from a usershare file.
***************************************************************************/
BOOL parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, SEC_DESC **ppsd)
bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, SEC_DESC **ppsd)
{
size_t s_size = 0;
const char *pacl = acl_str;

View File

@ -63,7 +63,7 @@ static void sig_cld_leave_status(int signum)
Block sigs.
********************************************************************/
void BlockSignals(BOOL block,int signum)
void BlockSignals(bool block,int signum)
{
#ifdef HAVE_SIGPROCMASK
sigset_t set;

View File

@ -261,7 +261,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
Search an attribute and return the first value found.
******************************************************************/
BOOL smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
bool smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
const char *attribute, char *value,
int max_len)
{
@ -292,7 +292,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
return True;
}
BOOL smbldap_get_single_pstring (LDAP * ldap_struct, LDAPMessage * entry,
bool smbldap_get_single_pstring (LDAP * ldap_struct, LDAPMessage * entry,
const char *attribute, pstring value)
{
return smbldap_get_single_attribute(ldap_struct, entry,
@ -472,7 +472,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
const char *attribute, const char *newval)
{
char oldval[2048]; /* current largest allowed value is mungeddial */
BOOL existed;
bool existed;
if (attribute == NULL) {
/* This can actually happen for ldapsam_compat where we for
@ -1005,7 +1005,7 @@ static void smbldap_idle_fn(struct event_context *event_ctx,
static int smbldap_open(struct smbldap_state *ldap_state)
{
int rc, opt_rc;
BOOL reopen = False;
bool reopen = False;
SMB_ASSERT(ldap_state);
#ifndef NO_LDAP_SECURITY
@ -1097,7 +1097,7 @@ static NTSTATUS smbldap_close(struct smbldap_state *ldap_state)
return NT_STATUS_OK;
}
static BOOL got_alarm;
static bool got_alarm;
static void (*old_handler)(int);
@ -1294,7 +1294,7 @@ int smbldap_search_paged(struct smbldap_state *ldap_state,
BerElement *cookie_be = NULL;
struct berval *cookie_bv = NULL;
int tmp = 0, i, rc;
BOOL critical = True;
bool critical = True;
*res = NULL;
@ -1675,13 +1675,13 @@ char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry)
Check if root-dse has a certain Control or Extension
********************************************************************/
static BOOL smbldap_check_root_dse(LDAP *ld, const char **attrs, const char *value)
static bool smbldap_check_root_dse(LDAP *ld, const char **attrs, const char *value)
{
LDAPMessage *msg = NULL;
LDAPMessage *entry = NULL;
char **values = NULL;
int rc, num_result, num_values, i;
BOOL result = False;
bool result = False;
if (!attrs[0]) {
DEBUG(3,("smbldap_check_root_dse: nothing to look for\n"));
@ -1751,7 +1751,7 @@ static BOOL smbldap_check_root_dse(LDAP *ld, const char **attrs, const char *val
Check if LDAP-Server supports a certain Control (OID in string format)
********************************************************************/
BOOL smbldap_has_control(LDAP *ld, const char *control)
bool smbldap_has_control(LDAP *ld, const char *control)
{
const char *attrs[] = { "supportedControl", NULL };
return smbldap_check_root_dse(ld, attrs, control);
@ -1761,7 +1761,7 @@ BOOL smbldap_has_control(LDAP *ld, const char *control)
Check if LDAP-Server supports a certain Extension (OID in string format)
********************************************************************/
BOOL smbldap_has_extension(LDAP *ld, const char *extension)
bool smbldap_has_extension(LDAP *ld, const char *extension)
{
const char *attrs[] = { "supportedExtension", NULL };
return smbldap_check_root_dse(ld, attrs, extension);
@ -1771,13 +1771,13 @@ BOOL smbldap_has_extension(LDAP *ld, const char *extension)
Check if LDAP-Server holds a given namingContext
********************************************************************/
BOOL smbldap_has_naming_context(LDAP *ld, const char *naming_context)
bool smbldap_has_naming_context(LDAP *ld, const char *naming_context)
{
const char *attrs[] = { "namingContexts", NULL };
return smbldap_check_root_dse(ld, attrs, naming_context);
}
BOOL smbldap_set_creds(struct smbldap_state *ldap_state, BOOL anon, const char *dn, const char *secret)
bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret)
{
ldap_state->anonymous = anon;

View File

@ -230,7 +230,7 @@ Search for the domain info entry
NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
LDAPMessage ** result, const char *domain_name,
BOOL try_add)
bool try_add)
{
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
pstring filter;

View File

@ -64,7 +64,7 @@ run a command being careful about uid/gid handling and putting the output in
outfd (or discard it if outfd is NULL).
****************************************************************************/
static int smbrun_internal(const char *cmd, int *outfd, BOOL sanitize)
static int smbrun_internal(const char *cmd, int *outfd, bool sanitize)
{
pid_t pid;
uid_t uid = current_user.ut.uid;

View File

@ -37,9 +37,9 @@ static fstring smb_user_name;
* @param if this is the 'final' name for us, not be be changed again
*/
void set_local_machine_name(const char* local_name, BOOL perm)
void set_local_machine_name(const char* local_name, bool perm)
{
static BOOL already_perm = False;
static bool already_perm = False;
fstring tmp_local_machine;
fstrcpy(tmp_local_machine,local_name);
@ -70,9 +70,9 @@ void set_local_machine_name(const char* local_name, BOOL perm)
* @param if this is the 'final' name for them, not be be changed again
*/
void set_remote_machine_name(const char* remote_name, BOOL perm)
void set_remote_machine_name(const char* remote_name, bool perm)
{
static BOOL already_perm = False;
static bool already_perm = False;
fstring tmp_remote_machine;
if (already_perm)
@ -108,7 +108,7 @@ void sub_set_smb_name(const char *name)
{
fstring tmp;
int len;
BOOL is_machine_account = False;
bool is_machine_account = False;
/* don't let anonymous logins override the name */
if (! *name)

View File

@ -402,7 +402,7 @@ int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
{
int ret = -1;
int i;
BOOL ready = False;
bool ready = False;
char *mntpath = NULL;
char *bdev = NULL;
char *fs = NULL;
@ -467,7 +467,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
{
int ret = -1;
int i;
BOOL ready = False;
bool ready = False;
char *mntpath = NULL;
char *bdev = NULL;
char *fs = NULL;

View File

@ -711,8 +711,8 @@ int sys_chroot(const char *dname)
* from the inheritable set, because there is no circumstance in which our
* children should inherit our elevated privileges.
*/
static BOOL set_process_capability(enum smbd_capability capability,
BOOL enable)
static bool set_process_capability(enum smbd_capability capability,
bool enable)
{
cap_value_t cap_vals[2] = {0};
int num_cap_vals = 0;

View File

@ -117,7 +117,7 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups,
static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt)
{
int retval;
BOOL winbind_env;
bool winbind_env;
DEBUG(10,("sys_getgrouplist: user [%s]\n", user));
@ -143,7 +143,7 @@ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grp
return retval;
}
BOOL getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
gid_t primary_gid,
gid_t **ret_groups, size_t *p_ngroups)
{

Some files were not shown because too many files have changed in this diff Show More