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;
}
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,
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);
}
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);
}
}
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,
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);
}
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);
}
* 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
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) {
#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
DATA_BLOB lm_pwd,
DATA_BLOB nt_pwd,
DATA_BLOB plaintext_password,
- BOOL encrypted)
+ bool encrypted)
{
NTSTATUS nt_status;
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) {
/*
#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.
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;
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
*
* @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;
(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 */
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;
return NT_STATUS_NO_MEMORY;
if (*workstation_list) {
- BOOL invalid_ws = True;
+ bool invalid_ws = True;
fstring tok;
const char *s = workstation_list;
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;
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;
struct in_addr dest_ip;
const char *p;
char *pserver;
- BOOL connected_ok = False;
+ bool connected_ok = False;
if (!(cli = cli_initialise()))
return NULL;
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(
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;
*
* 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;
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));
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);
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,
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);
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,
ZERO_STRUCT(key);
{
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
DATA_BLOB local_lm_blob;
DATA_BLOB local_nt_blob;
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],
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;
*/
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)
}
if (sid_check_is_in_our_domain(&user_sid)) {
- BOOL ret;
+ bool ret;
/* This is a passdb user, so ask passdb */
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;
}
-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) {
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 )) ) {
static auth_serversupplied_info *guest_info = NULL;
-BOOL init_guest_info(void)
+bool init_guest_info(void)
{
if (guest_info != NULL)
return True;
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;
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;
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;
****************************************************************************/
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;
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;
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 "
* 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 */
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) {
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)
{
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));
* 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;
* 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;
/*
* 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;
* 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;
* 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;
* 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;
* 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;
}
/* 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;
}
/*******************************************************************
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;
/*******************************************************************
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;
return smb_pam_passcheck(this_user, password);
#else
- BOOL ret;
+ bool ret;
#ifdef WITH_AFS
if (afs_auth(this_user, password))
****************************************************************************/
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();
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;
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;
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) ) {
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)
{
#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 = "";
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;
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 = "";
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);
}
}
-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;
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;
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;
Make a directory of name "name".
****************************************************************************/
-static BOOL do_mkdir(char *name)
+static bool do_mkdir(char *name)
{
struct cli_state *targetcli;
pstring targetname;
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))) {
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;
static struct file_list {
struct file_list *prev, *next;
char *file_path;
- BOOL isdir;
+ bool isdir;
} *file_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");
****************************************************************************/
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);
static int cmd_newer(void)
{
pstring buf;
- BOOL ok;
+ bool ok;
SMB_STRUCT_STAT sbuf;
ok = next_token_nr(NULL,buf,NULL,sizeof(buf));
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 ?
}
}
-static BOOL browse_host_rpc(BOOL sort)
+static bool browse_host_rpc(bool sort)
{
NTSTATUS status;
struct rpc_pipe_client *pipe_hnd;
Try and browse available connections on a host.
****************************************************************************/
-static BOOL browse_host(BOOL sort)
+static bool browse_host(bool sort)
{
int ret;
if (!grepable) {
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;
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
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;
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
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 */
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;
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));
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!
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));
#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;
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;
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 = "";
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);
}
}
-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;
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;
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;
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;
Make a directory of name "name".
****************************************************************************/
-static BOOL do_mkdir(char *name)
+static bool do_mkdir(char *name)
{
if (smbc_mkdir(name, 755) < 0)
{
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))) {
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;
static struct file_list {
struct file_list *prev, *next;
char *file_path;
- BOOL isdir;
+ bool isdir;
} *file_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");
****************************************************************************/
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);
static int cmd_newer(void)
{
pstring buf;
- BOOL ok;
+ bool ok;
SMB_STRUCT_STAT sbuf;
ok = next_token_nr(NULL,buf,NULL,sizeof(buf));
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 ?
Try and browse available connections on a host.
****************************************************************************/
-static BOOL browse_host(BOOL sort)
+static bool browse_host(bool sort)
{
int ret;
if (!grepable) {
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;
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;
#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;
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);
{
int fd = -1;
char *p;
- BOOL close_it = False;
+ bool close_it = False;
pstring spec;
char pass[128];
* Globals...
*/
-extern BOOL in_client; /* Boolean for client library */
+extern bool in_client; /* Boolean for client library */
/*
/*
initialise a group mapping backend
*/
-static BOOL init_group_mapping(void)
+static bool init_group_mapping(void)
{
if (backend != NULL) {
/* already initialised */
/* 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"));
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"));
enum lsa_SidType type;
uint32 new_rid;
gid_t gid;
- BOOL exists;
+ bool exists;
GROUP_MAP map;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
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;
}
/****************************************************************************
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);
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;
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);
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" \
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
/*
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;
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;
/****************************************************************************
****************************************************************************/
-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;
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;
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;
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;
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;
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;
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;
NTSTATUS result;
DOM_SID *sids;
size_t i, num;
- BOOL found = False;
+ bool found = False;
char *member_string;
TDB_DATA dbuf;
pstring key;
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);
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);
#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 {
/* 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 */
size_t length;
off_t ofs;
struct nesting *nesting;
- BOOL has_error;
+ bool has_error;
} ASN1_DATA;
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 */
} 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. */
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;
/* 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 */
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;
/* 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 {
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,
/* 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
#endif
extern int *DEBUGLEVEL_CLASS;
-extern BOOL *DEBUGLEVEL_CLASS_ISSET;
+extern bool *DEBUGLEVEL_CLASS_ISSET;
/* Debugging macros
*
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;
};
#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
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,
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,
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 */
uint32 type;
/*if the name or RID was looked up, then found = True*/
- BOOL found;
+ bool found;
} CacLookupRidsRecord;
typedef struct _CACUSERINFO {
uint16 logon_count;
/**Change password at next logon?*/
- BOOL pass_must_change;
+ bool pass_must_change;
/**Username*/
char *username;
* @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.
uint32 access;
/**Use security quality of service? (True/False)*/
- BOOL security_qos;
+ bool security_qos;
} in;
/**Outputs*/
char *name;
/**delete recursively. WARNING: this might not always work as planned*/
- BOOL recursive;
+ bool recursive;
} in;
};
uint32 timeout;
/**False = shutdown, True = reboot*/
- BOOL reboot;
+ bool reboot;
/**force the*/
- BOOL force;
+ bool force;
/*FIXME: make this useful*/
uint32 reason;
/**Array storing the names of all the users returned*/
char **names;
- BOOL done;
+ bool done;
} out;
};
/**Array storing the descriptions of all the groups returned*/
char **descriptions;
- BOOL done;
+ bool done;
} out;
};
/**Array storing the descriptions of all the groups returned*/
char **descriptions;
- BOOL done;
+ bool done;
} out;
};
/**Internal value. Do not modify.*/
uint32 loop_count;
- BOOL done;
+ bool done;
} out;
};
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);
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;
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;
/*
* Is this handle initialized ?
*/
- BOOL _initialized;
+ bool _initialized;
/* dirent pointer location
*
/*
* 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
* 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
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;
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);
};
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);
char *hostname;
char *servicename;
char *reqpath;
- BOOL posix_path;
+ bool posix_path;
};
#define init_dfsroot(conn, inbuf, outbuf) \
/* 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;
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. */
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;
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;
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;
{
struct packet_struct *next;
struct packet_struct *prev;
- BOOL locked;
+ bool locked;
struct in_addr ip;
int port;
int fd;
uint32 dblspool;
fstring ipaddr;
uint32 port;
- BOOL enable_snmp;
+ bool enable_snmp;
uint32 snmp_index;
} NT_PORT_DATA_1;
/* 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;
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;
/* 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)
*/
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 */
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 {
* 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.
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;
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
*/
*/
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
* 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 {
enum server_types server_role;
uint32 expected_state;
- BOOL unicode;
- BOOL use_ntlmv2;
+ bool unicode;
+ bool use_ntlmv2;
char *user;
char *domain;
char *workstation;
* @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.
} 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;
* 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,
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);
};
{
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 *);
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);
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,
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,
struct user_auth_info {
pstring username;
pstring password;
- BOOL got_pass;
- BOOL use_kerberos;
+ bool got_pass;
+ bool use_kerberos;
int signing_state;
};
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 */
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;
/* 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,
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 */
#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 };
#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)
#include "librpc/gen_ndr/svcctl.h"
struct lsa_dom_info {
- BOOL valid;
+ bool valid;
DOM_SID sid;
const char *name;
int num_idxs;
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;
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;
struct vuid_cache_entry {
uint16 vuid;
- BOOL read_only;
- BOOL admin_user;
+ bool read_only;
+ bool admin_user;
};
struct vuid_cache {
typedef struct {
char *name;
- BOOL is_wild;
+ bool is_wild;
} name_compare_entry;
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;
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;
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). */
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 */
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;
};
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. */
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;
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;
};
};
struct pwd_info {
- BOOL null_pwd;
- BOOL cleartext;
+ bool null_pwd;
+ bool cleartext;
fstring password;
};
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 */
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 {
enum ldap_deref deref;
uint32 timelimit;
uint32 sizelimit;
- BOOL attributesonly;
+ bool attributesonly;
char *filter;
int num_attributes;
const char **attributes;
struct ldap_ModifyDNRequest {
const char *dn;
const char *newrdn;
- BOOL deleteolddn;
+ bool deleteolddn;
const char *newsuperior;
};
struct ldap_Control {
const char *oid;
- BOOL critical;
+ bool critical;
DATA_BLOB value;
};
int next_msgid;
char *host;
uint16 port;
- BOOL ldaps;
+ bool ldaps;
const char *auth_dn;
const char *simple_pw;
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,
const char *uri;
/* credentials */
- BOOL anonymous;
+ bool anonymous;
char *bind_dn;
char *bind_secret;
- BOOL paged_results;
+ bool paged_results;
unsigned int num_failures;
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
#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
{
};
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);
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);
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);
/* 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
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 */
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);
/* 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;
/* 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 */
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++) {
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;
Open the account policy tdb.
***`*************************************************************************/
-BOOL init_account_policy(void)
+bool init_account_policy(void)
{
const char *vstring = "INFO/version";
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;
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;
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) {
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) {
/**************************************************************************
*************************************************************************/
-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;
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"));
/* 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;
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;
#else
-BOOL afs_login(connection_struct *conn)
+bool afs_login(connection_struct *conn)
{
return True;
}
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;
to avoid.
*/
-static BOOL afs_settoken(const char *cell,
+static bool afs_settoken(const char *cell,
const struct ClearToken *ctok,
DATA_BLOB ticket)
{
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))
#else
-BOOL afs_settoken_str(const char *token_string)
+bool afs_settoken_str(const char *token_string)
{
return False;
}
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;
/****************************************************************************
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",
/****************************************************************************
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",
/****************************************************************************
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))) {
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().
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 */
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;
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.
**/
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;
**/
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;
#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;
return connections_traverse(conn_traverse_fn, (void *)&state);
}
-BOOL connections_init(BOOL rw)
+bool connections_init(bool rw)
{
return (connections_db_ctx(rw) != NULL);
}
* 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)
{
/*
* 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;
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;
/*
* 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;
* 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
char **list;
char *buf = NULL;
char *b;
- BOOL err = False;
+ bool err = False;
if (DEBUGLEVEL_CLASS == &debug_all_class_hack) {
return NULL;
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);
printdrivers:7
****************************************************************************/
-static BOOL debug_parse_params(char **params)
+static bool debug_parse_params(char **params)
{
int i, ndx;
char *class_name;
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;
void debug_init(void)
{
- static BOOL initialised = False;
+ static bool initialised = False;
const char **p;
if (initialised)
Get ready for syslog stuff
**************************************************************************/
-void setup_logging(const char *pname, BOOL interactive)
+void setup_logging(const char *pname, bool interactive)
{
debug_init();
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;
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;
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. */
****************************************************************************/
-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;
***************************************************************************/
- BOOL dbgtext( const char *format_str, ... )
+ bool dbgtext( const char *format_str, ... )
{
va_list ap;
pstring msgbuf;
return -1;
}
-BOOL conn_snum_used(int snum)
+bool conn_snum_used(int snum)
{
return False;
}
* 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) {
return True;
}
-BOOL events_pending(struct event_context *event_ctx)
+bool events_pending(struct event_context *event_ctx)
{
struct fd_event *fde;
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
/*
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;
}
#define BLOB_TYPE_LEN 9
static TDB_CONTEXT *cache;
-static BOOL cache_readonly;
+static bool cache_readonly;
/**
* @file gencache.c
* false on failure
**/
-BOOL gencache_init(void)
+bool gencache_init(void)
{
char* cache_fname = NULL;
* false on failure during cache shutdown
**/
-BOOL gencache_shutdown(void)
+bool gencache_shutdown(void)
{
int ret;
/* tdb_close routine returns -1 on error */
* @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;
* @retval false in case of failure
**/
-BOOL gencache_del(const char *keystr)
+bool gencache_del(const char *keystr)
{
int ret;
* @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;
*
* @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;
* @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;
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);
/****************************************************************
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;
static void lazy_initialize_iconv(void)
{
- static BOOL initialized;
+ static bool initialized;
int i;
if (!initialized) {
}
-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;
*
* @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)
/* 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;
*/
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;
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;
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,
*/
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;
lp_set_logfile(logfile);
}
-static BOOL PrintSambaVersionString;
+static bool PrintSambaVersionString;
static void popt_common_callback(poptContext con,
enum poptCallbackReason reason,
{
int fd = -1;
char *p;
- BOOL close_it = False;
+ bool close_it = False;
pstring spec;
char pass[128];
} 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;
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;
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 );
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;
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;
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;
Revoke all privileges
*********************************************************************/
-BOOL revoke_all_privileges( DOM_SID *sid )
+bool revoke_all_privileges( DOM_SID *sid )
{
return revoke_privilege( sid, &se_priv_all );
}
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;
/*******************************************************************
*******************************************************************/
-BOOL is_privileged_sid( const DOM_SID *sid )
+bool is_privileged_sid( const DOM_SID *sid )
{
SE_PRIV mask;
/*******************************************************************
*******************************************************************/
-BOOL grant_all_privileges( const DOM_SID *sid )
+bool grant_all_privileges( const DOM_SID *sid )
{
SE_PRIV mask;
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;
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();
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 );
}
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;
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;
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;
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;
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;
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;
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;
/*******************************************************************
*******************************************************************/
-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();
/*******************************************************************
*******************************************************************/
-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();
/*******************************************************************
*******************************************************************/
-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;
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) {
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 ||
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 */
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;
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;
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])) {
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 */
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;
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
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) {
};
-BOOL share_info_db_init(void)
+bool share_info_db_init(void)
{
const char *vstring = "INFO/version";
int32 vers_id;
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;
Delete a security descriptor.
********************************************************************/
-BOOL delete_share_security(const char *servicename)
+bool delete_share_security(const char *servicename)
{
TDB_DATA kbuf;
char *key;
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;
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;
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;
Block sigs.
********************************************************************/
-void BlockSignals(BOOL block,int signum)
+void BlockSignals(bool block,int signum)
{
#ifdef HAVE_SIGPROCMASK
sigset_t set;
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)
{
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,
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
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
return NT_STATUS_OK;
}
-static BOOL got_alarm;
+static bool got_alarm;
static void (*old_handler)(int);
BerElement *cookie_be = NULL;
struct berval *cookie_bv = NULL;
int tmp = 0, i, rc;
- BOOL critical = True;
+ bool critical = True;
*res = NULL;
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"));
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);
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);
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;
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;
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;
* @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);
* @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)
{
fstring tmp;
int len;
- BOOL is_machine_account = False;
+ bool is_machine_account = False;
/* don't let anonymous logins override the name */
if (! *name)
{
int ret = -1;
int i;
- BOOL ready = False;
+ bool ready = False;
char *mntpath = NULL;
char *bdev = NULL;
char *fs = NULL;
{
int ret = -1;
int i;
- BOOL ready = False;
+ bool ready = False;
char *mntpath = NULL;
char *bdev = NULL;
char *fs = NULL;
* 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;
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));
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)
{
Check if it's a null unix time.
****************************************************************************/
-BOOL null_time(time_t t)
+bool null_time(time_t t)
{
return t == 0 ||
t == (time_t)0xFFFFFFFF ||
Check if it's a null NTTIME.
****************************************************************************/
-BOOL null_nttime(NTTIME t)
+bool null_nttime(NTTIME t)
{
return t == 0 || t == (NTTIME)-1;
}
Check if it's a null timespec.
****************************************************************************/
-BOOL null_timespec(struct timespec ts)
+bool null_timespec(struct timespec ts)
{
return ts.tv_sec == 0 ||
ts.tv_sec == (time_t)0xFFFFFFFF ||
/**
return True if a timeval is zero
*/
-BOOL timeval_is_zero(const struct timeval *tv)
+bool timeval_is_zero(const struct timeval *tv)
{
return tv->tv_sec == 0 && tv->tv_usec == 0;
}
/**
return True if a timer is in the past
*/
-BOOL timeval_expired(const struct timeval *tv)
+bool timeval_expired(const struct timeval *tv)
{
struct timeval tv2 = timeval_current();
if (tv2.tv_sec > tv->tv_sec) return True;
Check if NTTIME is 0.
****************************************************************************/
-BOOL nt_time_is_zero(const NTTIME *nt)
+bool nt_time_is_zero(const NTTIME *nt)
{
return (*nt == 0);
}
Return the date and time as a string
****************************************************************************/
-char *current_timestring(BOOL hires)
+char *current_timestring(bool hires)
{
fstring TimeBuf;
struct timeval tp;
structure.
****************************************************************************/
-time_t get_create_time(const SMB_STRUCT_STAT *st,BOOL fake_dirs)
+time_t get_create_time(const SMB_STRUCT_STAT *st,bool fake_dirs)
{
time_t ret, ret1;
return ret;
}
-struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,BOOL fake_dirs)
+struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,bool fake_dirs)
{
struct timespec ts;
ts.tv_sec = get_create_time(st, fake_dirs);
Check if two NTTIMEs are the same.
****************************************************************************/
-BOOL nt_time_equals(const NTTIME *nt1, const NTTIME *nt2)
+bool nt_time_equals(const NTTIME *nt1, const NTTIME *nt2)
{
return (*nt1 == *nt2);
}
Check if it's a null mtime.
****************************************************************************/
-BOOL null_mtime(time_t mtime)
+bool null_mtime(time_t mtime)
{
if (mtime == 0 || mtime == (time_t)0xFFFFFFFF || mtime == (time_t)-1)
return(True);
"%u seconds", days, hours, mins, secs);
}
-BOOL nt_time_is_set(const NTTIME *nt)
+bool nt_time_is_set(const NTTIME *nt)
{
if (*nt == 0x7FFFFFFFFFFFFFFFLL) {
return False;
Allocate and set myname. Ensure upper case.
***********************************************************************/
-BOOL set_global_myname(const char *myname)
+bool set_global_myname(const char *myname)
{
SAFE_FREE(smb_myname);
smb_myname = SMB_STRDUP(myname);
Allocate and set myworkgroup. Ensure upper case.
***********************************************************************/
-BOOL set_global_myworkgroup(const char *myworkgroup)
+bool set_global_myworkgroup(const char *myworkgroup)
{
SAFE_FREE(smb_myworkgroup);
smb_myworkgroup = SMB_STRDUP(myworkgroup);
Allocate and set scope. Ensure upper case.
***********************************************************************/
-BOOL set_global_scope(const char *scope)
+bool set_global_scope(const char *scope)
{
SAFE_FREE(smb_scope);
smb_scope = SMB_STRDUP(scope);
smb_num_netbios_names = 0;
}
-static BOOL allocate_my_netbios_names_array(size_t number)
+static bool allocate_my_netbios_names_array(size_t number)
{
free_netbios_names_array();
return True;
}
-static BOOL set_my_netbios_names(const char *name, int i)
+static bool set_my_netbios_names(const char *name, int i)
{
SAFE_FREE(smb_my_netbios_names[i]);
return smb_my_netbios_names[i];
}
-BOOL set_netbios_aliases(const char **str_array)
+bool set_netbios_aliases(const char **str_array)
{
size_t namecount;
size_t i;
for ( i = 0; str_array[i] != NULL; i++) {
size_t n;
- BOOL duplicate = False;
+ bool duplicate = False;
/* Look for duplicates */
for( n=0; n<namecount; n++ ) {
Common name initialization code.
****************************************************************************/
-BOOL init_names(void)
+bool init_names(void)
{
char *p;
int n;
Add a gid to an array of gids if it's not already there.
****************************************************************************/
-BOOL add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
+bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
gid_t **gids, size_t *num_gids)
{
int i;
Check if a file exists - call vfs_file_exist for samba files.
********************************************************************/
-BOOL file_exist(const char *fname,SMB_STRUCT_STAT *sbuf)
+bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf)
{
SMB_STRUCT_STAT st;
if (!sbuf)
Check if a directory exists.
********************************************************************/
-BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st)
+bool directory_exist(char *dname,SMB_STRUCT_STAT *st)
{
SMB_STRUCT_STAT st2;
- BOOL ret;
+ bool ret;
if (!st)
st = &st2;
Setup the word count and byte count for a smb message.
********************************************************************/
-int set_message(char *buf,int num_words,int num_bytes,BOOL zero)
+int set_message(char *buf,int num_words,int num_bytes,bool zero)
{
if (zero && (num_words || num_bytes)) {
memset(buf + smb_size,'\0',num_words*2 + num_bytes);
Close the low 3 fd's and open dev/null in their place.
********************************************************************/
-void close_low_fds(BOOL stderr_too)
+void close_low_fds(bool stderr_too)
{
#ifndef VALGRIND
int fd;
if BSD use FNDELAY
****************************************************************************/
-int set_blocking(int fd, BOOL set)
+int set_blocking(int fd, bool set)
{
int val;
#ifdef O_NONBLOCK
Become a daemon, discarding the controlling terminal.
****************************************************************************/
-void become_daemon(BOOL Fork, BOOL no_process_group)
+void become_daemon(bool Fork, bool no_process_group)
{
if (Fork) {
if (sys_fork()) {
Put up a yes/no prompt.
****************************************************************************/
-BOOL yesno(char *p)
+bool yesno(char *p)
{
pstring ans;
printf("%s",p);
Changes were instigated by Coverity error checking. JRA.
****************************************************************************/
-void *Realloc(void *p, size_t size, BOOL free_old_on_error)
+void *Realloc(void *p, size_t size, bool free_old_on_error)
{
void *ret=NULL;
Type-safe realloc.
****************************************************************************/
-void *realloc_array(void *p, size_t el_size, unsigned int count, BOOL free_old_on_error)
+void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error)
{
if (count >= MAX_ALLOC_SIZE/el_size) {
if (free_old_on_error) {
Get my own name and IP.
****************************************************************************/
-BOOL get_myname(char *my_name)
+bool get_myname(char *my_name)
{
fstring hostname;
Get my own domain name.
****************************************************************************/
-BOOL get_mydnsdomname(fstring my_domname)
+bool get_mydnsdomname(fstring my_domname)
{
fstring domname;
char *p;
Check if a process exists. Does this work on all unixes?
****************************************************************************/
-BOOL process_exists(const struct server_id pid)
+bool process_exists(const struct server_id pid)
{
if (procid_is_me(&pid)) {
return True;
#endif
}
-BOOL process_exists_by_pid(pid_t pid)
+bool process_exists_by_pid(pid_t pid)
{
/* Doing kill with a non-positive pid causes messages to be
* sent to places we don't want. */
of a path matches a (possibly wildcarded) entry in a namelist.
********************************************************************/
-BOOL is_in_path(const char *name, name_compare_entry *namelist, BOOL case_sensitive)
+bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive)
{
const char *last_component;
Returns True if the lock was granted, False otherwise.
****************************************************************************/
-BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+bool fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
SMB_STRUCT_FLOCK lock;
int ret;
F_UNLCK in *ptype if the region is unlocked). False if the call failed.
****************************************************************************/
-BOOL fcntl_getlock(int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
+bool fcntl_getlock(int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
{
SMB_STRUCT_FLOCK lock;
int ret;
Returns true if it is equal, false otherwise.
********************************************************************/
-BOOL is_myname(const char *s)
+bool is_myname(const char *s)
{
int n;
- BOOL ret = False;
+ bool ret = False;
for (n=0; my_netbios_names(n); n++) {
if (strequal(my_netbios_names(n), s)) {
Returns true if it is equal, false otherwise.
********************************************************************/
-BOOL is_myworkgroup(const char *s)
+bool is_myworkgroup(const char *s)
{
- BOOL ret = False;
+ bool ret = False;
if (strequal(s, lp_workgroup())) {
ret=True;
return parent;
}
-BOOL parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir,
+bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir,
char **parent, const char **name)
{
char *p;
Determine if a pattern contains any Microsoft wildcard characters.
*******************************************************************/
-BOOL ms_has_wild(const char *s)
+bool ms_has_wild(const char *s)
{
char c;
return False;
}
-BOOL ms_has_wild_w(const smb_ucs2_t *s)
+bool ms_has_wild_w(const smb_ucs2_t *s)
{
smb_ucs2_t c;
if (!s) return False;
of the ".." name.
*******************************************************************/
-BOOL mask_match(const char *string, const char *pattern, BOOL is_case_sensitive)
+bool mask_match(const char *string, const char *pattern, bool is_case_sensitive)
{
if (strcmp(string,"..") == 0)
string = ".";
pattern translation.
*******************************************************************/
-BOOL mask_match_search(const char *string, const char *pattern, BOOL is_case_sensitive)
+bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive)
{
if (strcmp(string,"..") == 0)
string = ".";
on each. Returns True if any of the patterns match.
*******************************************************************/
-BOOL mask_match_list(const char *string, char **list, int listLen, BOOL is_case_sensitive)
+bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive)
{
while (listLen-- > 0) {
if (mask_match(string, *list++, is_case_sensitive))
return procid_self();
}
-BOOL procid_equal(const struct server_id *p1, const struct server_id *p2)
+bool procid_equal(const struct server_id *p1, const struct server_id *p2)
{
if (p1->pid != p2->pid)
return False;
return True;
}
-BOOL cluster_id_equal(const struct server_id *id1,
+bool cluster_id_equal(const struct server_id *id1,
const struct server_id *id2)
{
return procid_equal(id1, id2);
}
-BOOL procid_is_me(const struct server_id *pid)
+bool procid_is_me(const struct server_id *pid)
{
if (pid->pid != sys_getpid())
return False;
return procid_str(talloc_tos(), pid);
}
-BOOL procid_valid(const struct server_id *pid)
+bool procid_valid(const struct server_id *pid)
{
return (pid->pid != -1);
}
-BOOL procid_is_local(const struct server_id *pid)
+bool procid_is_local(const struct server_id *pid)
{
#ifdef CLUSTER_SUPPORT
return pid->vnn == my_vnn;
pointer ptr+off.
****************************************************************/
-BOOL is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off)
+bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off)
{
const char *end_base = buf_base + buf_len;
char *end_ptr = ptr + off;
char *s=s2;
int len = 0;
int c;
- BOOL start_of_line = True;
+ bool start_of_line = True;
if (x_feof(f)) {
return(NULL);
unmap or free memory
*******************************************************************/
-BOOL unmap_file(void* start, size_t size)
+bool unmap_file(void* start, size_t size)
{
#ifdef HAVE_MMAP
if ( munmap( start, size ) != 0 ) {
Save a lump of data into a file. Mostly used for debugging.
****************************************************************************/
-BOOL file_save(const char *fname, void *packet, size_t length)
+bool file_save(const char *fname, void *packet, size_t length)
{
int fd;
fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0644);
/*
* check whether a given value name is forbidden in registry (smbconf)
*/
-BOOL registry_smbconf_valname_forbidden(const char *valname)
+bool registry_smbconf_valname_forbidden(const char *valname)
{
/* hard code the list of forbidden names here for now */
const char *forbidden_valnames[] = {
* for use in places where not the whole registry is needed,
* e.g. utils/net_conf.c and loadparm.c
*/
-BOOL registry_init_regdb(void)
+bool registry_init_regdb(void)
{
- BOOL ret = False;
+ bool ret = False;
int saved_errno = 0;
static REGISTRY_HOOK smbconf_reg_hook = {KEY_SMBCONF, &smbconf_reg_ops};
include other bits requested.
**********************************************************************************/
-static BOOL get_max_access( SEC_ACL *the_acl, const NT_USER_TOKEN *token, uint32 *granted,
+static bool get_max_access( SEC_ACL *the_acl, const NT_USER_TOKEN *token, uint32 *granted,
uint32 desired,
NTSTATUS *status)
{
"Access-Checking" document in MSDN.
*****************************************************************************/
-BOOL se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
+bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
uint32 acc_desired, uint32 *acc_granted,
NTSTATUS *status)
{
#define DEBUG(x, y) printf y
#define smb_panic(x) exit(1)
-#define BOOL int
+#define bool int
#endif
/* are we running as non-root? This is used by the regresison test code,
/****************************************************************************
are we running in non-root mode?
****************************************************************************/
-BOOL non_root_mode(void)
+bool non_root_mode(void)
{
return (initial_uid != (uid_t)0);
}
/****************************************************************************
Check if we are setuid root. Used in libsmb and smbpasswd paranoia checks.
****************************************************************************/
-BOOL is_setuid_root(void)
+bool is_setuid_root(void)
{
return (geteuid() == (uid_t)0) && (getuid() != (uid_t)0);
}
Convert a string to a SID. Returns True on success, False on fail.
*****************************************************************/
-BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
+bool string_to_sid(DOM_SID *sidout, const char *sidstr)
{
const char *p;
char *q;
Add a rid to the end of a sid
*****************************************************************/
-BOOL sid_append_rid(DOM_SID *sid, uint32 rid)
+bool sid_append_rid(DOM_SID *sid, uint32 rid)
{
if (sid->num_auths < MAXSUBAUTHS) {
sid->sub_auths[sid->num_auths++] = rid;
return False;
}
-BOOL sid_compose(DOM_SID *dst, const DOM_SID *domain_sid, uint32 rid)
+bool sid_compose(DOM_SID *dst, const DOM_SID *domain_sid, uint32 rid)
{
sid_copy(dst, domain_sid);
return sid_append_rid(dst, rid);
Removes the last rid from the end of a sid
*****************************************************************/
-BOOL sid_split_rid(DOM_SID *sid, uint32 *rid)
+bool sid_split_rid(DOM_SID *sid, uint32 *rid)
{
if (sid->num_auths > 0) {
sid->num_auths--;
Return the last rid from the end of a sid
*****************************************************************/
-BOOL sid_peek_rid(const DOM_SID *sid, uint32 *rid)
+bool sid_peek_rid(const DOM_SID *sid, uint32 *rid)
{
if (!sid || !rid)
return False;
and check the sid against the exp_dom_sid
*****************************************************************/
-BOOL sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *rid)
+bool sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *rid)
{
if (!exp_dom_sid || !sid || !rid)
return False;
Write a sid out into on-the-wire format.
*****************************************************************/
-BOOL sid_linearize(char *outbuf, size_t len, const DOM_SID *sid)
+bool sid_linearize(char *outbuf, size_t len, const DOM_SID *sid)
{
size_t i;
Parse a on-the-wire SID to a DOM_SID.
*****************************************************************/
-BOOL sid_parse(const char *inbuf, size_t len, DOM_SID *sid)
+bool sid_parse(const char *inbuf, size_t len, DOM_SID *sid)
{
int i;
if (len < 8)
Compare two sids.
*****************************************************************/
-BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2)
+bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2)
{
return sid_compare(sid1, sid2) == 0;
}
Returns true if SID is internal (and non-mappable).
*****************************************************************/
-BOOL non_mappable_sid(DOM_SID *sid)
+bool non_mappable_sid(DOM_SID *sid)
{
DOM_SID dom;
uint32 rid;
Add SID to an array SIDs
********************************************************************/
-BOOL add_sid_to_array(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool add_sid_to_array(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
DOM_SID **sids, size_t *num)
{
*sids = TALLOC_REALLOC_ARRAY(mem_ctx, *sids, DOM_SID,
Add SID to an array SIDs ensuring that it is not already there
********************************************************************/
-BOOL add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
DOM_SID **sids, size_t *num_sids)
{
size_t i;
return;
}
-BOOL add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
+bool add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
uint32 rid, uint32 **pp_rids, size_t *p_num)
{
size_t i;
return True;
}
-BOOL is_null_sid(const DOM_SID *sid)
+bool is_null_sid(const DOM_SID *sid)
{
static const DOM_SID null_sid = {0};
return sid_equal(sid, &null_sid);
const NET_USER_INFO_3 *info3,
DOM_SID **user_sids,
size_t *num_user_sids,
- BOOL include_user_group_rid)
+ bool include_user_group_rid)
{
DOM_SID sid;
DOM_SID *sid_array = NULL;
Output is uint32 in native byte order.
****************************************************************************/
-BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 *value)
+bool tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 *value)
{
TDB_DATA data;
Output is uint32 in native byte order.
****************************************************************************/
-BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value)
+bool tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value)
{
TDB_DATA key = string_term_tdb_data(keystr);
Input is uint32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 value)
+bool tdb_store_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 value)
{
TDB_DATA data;
uint32 v_store;
- BOOL ret = True;
+ bool ret = True;
SIVAL(&v_store, 0, value);
data.dptr = (uint8 *)&v_store;
Input is uint32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
+bool tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
{
TDB_DATA key = string_term_tdb_data(keystr);
Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval.
****************************************************************************/
-BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val)
+bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val)
{
uint32 val;
- BOOL ret = False;
+ bool ret = False;
if (tdb_lock_bystring(tdb, keystr) == -1)
return False;
return result;
}
-BOOL tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
+bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
const char *fmt, ...)
{
va_list ap;
* the traverse-copy */
struct tdb_copy_data {
struct tdb_context *dst;
- BOOL success;
+ bool success;
};
static int traverse_copy_fn(struct tdb_context *tdb, TDB_DATA key,
static int tdb_backup_with_rotate(TALLOC_CTX *ctx, const char *src_path,
const char *dst_path, int hash_size,
const char *rotate_suffix,
- BOOL retry_norotate_if_nospc,
- BOOL rename_as_last_resort_if_nospc)
+ bool retry_norotate_if_nospc,
+ bool rename_as_last_resort_if_nospc)
{
int ret;
static smb_ucs2_t *upcase_table;
static smb_ucs2_t *lowcase_table;
static uint8 *valid_table;
-static BOOL upcase_table_use_unmap;
-static BOOL lowcase_table_use_unmap;
-static BOOL valid_table_use_unmap;
+static bool upcase_table_use_unmap;
+static bool lowcase_table_use_unmap;
+static bool valid_table_use_unmap;
/**
* This table says which Unicode characters are valid dos
null termination if applied
********************************************************************/
-size_t dos_PutUniCode(char *dst,const char *src, size_t len, BOOL null_terminate)
+size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate)
{
int flags = null_terminate ? STR_UNICODE|STR_NOALIGN|STR_TERMINATE
: STR_UNICODE|STR_NOALIGN;
Determine if a character is lowercase.
********************************************************************/
-BOOL islower_w(smb_ucs2_t c)
+bool islower_w(smb_ucs2_t c)
{
return upcase_table[SVAL(&c,0)] != c;
}
Determine if a character is uppercase.
********************************************************************/
-BOOL isupper_w(smb_ucs2_t c)
+bool isupper_w(smb_ucs2_t c)
{
return lowcase_table[SVAL(&c,0)] != c;
}
Determine if a character is valid in a 8.3 name.
********************************************************************/
-BOOL isvalid83_w(smb_ucs2_t c)
+bool isvalid83_w(smb_ucs2_t c)
{
return valid_table[SVAL(&c,0)] != 0;
}
return True if any char is converted
********************************************************************/
-BOOL strlower_w(smb_ucs2_t *s)
+bool strlower_w(smb_ucs2_t *s)
{
smb_ucs2_t cp;
- BOOL ret = False;
+ bool ret = False;
while (*(COPY_UCS2_CHAR(&cp,s))) {
smb_ucs2_t v = tolower_w(cp);
return True if any char is converted
********************************************************************/
-BOOL strupper_w(smb_ucs2_t *s)
+bool strupper_w(smb_ucs2_t *s)
{
smb_ucs2_t cp;
- BOOL ret = False;
+ bool ret = False;
while (*(COPY_UCS2_CHAR(&cp,s))) {
smb_ucs2_t v = toupper_w(cp);
if (v != cp) {
Compare 2 strings.
********************************************************************/
-BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2)
+bool strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2)
{
if (s1 == s2) {
return(True);
Compare 2 strings up to and including the nth char.
******************************************************************/
-BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n)
+bool strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n)
{
if (s1 == s2) {
return(True);
Trim unicode string.
********************************************************************/
-BOOL trim_string_w(smb_ucs2_t *s, const smb_ucs2_t *front,
+bool trim_string_w(smb_ucs2_t *s, const smb_ucs2_t *front,
const smb_ucs2_t *back)
{
- BOOL ret = False;
+ bool ret = False;
size_t len, front_len, back_len;
if (!s) {
return NULL;
}
-BOOL trim_string_wa(smb_ucs2_t *s, const char *front,
+bool trim_string_wa(smb_ucs2_t *s, const char *front,
const char *back)
{
wpstring f, b;
return out;
}
-BOOL smb_string_to_uuid(const char *in, struct GUID* uu)
+bool smb_string_to_uuid(const char *in, struct GUID* uu)
{
- BOOL ret = False;
+ bool ret = False;
const char *ptr = in;
char *end = (char *)in;
int i;
return SAMBA_VERSION_OFFICIAL_STRING;
#else
static fstring samba_version;
- static BOOL init_samba_version;
+ static bool init_samba_version;
#ifdef SAMBA_VENDOR_PATCH
fstring tmp_version;
size_t remaining;
see if an ip is on the dead list
*/
-BOOL wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip)
+bool wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip)
{
char *keystr = wins_srv_keystr(wins_ip, src_ip);
- BOOL result;
+ bool result;
/* If the key exists then the WINS server has been marked as dead */
typedef long HANDLE;
-#ifndef _UPPER_BOOL
-typedef int BOOL;
-#define _UPPER_BOOL
-#endif
-
-
enum dns_ServerType { DNS_SRV_ANY, DNS_SRV_WIN2000, DNS_SRV_WIN2003 };
struct dns_domain_label {
void ads_destroy(ADS_STRUCT **ads)
{
if (ads && *ads) {
- BOOL is_mine;
+ bool is_mine;
is_mine = (*ads)->is_mine;
#if HAVE_LDAP
#ifdef HAVE_KRB5
-static BOOL pac_io_logon_name(const char *desc, PAC_LOGON_NAME *logon_name,
+static bool pac_io_logon_name(const char *desc, PAC_LOGON_NAME *logon_name,
prs_struct *ps, int depth)
{
if (NULL == logon_name)
}
#if 0 /* Unused (handled now in net_io_user_info3()) - Guenther */
-static BOOL pac_io_krb_sids(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
+static bool pac_io_krb_sids(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
prs_struct *ps, int depth)
{
if (NULL == sid_and_attr)
}
-static BOOL pac_io_krb_attrs(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
+static bool pac_io_krb_attrs(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
prs_struct *ps, int depth)
{
if (NULL == sid_and_attr)
return True;
}
-static BOOL pac_io_krb_sid_and_attr_array(const char *desc,
+static bool pac_io_krb_sid_and_attr_array(const char *desc,
KRB_SID_AND_ATTR_ARRAY *array,
uint32 num,
prs_struct *ps, int depth)
}
#endif
-static BOOL pac_io_group_membership(const char *desc,
+static bool pac_io_group_membership(const char *desc,
GROUP_MEMBERSHIP *membership,
prs_struct *ps, int depth)
{
}
-static BOOL pac_io_group_membership_array(const char *desc,
+static bool pac_io_group_membership_array(const char *desc,
GROUP_MEMBERSHIP_ARRAY *array,
uint32 num,
prs_struct *ps, int depth)
}
#if 0 /* Unused, replaced using an expanded net_io_user_info3() now - Guenther */
-static BOOL pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
+static bool pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
prs_struct *ps, int depth)
{
uint32 garbage, i;
}
#endif
-static BOOL pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
+static bool pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
prs_struct *ps, int depth)
{
uint32 garbage;
- BOOL kerb_validation_info = True;
+ bool kerb_validation_info = True;
if (NULL == info)
return False;
-static BOOL pac_io_pac_signature_data(const char *desc,
+static bool pac_io_pac_signature_data(const char *desc,
PAC_SIGNATURE_DATA *data, uint32 length,
prs_struct *ps, int depth)
{
return True;
}
-static BOOL pac_io_pac_info_hdr_ctr(const char *desc, PAC_BUFFER *hdr,
+static bool pac_io_pac_info_hdr_ctr(const char *desc, PAC_BUFFER *hdr,
prs_struct *ps, int depth)
{
if (NULL == hdr)
return True;
}
-static BOOL pac_io_pac_info_hdr(const char *desc, PAC_BUFFER *hdr,
+static bool pac_io_pac_info_hdr(const char *desc, PAC_BUFFER *hdr,
prs_struct *ps, int depth)
{
if (NULL == hdr)
return True;
}
-static BOOL pac_io_pac_data(const char *desc, PAC_DATA *data,
+static bool pac_io_pac_data(const char *desc, PAC_DATA *data,
prs_struct *ps, int depth)
{
int i;
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
PAC_DATA **pac_ret)
{
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
PAC_LOGON_INFO **logon_info)
{
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
NET_USER_INFO_3 **info3)
{
do a cldap netlogon query. Always 389/udp
*******************************************************************/
-BOOL ads_cldap_netlogon(const char *server, const char *realm, struct cldap_netlogon_reply *reply)
+bool ads_cldap_netlogon(const char *server, const char *realm, struct cldap_netlogon_reply *reply)
{
int sock;
int ret;
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_query( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_query( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_query *q )
{
uint8 *p = *ptr;
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_rr( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_rr( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_rr *rr )
{
uint8 *p = *ptr;
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_rr_srv( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_rr_srv( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_rr_srv *srv )
{
struct dns_rr rr;
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_rr_ns( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_rr_ns( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_rr_ns *nsrec )
{
struct dns_rr rr;
We store indefinately as every new CLDAP query will re-write this.
****************************************************************************/
-BOOL sitename_store(const char *realm, const char *sitename)
+bool sitename_store(const char *realm, const char *sitename)
{
time_t expire;
- BOOL ret = False;
+ bool ret = False;
char *key;
if (!gencache_init()) {
{
char *sitename = NULL;
time_t timeout;
- BOOL ret = False;
+ bool ret = False;
const char *query_realm;
char *key;
Did the sitename change ?
****************************************************************************/
-BOOL stored_sitename_changed(const char *realm, const char *sitename)
+bool stored_sitename_changed(const char *realm, const char *sitename)
{
- BOOL ret = False;
+ bool ret = False;
char *new_sitename;
return 0;
}
-static BOOL smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
+static bool smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
DATA_BLOB *edata_blob,
KRB5_EDATA_NTSTATUS *edata)
{
- BOOL ret = False;
+ bool ret = False;
prs_struct ps;
if (!mem_ctx || !edata_blob || !edata)
return ret;
}
- static BOOL smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
+ static bool smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
NTSTATUS *nt_status)
{
DATA_BLOB edata;
return True;
}
- static BOOL smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(krb5_context ctx,
+ static bool smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(krb5_context ctx,
krb5_get_init_creds_opt *opt,
NTSTATUS *nt_status)
{
- BOOL ret = False;
+ bool ret = False;
krb5_error *error = NULL;
#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
NTSTATUS *ntstatus)
{
/************************************************************************
************************************************************************/
-BOOL kerberos_secrets_store_des_salt( const char* salt )
+bool kerberos_secrets_store_des_salt( const char* salt )
{
char* key;
- BOOL ret;
+ bool ret;
if ( (key = des_salt_key()) == NULL ) {
DEBUG(0,("kerberos_secrets_store_des_salt: failed to generate key!\n"));
Setting principal to NULL deletes this entry.
************************************************************************/
-BOOL kerberos_secrets_store_salting_principal(const char *service,
+bool kerberos_secrets_store_salting_principal(const char *service,
int enctype,
const char *principal)
{
char *key = NULL;
- BOOL ret = False;
+ bool ret = False;
krb5_context context = NULL;
krb5_principal princ = NULL;
char *princ_s = NULL;
run as root or will fail (which is a good thing :-).
************************************************************************/
-BOOL create_local_private_krb5_conf_for_domain(const char *realm, const char *domain,
+bool create_local_private_krb5_conf_for_domain(const char *realm, const char *domain,
const char *sitename, struct in_addr ip)
{
char *dname = talloc_asprintf(NULL, "%s/smb_krb5", lp_lockdir());
if (ret != KRB5_KT_END && ret != ENOENT ) {
DEBUG(3,("smb_krb5_kt_add_entry: Will try to delete old keytab entries\n"));
while(!krb5_kt_next_entry(context, keytab, &kt_entry, &cursor)) {
- BOOL compare_name_ok = False;
+ bool compare_name_ok = False;
ret = smb_krb5_unparse_name(context, kt_entry.principal, &ktprinc);
if (ret) {
ads_keytab_add_entry function for details.
***********************************************************************************/
-static BOOL ads_keytab_verify_ticket(krb5_context context,
+static bool ads_keytab_verify_ticket(krb5_context context,
krb5_auth_context auth_context,
const DATA_BLOB *ticket,
krb5_ticket **pp_tkt,
krb5_error_code *perr)
{
krb5_error_code ret = 0;
- BOOL auth_ok = False;
+ bool auth_ok = False;
krb5_keytab keytab = NULL;
krb5_kt_cursor kt_cursor;
krb5_keytab_entry kt_entry;
krb5_error_code *perr)
{
krb5_error_code ret = 0;
- BOOL auth_ok = False;
+ bool auth_ok = False;
char *password_s = NULL;
krb5_data password;
krb5_enctype enctypes[] = {
PAC_DATA **pac_data,
DATA_BLOB *ap_rep,
DATA_BLOB *session_key,
- BOOL use_replay_cache)
+ bool use_replay_cache)
{
NTSTATUS sret = NT_STATUS_LOGON_FAILURE;
NTSTATUS pac_ret;
krb5_principal host_princ = NULL;
krb5_const_principal client_principal = NULL;
char *host_princ_s = NULL;
- BOOL auth_ok = False;
- BOOL got_replay_mutex = False;
- BOOL got_auth_data = False;
+ bool auth_ok = False;
+ bool got_replay_mutex = False;
+ bool got_auth_data = False;
ZERO_STRUCT(packet);
ZERO_STRUCT(auth_data);
krb5_data *ap_req,
const char *princ,
const char *passwd,
- BOOL use_tcp,
+ bool use_tcp,
krb5_data *packet)
{
krb5_error_code ret;
}
}
static krb5_error_code parse_setpw_reply(krb5_context context,
- BOOL use_tcp,
+ bool use_tcp,
krb5_auth_context auth_context,
krb5_data *packet)
{
struct sockaddr remote_addr, local_addr;
struct in_addr *addr = interpret_addr2(kdc_host);
krb5_address local_kaddr, remote_kaddr;
- BOOL use_tcp = False;
+ bool use_tcp = False;
ret = krb5_mk_req_extended(context, &auth_context, AP_OPTS_USE_SUBKEY,
Do client and server sitename match ?
**********************************************/
-BOOL ads_sitename_match(ADS_STRUCT *ads)
+bool ads_sitename_match(ADS_STRUCT *ads)
{
if (ads->config.server_site_name == NULL &&
ads->config.client_site_name == NULL ) {
Is this the closest DC ?
**********************************************/
-BOOL ads_closest_dc(ADS_STRUCT *ads)
+bool ads_closest_dc(ADS_STRUCT *ads)
{
if (ads->config.flags & ADS_CLOSEST) {
DEBUG(10,("ads_closest_dc: ADS_CLOSEST flag set\n"));
try a connection to a given ldap server, returning True and setting the servers IP
in the ads struct if successful
*/
-BOOL ads_try_connect(ADS_STRUCT *ads, const char *server )
+bool ads_try_connect(ADS_STRUCT *ads, const char *server )
{
char *srv;
struct cldap_netlogon_reply cldap_reply;
int count, i=0;
struct ip_service *ip_list;
pstring realm;
- BOOL got_realm = False;
- BOOL use_own_domain = False;
+ bool got_realm = False;
+ bool use_own_domain = False;
char *sitename;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
**/
ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
int scope, const char *expr, const char **attrs,
- BOOL(*fn)(ADS_STRUCT *, char *, void **, void *),
+ bool (*fn)(ADS_STRUCT *, char *, void **, void *),
void *data_area)
{
struct berval *cookie = NULL;
**/
ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name,
- const char *org_unit, BOOL *moved)
+ const char *org_unit, bool *moved)
{
ADS_STATUS rc;
int ldap_status;
char *computer_dn = NULL;
char *parent_dn;
char *computer_rdn = NULL;
- BOOL need_move = False;
+ bool need_move = False;
if (asprintf(&filter, "(samAccountName=%s$)", machine_name) == -1) {
rc = ADS_ERROR(LDAP_NO_MEMORY);
used for debugging
*/
-static BOOL ads_dump_field(ADS_STRUCT *ads, char *field, void **values, void *data_area)
+static bool ads_dump_field(ADS_STRUCT *ads, char *field, void **values, void *data_area)
{
const struct {
const char *name;
- BOOL string;
+ bool string;
void (*handler)(ADS_STRUCT *, const char *, struct berval **);
} handlers[] = {
{"objectGUID", False, dump_guid},
* @param data_area user-defined area to pass to function
**/
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)
{
LDAPMessage *msg;
struct berval **ber_vals;
char **str_vals, **utf8_vals;
char *field;
- BOOL string;
+ bool string;
pull_utf8_talloc(ctx, &field, utf8_field);
string = fn(ads, field, NULL, data_area);
char **current_strings,
const char **next_attribute,
size_t *num_strings,
- BOOL *more_strings)
+ bool *more_strings)
{
char *attr;
char *expected_range_attrib, *range_attr;
* @param v Pointer to int to store result
* @return boolean inidicating success
*/
- BOOL ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+ bool ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
uint32 *v)
{
char **values;
* @param guid 37-byte area to receive text guid
* @return boolean indicating success
**/
- BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid)
+ bool ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid)
{
char **values;
UUID_FLAT flat_guid;
* @param sid Pointer to sid to store result
* @return boolean inidicating success
*/
- BOOL ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+ bool ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
DOM_SID *sid)
{
struct berval **values;
- BOOL ret = False;
+ bool ret = False;
values = ldap_get_values_len(ads->ldap.ld, msg, field);
LDAPMessage *msg, const char *field, DOM_SID **sids)
{
struct berval **values;
- BOOL ret;
+ bool ret;
int count, i;
values = ldap_get_values_len(ads->ldap.ld, msg, field);
* @param sd Pointer to *SEC_DESC to store result (talloc()ed)
* @return boolean inidicating success
*/
- 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)
{
struct berval **values;
- BOOL ret = False;
+ bool ret = False;
values = ldap_get_values_len(ads->ldap.ld, msg, field);
* @param sid pointer to a DOM_SID
* @return boolean inidicating success
**/
-BOOL ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
+bool ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
const char *extended_dn,
enum ads_extended_dn_flags flags,
DOM_SID *sid)
/*
map a REG_SZ to an ldap mod
*/
-static BOOL map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char *str_value = NULL;
/*
map a REG_DWORD to an ldap mod
*/
-static BOOL map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char *str_value = NULL;
/*
map a boolean REG_BINARY to an ldap mod
*/
-static BOOL map_bool(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_bool(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char *str_value;
/*
map a REG_MULTI_SZ to an ldap mod
*/
-static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char **str_values = NULL;
struct valmap_to_ads {
const char *valname;
- BOOL (*fn)(TALLOC_CTX *, ADS_MODLIST *, const REGISTRY_VALUE *);
+ bool (*fn)(TALLOC_CTX *, ADS_MODLIST *, const REGISTRY_VALUE *);
};
/*
return result;
}
-BOOL get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
+bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
ADS_MODLIST *mods,
NT_PRINTER_DATA *data)
{
uint32 first_usn;
int num_retries = 0;
const char **attrs;
- BOOL more_values = False;
+ bool more_values = False;
*num_strings = 0;
*strings = NULL;
size_t *num_strings,
uint32 *first_usn,
int *num_retries,
- BOOL *more_values)
+ bool *more_values)
{
LDAPMessage *res = NULL;
ADS_STATUS status;
static ADS_STATUS ads_sasl_spnego_gsskrb5_bind(ADS_STRUCT *ads, const gss_name_t serv_name)
{
ADS_STATUS status;
- BOOL ok;
+ bool ok;
uint32 minor_status;
int gss_rc, rc;
gss_OID_desc krb5_mech_type =
char *given_principal = NULL;
char *OIDs[ASN1_MAX_OIDS];
#ifdef HAVE_KRB5
- BOOL got_kerberos_mechanism = False;
+ bool got_kerberos_mechanism = False;
#endif
rc = ldap_sasl_bind_s(ads->ldap.ld, NULL, "GSS-SPNEGO", NULL, NULL, NULL, &scred);
sync files
****************************************************************/
-static BOOL gpo_sync_files(struct sync_context *ctx)
+static bool gpo_sync_files(struct sync_context *ctx)
{
DEBUG(3,("calling cli_list with mask: %s\n", ctx->mask));
parse the raw extension string into a GP_EXT structure
****************************************************************/
-BOOL ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
+bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
const char *extension_raw,
struct GP_EXT **gp_ext)
{
- BOOL ret = False;
+ bool ret = False;
struct GP_EXT *ext = NULL;
char **ext_list = NULL;
char **ext_strings = NULL;
const char *link_dn,
struct GP_LINK *gp_link,
enum GPO_LINK_TYPE link_type,
- BOOL only_add_forced_gpos,
+ bool only_add_forced_gpos,
const struct nt_user_token *token)
{
ADS_STATUS status;
ADS_STATUS status;
struct GP_LINK gp_link;
const char *parent_dn, *site_dn, *tmp_dn;
- BOOL add_only_forced_gpos = False;
+ bool add_only_forced_gpos = False;
ZERO_STRUCTP(gpo_list);
/****************************************************************
****************************************************************/
-static BOOL gpo_sd_check_agp_object_guid(const struct security_ace_object *object)
+static bool gpo_sd_check_agp_object_guid(const struct security_ace_object *object)
{
struct GUID ext_right_apg_guid;
NTSTATUS status;
/****************************************************************
****************************************************************/
-static BOOL gpo_sd_check_agp_object(const SEC_ACE *ace)
+static bool gpo_sd_check_agp_object(const SEC_ACE *ace)
{
if (!sec_ace_object(ace->type)) {
return False;
/****************************************************************
****************************************************************/
-static BOOL gpo_sd_check_agp_access_bits(uint32_t access_mask)
+static bool gpo_sd_check_agp_access_bits(uint32_t access_mask)
{
return (access_mask & SEC_RIGHTS_EXTENDED);
}
/****************************************************************
****************************************************************/
-static BOOL gpo_sd_check_read_access_bits(uint32_t access_mask)
+static bool gpo_sd_check_read_access_bits(uint32_t access_mask)
{
uint32_t read_bits = SEC_RIGHTS_LIST_CONTENTS |
SEC_RIGHTS_READ_ALL_PROP |
#include "includes.h"
#include "librpc/gen_ndr/srv_dfs.h"
-static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
+static bool api_dfs_GetManagerVersion(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Add(pipes_struct *p)
+static bool api_dfs_Add(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Remove(pipes_struct *p)
+static bool api_dfs_Remove(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_SetInfo(pipes_struct *p)
+static bool api_dfs_SetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_GetInfo(pipes_struct *p)
+static bool api_dfs_GetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Enum(pipes_struct *p)
+static bool api_dfs_Enum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Rename(pipes_struct *p)
+static bool api_dfs_Rename(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Move(pipes_struct *p)
+static bool api_dfs_Move(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p)
+static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p)
+static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_AddFtRoot(pipes_struct *p)
+static bool api_dfs_AddFtRoot(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
+static bool api_dfs_RemoveFtRoot(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_AddStdRoot(pipes_struct *p)
+static bool api_dfs_AddStdRoot(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
+static bool api_dfs_RemoveStdRoot(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
+static bool api_dfs_ManagerInitialize(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
+static bool api_dfs_AddStdRootForced(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_GetDcAddress(pipes_struct *p)
+static bool api_dfs_GetDcAddress(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_SetDcAddress(pipes_struct *p)
+static bool api_dfs_SetDcAddress(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_FlushFtTable(pipes_struct *p)
+static bool api_dfs_FlushFtTable(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Add2(pipes_struct *p)
+static bool api_dfs_Add2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_Remove2(pipes_struct *p)
+static bool api_dfs_Remove2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_EnumEx(pipes_struct *p)
+static bool api_dfs_EnumEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_dfs_SetInfo2(pipes_struct *p)
+static bool api_dfs_SetInfo2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_echo.h"
-static BOOL api_echo_AddOne(pipes_struct *p)
+static bool api_echo_AddOne(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_EchoData(pipes_struct *p)
+static bool api_echo_EchoData(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_SinkData(pipes_struct *p)
+static bool api_echo_SinkData(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_SourceData(pipes_struct *p)
+static bool api_echo_SourceData(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_TestCall(pipes_struct *p)
+static bool api_echo_TestCall(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_TestCall2(pipes_struct *p)
+static bool api_echo_TestCall2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_TestSleep(pipes_struct *p)
+static bool api_echo_TestSleep(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_TestEnum(pipes_struct *p)
+static bool api_echo_TestEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_TestSurrounding(pipes_struct *p)
+static bool api_echo_TestSurrounding(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_echo_TestDoublePointer(pipes_struct *p)
+static bool api_echo_TestDoublePointer(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_epmapper.h"
-static BOOL api_epm_Insert(pipes_struct *p)
+static bool api_epm_Insert(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_Delete(pipes_struct *p)
+static bool api_epm_Delete(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_Lookup(pipes_struct *p)
+static bool api_epm_Lookup(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_Map(pipes_struct *p)
+static bool api_epm_Map(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_LookupHandleFree(pipes_struct *p)
+static bool api_epm_LookupHandleFree(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_InqObject(pipes_struct *p)
+static bool api_epm_InqObject(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_MgmtDelete(pipes_struct *p)
+static bool api_epm_MgmtDelete(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_epm_MapAuth(pipes_struct *p)
+static bool api_epm_MapAuth(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_eventlog.h"
-static BOOL api_eventlog_ClearEventLogW(pipes_struct *p)
+static bool api_eventlog_ClearEventLogW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_BackupEventLogW(pipes_struct *p)
+static bool api_eventlog_BackupEventLogW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_CloseEventLog(pipes_struct *p)
+static bool api_eventlog_CloseEventLog(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_DeregisterEventSource(pipes_struct *p)
+static bool api_eventlog_DeregisterEventSource(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_GetNumRecords(pipes_struct *p)
+static bool api_eventlog_GetNumRecords(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_GetOldestRecord(pipes_struct *p)
+static bool api_eventlog_GetOldestRecord(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_ChangeNotify(pipes_struct *p)
+static bool api_eventlog_ChangeNotify(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_OpenEventLogW(pipes_struct *p)
+static bool api_eventlog_OpenEventLogW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_RegisterEventSourceW(pipes_struct *p)
+static bool api_eventlog_RegisterEventSourceW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_OpenBackupEventLogW(pipes_struct *p)
+static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_ReadEventLogW(pipes_struct *p)
+static bool api_eventlog_ReadEventLogW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_ReportEventW(pipes_struct *p)
+static bool api_eventlog_ReportEventW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_ClearEventLogA(pipes_struct *p)
+static bool api_eventlog_ClearEventLogA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_BackupEventLogA(pipes_struct *p)
+static bool api_eventlog_BackupEventLogA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_OpenEventLogA(pipes_struct *p)
+static bool api_eventlog_OpenEventLogA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_RegisterEventSourceA(pipes_struct *p)
+static bool api_eventlog_RegisterEventSourceA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_OpenBackupEventLogA(pipes_struct *p)
+static bool api_eventlog_OpenBackupEventLogA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_ReadEventLogA(pipes_struct *p)
+static bool api_eventlog_ReadEventLogA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_ReportEventA(pipes_struct *p)
+static bool api_eventlog_ReportEventA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_RegisterClusterSvc(pipes_struct *p)
+static bool api_eventlog_RegisterClusterSvc(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_DeregisterClusterSvc(pipes_struct *p)
+static bool api_eventlog_DeregisterClusterSvc(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_WriteClusterEvents(pipes_struct *p)
+static bool api_eventlog_WriteClusterEvents(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_GetLogIntormation(pipes_struct *p)
+static bool api_eventlog_GetLogIntormation(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_eventlog_FlushEventLog(pipes_struct *p)
+static bool api_eventlog_FlushEventLog(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_initshutdown.h"
-static BOOL api_initshutdown_Init(pipes_struct *p)
+static bool api_initshutdown_Init(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_initshutdown_Abort(pipes_struct *p)
+static bool api_initshutdown_Abort(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_initshutdown_InitEx(pipes_struct *p)
+static bool api_initshutdown_InitEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_lsa.h"
-static BOOL api_lsa_Close(pipes_struct *p)
+static bool api_lsa_Close(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_Delete(pipes_struct *p)
+static bool api_lsa_Delete(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumPrivs(pipes_struct *p)
+static bool api_lsa_EnumPrivs(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QuerySecurity(pipes_struct *p)
+static bool api_lsa_QuerySecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetSecObj(pipes_struct *p)
+static bool api_lsa_SetSecObj(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_ChangePassword(pipes_struct *p)
+static bool api_lsa_ChangePassword(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_OpenPolicy(pipes_struct *p)
+static bool api_lsa_OpenPolicy(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QueryInfoPolicy(pipes_struct *p)
+static bool api_lsa_QueryInfoPolicy(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetInfoPolicy(pipes_struct *p)
+static bool api_lsa_SetInfoPolicy(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_ClearAuditLog(pipes_struct *p)
+static bool api_lsa_ClearAuditLog(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CreateAccount(pipes_struct *p)
+static bool api_lsa_CreateAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumAccounts(pipes_struct *p)
+static bool api_lsa_EnumAccounts(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CreateTrustedDomain(pipes_struct *p)
+static bool api_lsa_CreateTrustedDomain(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumTrustDom(pipes_struct *p)
+static bool api_lsa_EnumTrustDom(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupNames(pipes_struct *p)
+static bool api_lsa_LookupNames(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupSids(pipes_struct *p)
+static bool api_lsa_LookupSids(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CreateSecret(pipes_struct *p)
+static bool api_lsa_CreateSecret(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_OpenAccount(pipes_struct *p)
+static bool api_lsa_OpenAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumPrivsAccount(pipes_struct *p)
+static bool api_lsa_EnumPrivsAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_AddPrivilegesToAccount(pipes_struct *p)
+static bool api_lsa_AddPrivilegesToAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_RemovePrivilegesFromAccount(pipes_struct *p)
+static bool api_lsa_RemovePrivilegesFromAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_GetQuotasForAccount(pipes_struct *p)
+static bool api_lsa_GetQuotasForAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetQuotasForAccount(pipes_struct *p)
+static bool api_lsa_SetQuotasForAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_GetSystemAccessAccount(pipes_struct *p)
+static bool api_lsa_GetSystemAccessAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetSystemAccessAccount(pipes_struct *p)
+static bool api_lsa_SetSystemAccessAccount(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_OpenTrustedDomain(pipes_struct *p)
+static bool api_lsa_OpenTrustedDomain(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
+static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetInformationTrustedDomain(pipes_struct *p)
+static bool api_lsa_SetInformationTrustedDomain(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_OpenSecret(pipes_struct *p)
+static bool api_lsa_OpenSecret(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetSecret(pipes_struct *p)
+static bool api_lsa_SetSecret(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QuerySecret(pipes_struct *p)
+static bool api_lsa_QuerySecret(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupPrivValue(pipes_struct *p)
+static bool api_lsa_LookupPrivValue(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupPrivName(pipes_struct *p)
+static bool api_lsa_LookupPrivName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupPrivDisplayName(pipes_struct *p)
+static bool api_lsa_LookupPrivDisplayName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_DeleteObject(pipes_struct *p)
+static bool api_lsa_DeleteObject(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumAccountsWithUserRight(pipes_struct *p)
+static bool api_lsa_EnumAccountsWithUserRight(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumAccountRights(pipes_struct *p)
+static bool api_lsa_EnumAccountRights(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_AddAccountRights(pipes_struct *p)
+static bool api_lsa_AddAccountRights(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_RemoveAccountRights(pipes_struct *p)
+static bool api_lsa_RemoveAccountRights(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p)
+static bool api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetTrustedDomainInfo(pipes_struct *p)
+static bool api_lsa_SetTrustedDomainInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_DeleteTrustedDomain(pipes_struct *p)
+static bool api_lsa_DeleteTrustedDomain(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_StorePrivateData(pipes_struct *p)
+static bool api_lsa_StorePrivateData(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_RetrievePrivateData(pipes_struct *p)
+static bool api_lsa_RetrievePrivateData(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_OpenPolicy2(pipes_struct *p)
+static bool api_lsa_OpenPolicy2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_GetUserName(pipes_struct *p)
+static bool api_lsa_GetUserName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QueryInfoPolicy2(pipes_struct *p)
+static bool api_lsa_QueryInfoPolicy2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetInfoPolicy2(pipes_struct *p)
+static bool api_lsa_SetInfoPolicy2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p)
+static bool api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetTrustedDomainInfoByName(pipes_struct *p)
+static bool api_lsa_SetTrustedDomainInfoByName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_EnumTrustedDomainsEx(pipes_struct *p)
+static bool api_lsa_EnumTrustedDomainsEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CreateTrustedDomainEx(pipes_struct *p)
+static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CloseTrustedDomainEx(pipes_struct *p)
+static bool api_lsa_CloseTrustedDomainEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_QueryDomainInformationPolicy(pipes_struct *p)
+static bool api_lsa_QueryDomainInformationPolicy(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_SetDomainInformationPolicy(pipes_struct *p)
+static bool api_lsa_SetDomainInformationPolicy(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_OpenTrustedDomainByName(pipes_struct *p)
+static bool api_lsa_OpenTrustedDomainByName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_TestCall(pipes_struct *p)
+static bool api_lsa_TestCall(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupSids2(pipes_struct *p)
+static bool api_lsa_LookupSids2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupNames2(pipes_struct *p)
+static bool api_lsa_LookupNames2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CreateTrustedDomainEx2(pipes_struct *p)
+static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRWRITE(pipes_struct *p)
+static bool api_lsa_CREDRWRITE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRREAD(pipes_struct *p)
+static bool api_lsa_CREDRREAD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRENUMERATE(pipes_struct *p)
+static bool api_lsa_CREDRENUMERATE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p)
+static bool api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p)
+static bool api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRDELETE(pipes_struct *p)
+static bool api_lsa_CREDRDELETE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRGETTARGETINFO(pipes_struct *p)
+static bool api_lsa_CREDRGETTARGETINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRPROFILELOADED(pipes_struct *p)
+static bool api_lsa_CREDRPROFILELOADED(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupNames3(pipes_struct *p)
+static bool api_lsa_LookupNames3(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p)
+static bool api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p)
+static bool api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARGENAUDITEVENT(pipes_struct *p)
+static bool api_lsa_LSARGENAUDITEVENT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p)
+static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p)
+static bool api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p)
+static bool api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_CREDRRENAME(pipes_struct *p)
+static bool api_lsa_CREDRRENAME(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupSids3(pipes_struct *p)
+static bool api_lsa_LookupSids3(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LookupNames4(pipes_struct *p)
+static bool api_lsa_LookupNames4(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSAROPENPOLICYSCE(pipes_struct *p)
+static bool api_lsa_LSAROPENPOLICYSCE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
+static bool api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
+static bool api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p)
+static bool api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_netlogon.h"
-static BOOL api_netr_LogonUasLogon(pipes_struct *p)
+static bool api_netr_LogonUasLogon(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonUasLogoff(pipes_struct *p)
+static bool api_netr_LogonUasLogoff(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonSamLogon(pipes_struct *p)
+static bool api_netr_LogonSamLogon(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonSamLogoff(pipes_struct *p)
+static bool api_netr_LogonSamLogoff(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_ServerReqChallenge(pipes_struct *p)
+static bool api_netr_ServerReqChallenge(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_ServerAuthenticate(pipes_struct *p)
+static bool api_netr_ServerAuthenticate(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_ServerPasswordSet(pipes_struct *p)
+static bool api_netr_ServerPasswordSet(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DatabaseDeltas(pipes_struct *p)
+static bool api_netr_DatabaseDeltas(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DatabaseSync(pipes_struct *p)
+static bool api_netr_DatabaseSync(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_AccountDeltas(pipes_struct *p)
+static bool api_netr_AccountDeltas(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_AccountSync(pipes_struct *p)
+static bool api_netr_AccountSync(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_GetDcName(pipes_struct *p)
+static bool api_netr_GetDcName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonControl(pipes_struct *p)
+static bool api_netr_LogonControl(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_GetAnyDCName(pipes_struct *p)
+static bool api_netr_GetAnyDCName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonControl2(pipes_struct *p)
+static bool api_netr_LogonControl2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_ServerAuthenticate2(pipes_struct *p)
+static bool api_netr_ServerAuthenticate2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DatabaseSync2(pipes_struct *p)
+static bool api_netr_DatabaseSync2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DatabaseRedo(pipes_struct *p)
+static bool api_netr_DatabaseRedo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonControl2Ex(pipes_struct *p)
+static bool api_netr_LogonControl2Ex(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p)
+static bool api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DsRGetDCName(pipes_struct *p)
+static bool api_netr_DsRGetDCName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
+static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p)
+static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p)
+static bool api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p)
+static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p)
+static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_ServerAuthenticate3(pipes_struct *p)
+static bool api_netr_ServerAuthenticate3(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DsRGetDCNameEx(pipes_struct *p)
+static bool api_netr_DsRGetDCNameEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DsRGetSiteName(pipes_struct *p)
+static bool api_netr_DsRGetSiteName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonGetDomainInfo(pipes_struct *p)
+static bool api_netr_LogonGetDomainInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_ServerPasswordSet2(pipes_struct *p)
+static bool api_netr_ServerPasswordSet2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRSERVERPASSWORDGET(pipes_struct *p)
+static bool api_netr_NETRSERVERPASSWORDGET(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONSENDTOSAM(pipes_struct *p)
+static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p)
+static bool api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DsRGetDCNameEx2(pipes_struct *p)
+static bool api_netr_DsRGetDCNameEx2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p)
+static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p)
+static bool api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p)
+static bool api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p)
+static bool api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonSamLogonEx(pipes_struct *p)
+static bool api_netr_LogonSamLogonEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DsrEnumerateDomainTrusts(pipes_struct *p)
+static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p)
+static bool api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p)
+static bool api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p)
+static bool api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p)
+static bool api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_LogonSamLogonWithFlags(pipes_struct *p)
+static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p)
+static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_srvsvc.h"
-static BOOL api_srvsvc_NetCharDevEnum(pipes_struct *p)
+static bool api_srvsvc_NetCharDevEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevGetInfo(pipes_struct *p)
+static bool api_srvsvc_NetCharDevGetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevControl(pipes_struct *p)
+static bool api_srvsvc_NetCharDevControl(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevQEnum(pipes_struct *p)
+static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevQGetInfo(pipes_struct *p)
+static bool api_srvsvc_NetCharDevQGetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevQSetInfo(pipes_struct *p)
+static bool api_srvsvc_NetCharDevQSetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevQPurge(pipes_struct *p)
+static bool api_srvsvc_NetCharDevQPurge(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p)
+static bool api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetConnEnum(pipes_struct *p)
+static bool api_srvsvc_NetConnEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetFileEnum(pipes_struct *p)
+static bool api_srvsvc_NetFileEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetFileGetInfo(pipes_struct *p)
+static bool api_srvsvc_NetFileGetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetFileClose(pipes_struct *p)
+static bool api_srvsvc_NetFileClose(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetSessEnum(pipes_struct *p)
+static bool api_srvsvc_NetSessEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetSessDel(pipes_struct *p)
+static bool api_srvsvc_NetSessDel(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareAdd(pipes_struct *p)
+static bool api_srvsvc_NetShareAdd(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareEnumAll(pipes_struct *p)
+static bool api_srvsvc_NetShareEnumAll(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareGetInfo(pipes_struct *p)
+static bool api_srvsvc_NetShareGetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareSetInfo(pipes_struct *p)
+static bool api_srvsvc_NetShareSetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareDel(pipes_struct *p)
+static bool api_srvsvc_NetShareDel(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareDelSticky(pipes_struct *p)
+static bool api_srvsvc_NetShareDelSticky(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareCheck(pipes_struct *p)
+static bool api_srvsvc_NetShareCheck(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetSrvGetInfo(pipes_struct *p)
+static bool api_srvsvc_NetSrvGetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetSrvSetInfo(pipes_struct *p)
+static bool api_srvsvc_NetSrvSetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetDiskEnum(pipes_struct *p)
+static bool api_srvsvc_NetDiskEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetServerStatisticsGet(pipes_struct *p)
+static bool api_srvsvc_NetServerStatisticsGet(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetTransportAdd(pipes_struct *p)
+static bool api_srvsvc_NetTransportAdd(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetTransportEnum(pipes_struct *p)
+static bool api_srvsvc_NetTransportEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetTransportDel(pipes_struct *p)
+static bool api_srvsvc_NetTransportDel(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetRemoteTOD(pipes_struct *p)
+static bool api_srvsvc_NetRemoteTOD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetSetServiceBits(pipes_struct *p)
+static bool api_srvsvc_NetSetServiceBits(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetPathType(pipes_struct *p)
+static bool api_srvsvc_NetPathType(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetPathCanonicalize(pipes_struct *p)
+static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetPathCompare(pipes_struct *p)
+static bool api_srvsvc_NetPathCompare(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetNameValidate(pipes_struct *p)
+static bool api_srvsvc_NetNameValidate(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p)
+static bool api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetPRNameCompare(pipes_struct *p)
+static bool api_srvsvc_NetPRNameCompare(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareEnum(pipes_struct *p)
+static bool api_srvsvc_NetShareEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareDelStart(pipes_struct *p)
+static bool api_srvsvc_NetShareDelStart(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetShareDelCommit(pipes_struct *p)
+static bool api_srvsvc_NetShareDelCommit(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetGetFileSecurity(pipes_struct *p)
+static bool api_srvsvc_NetGetFileSecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetSetFileSecurity(pipes_struct *p)
+static bool api_srvsvc_NetSetFileSecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetServerTransportAddEx(pipes_struct *p)
+static bool api_srvsvc_NetServerTransportAddEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p)
+static bool api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSGETVERSION(pipes_struct *p)
+static bool api_srvsvc_NETRDFSGETVERSION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p)
+static bool api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p)
+static bool api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p)
+static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p)
+static bool api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p)
+static bool api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p)
+static bool api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p)
+static bool api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p)
+static bool api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p)
+static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p)
+static bool api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_svcctl.h"
-static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p)
+static bool api_svcctl_CloseServiceHandle(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_ControlService(pipes_struct *p)
+static bool api_svcctl_ControlService(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_DeleteService(pipes_struct *p)
+static bool api_svcctl_DeleteService(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p)
+static bool api_svcctl_LockServiceDatabase(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p)
+static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p)
+static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p)
+static bool api_svcctl_QueryServiceStatus(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_SetServiceStatus(pipes_struct *p)
+static bool api_svcctl_SetServiceStatus(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p)
+static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p)
+static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p)
+static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p)
+static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_CreateServiceW(pipes_struct *p)
+static bool api_svcctl_CreateServiceW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p)
+static bool api_svcctl_EnumDependentServicesW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p)
+static bool api_svcctl_EnumServicesStatusW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p)
+static bool api_svcctl_OpenSCManagerW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_OpenServiceW(pipes_struct *p)
+static bool api_svcctl_OpenServiceW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p)
+static bool api_svcctl_QueryServiceConfigW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p)
+static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_StartServiceW(pipes_struct *p)
+static bool api_svcctl_StartServiceW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p)
+static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p)
+static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p)
+static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p)
+static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_CreateServiceA(pipes_struct *p)
+static bool api_svcctl_CreateServiceA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p)
+static bool api_svcctl_EnumDependentServicesA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p)
+static bool api_svcctl_EnumServicesStatusA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p)
+static bool api_svcctl_OpenSCManagerA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_OpenServiceA(pipes_struct *p)
+static bool api_svcctl_OpenServiceA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p)
+static bool api_svcctl_QueryServiceConfigA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p)
+static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_StartServiceA(pipes_struct *p)
+static bool api_svcctl_StartServiceA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p)
+static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p)
+static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p)
+static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p)
+static bool api_svcctl_EnumServiceGroupW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p)
+static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p)
+static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p)
+static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p)
+static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p)
+static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_EnumServicesStatusExA(pipes_struct *p)
+static bool api_EnumServicesStatusExA(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_EnumServicesStatusExW(pipes_struct *p)
+static bool api_EnumServicesStatusExW(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p)
+static bool api_svcctl_SCSendTSMessage(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_unixinfo.h"
-static BOOL api_unixinfo_SidToUid(pipes_struct *p)
+static bool api_unixinfo_SidToUid(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_unixinfo_UidToSid(pipes_struct *p)
+static bool api_unixinfo_UidToSid(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_unixinfo_SidToGid(pipes_struct *p)
+static bool api_unixinfo_SidToGid(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_unixinfo_GidToSid(pipes_struct *p)
+static bool api_unixinfo_GidToSid(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_unixinfo_GetPWUid(pipes_struct *p)
+static bool api_unixinfo_GetPWUid(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_winreg.h"
-static BOOL api_winreg_OpenHKCR(pipes_struct *p)
+static bool api_winreg_OpenHKCR(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKCU(pipes_struct *p)
+static bool api_winreg_OpenHKCU(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKLM(pipes_struct *p)
+static bool api_winreg_OpenHKLM(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKPD(pipes_struct *p)
+static bool api_winreg_OpenHKPD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKU(pipes_struct *p)
+static bool api_winreg_OpenHKU(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_CloseKey(pipes_struct *p)
+static bool api_winreg_CloseKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_CreateKey(pipes_struct *p)
+static bool api_winreg_CreateKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_DeleteKey(pipes_struct *p)
+static bool api_winreg_DeleteKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_DeleteValue(pipes_struct *p)
+static bool api_winreg_DeleteValue(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_EnumKey(pipes_struct *p)
+static bool api_winreg_EnumKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_EnumValue(pipes_struct *p)
+static bool api_winreg_EnumValue(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_FlushKey(pipes_struct *p)
+static bool api_winreg_FlushKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_GetKeySecurity(pipes_struct *p)
+static bool api_winreg_GetKeySecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_LoadKey(pipes_struct *p)
+static bool api_winreg_LoadKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_NotifyChangeKeyValue(pipes_struct *p)
+static bool api_winreg_NotifyChangeKeyValue(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenKey(pipes_struct *p)
+static bool api_winreg_OpenKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_QueryInfoKey(pipes_struct *p)
+static bool api_winreg_QueryInfoKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_QueryValue(pipes_struct *p)
+static bool api_winreg_QueryValue(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_ReplaceKey(pipes_struct *p)
+static bool api_winreg_ReplaceKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_RestoreKey(pipes_struct *p)
+static bool api_winreg_RestoreKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_SaveKey(pipes_struct *p)
+static bool api_winreg_SaveKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_SetKeySecurity(pipes_struct *p)
+static bool api_winreg_SetKeySecurity(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_SetValue(pipes_struct *p)
+static bool api_winreg_SetValue(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_UnLoadKey(pipes_struct *p)
+static bool api_winreg_UnLoadKey(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_InitiateSystemShutdown(pipes_struct *p)
+static bool api_winreg_InitiateSystemShutdown(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_AbortSystemShutdown(pipes_struct *p)
+static bool api_winreg_AbortSystemShutdown(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_GetVersion(pipes_struct *p)
+static bool api_winreg_GetVersion(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKCC(pipes_struct *p)
+static bool api_winreg_OpenHKCC(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKDD(pipes_struct *p)
+static bool api_winreg_OpenHKDD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_QueryMultipleValues(pipes_struct *p)
+static bool api_winreg_QueryMultipleValues(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_InitiateSystemShutdownEx(pipes_struct *p)
+static bool api_winreg_InitiateSystemShutdownEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_SaveKeyEx(pipes_struct *p)
+static bool api_winreg_SaveKeyEx(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKPT(pipes_struct *p)
+static bool api_winreg_OpenHKPT(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_OpenHKPN(pipes_struct *p)
+static bool api_winreg_OpenHKPN(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_winreg_QueryMultipleValues2(pipes_struct *p)
+static bool api_winreg_QueryMultipleValues2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
#include "includes.h"
#include "librpc/gen_ndr/srv_wkssvc.h"
-static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
+static bool api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
+static bool api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
+static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
+static bool api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
+static bool api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
+static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
+static bool api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
+static bool api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRUSEADD(pipes_struct *p)
+static bool api_WKSSVC_NETRUSEADD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
+static bool api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRUSEDEL(pipes_struct *p)
+static bool api_WKSSVC_NETRUSEDEL(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRUSEENUM(pipes_struct *p)
+static bool api_WKSSVC_NETRUSEENUM(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
+static bool api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
+static bool api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
+static bool api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
+static bool api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
+static bool api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
+static bool api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
+static bool api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
+static bool api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
+static bool api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
+static bool api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetrJoinDomain2(pipes_struct *p)
+static bool api_wkssvc_NetrJoinDomain2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
+static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
+static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
+static bool api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
+static bool api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
+static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
+static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
+static bool api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
return True;
}
-static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
+static bool api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
ndr_push_flags_fn_t ndr_push;
ndr_pull_flags_fn_t ndr_pull;
ndr_print_function_t ndr_print;
- BOOL async;
+ bool async;
};
struct ndr_interface_string_array {
retrieve a token from a ndr context, using cmp_fn to match the tokens
*/
NTSTATUS ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
- comparison_fn_t _cmp_fn, BOOL _remove_tok)
+ comparison_fn_t _cmp_fn, bool _remove_tok)
{
struct ndr_token_list *tok;
for (tok=*list;tok;tok=tok->next) {
* see if a range of memory is all zero. A NULL pointer is considered
* to be all zero
*/
-BOOL all_zero(const uint8_t *ptr, size_t size)
+bool all_zero(const uint8_t *ptr, size_t size)
{
int i;
if (!ptr) return True;
}
-BOOL GUID_all_zero(const struct GUID *u)
+bool GUID_all_zero(const struct GUID *u)
{
if (u->time_low != 0 ||
u->time_mid != 0 ||
return True;
}
-BOOL GUID_equal(const struct GUID *u1, const struct GUID *u2)
+bool GUID_equal(const struct GUID *u1, const struct GUID *u2)
{
if (u1->time_low != u2->time_low ||
u1->time_mid != u2->time_mid ||
ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));
}
-BOOL policy_handle_empty(struct policy_handle *h)
+bool policy_handle_empty(struct policy_handle *h)
{
return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
}
}
/* write to the ASN1 buffer, advancing the buffer pointer */
-BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
+bool asn1_write(ASN1_DATA *data, const void *p, int len)
{
if (data->has_error) return False;
if (data->length < data->ofs+len) {
}
/* useful fn for writing a uint8 */
-BOOL asn1_write_uint8(ASN1_DATA *data, uint8 v)
+bool asn1_write_uint8(ASN1_DATA *data, uint8 v)
{
return asn1_write(data, &v, 1);
}
/* push a tag onto the asn1 data buffer. Used for nested structures */
-BOOL asn1_push_tag(ASN1_DATA *data, uint8 tag)
+bool asn1_push_tag(ASN1_DATA *data, uint8 tag)
{
struct nesting *nesting;
}
/* pop a tag */
-BOOL asn1_pop_tag(ASN1_DATA *data)
+bool asn1_pop_tag(ASN1_DATA *data)
{
struct nesting *nesting;
size_t len;
/* write an integer */
-BOOL asn1_write_Integer(ASN1_DATA *data, int i)
+bool asn1_write_Integer(ASN1_DATA *data, int i)
{
if (!asn1_push_tag(data, ASN1_INTEGER)) return False;
do {
}
/* write an object ID to a ASN1 buffer */
-BOOL asn1_write_OID(ASN1_DATA *data, const char *OID)
+bool asn1_write_OID(ASN1_DATA *data, const char *OID)
{
unsigned v, v2;
const char *p = (const char *)OID;
}
/* write an octet string */
-BOOL asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
+bool asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
{
asn1_push_tag(data, ASN1_OCTET_STRING);
asn1_write(data, p, length);
}
/* write a general string */
-BOOL asn1_write_GeneralString(ASN1_DATA *data, const char *s)
+bool asn1_write_GeneralString(ASN1_DATA *data, const char *s)
{
asn1_push_tag(data, ASN1_GENERAL_STRING);
asn1_write(data, s, strlen(s));
}
/* write a BOOLEAN */
-BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
+bool asn1_write_BOOLEAN(ASN1_DATA *data, bool v)
{
asn1_write_uint8(data, ASN1_BOOLEAN);
asn1_write_uint8(data, v);
/* write a BOOLEAN - hmm, I suspect this one is the correct one, and the
above boolean is bogus. Need to check */
-BOOL asn1_write_BOOLEAN2(ASN1_DATA *data, BOOL v)
+bool asn1_write_BOOLEAN2(ASN1_DATA *data, bool v)
{
asn1_push_tag(data, ASN1_BOOLEAN);
asn1_write_uint8(data, v);
}
/* check a BOOLEAN */
-BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
+bool asn1_check_BOOLEAN(ASN1_DATA *data, bool v)
{
uint8 b = 0;
/* load a ASN1_DATA structure with a lump of data, ready to be parsed */
-BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob)
+bool asn1_load(ASN1_DATA *data, DATA_BLOB blob)
{
ZERO_STRUCTP(data);
data->data = (unsigned char *)memdup(blob.data, blob.length);
}
/* read from a ASN1 buffer, advancing the buffer pointer */
-BOOL asn1_read(ASN1_DATA *data, void *p, int len)
+bool asn1_read(ASN1_DATA *data, void *p, int len)
{
if (data->has_error)
return False;
}
/* read a uint8 from a ASN1 buffer */
-BOOL asn1_read_uint8(ASN1_DATA *data, uint8 *v)
+bool asn1_read_uint8(ASN1_DATA *data, uint8 *v)
{
return asn1_read(data, v, 1);
}
/* start reading a nested asn1 structure */
-BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag)
+bool asn1_start_tag(ASN1_DATA *data, uint8 tag)
{
uint8 b;
struct nesting *nesting;
/* stop reading a tag */
-BOOL asn1_end_tag(ASN1_DATA *data)
+bool asn1_end_tag(ASN1_DATA *data)
{
struct nesting *nesting;
}
/* read an object ID from a ASN1 buffer */
-BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
+bool asn1_read_OID(ASN1_DATA *data, char **OID)
{
uint8 b;
pstring oid_str;
}
/* check that the next object ID is correct */
-BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
+bool asn1_check_OID(ASN1_DATA *data, const char *OID)
{
char *id;
}
/* read a GeneralString from a ASN1 buffer */
-BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s)
+bool asn1_read_GeneralString(ASN1_DATA *data, char **s)
{
int len;
char *str;
}
/* read a octet string blob */
-BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
+bool asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
{
int len;
ZERO_STRUCTP(blob);
}
/* read an interger */
-BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
+bool asn1_read_Integer(ASN1_DATA *data, int *i)
{
uint8 b;
*i = 0;
}
/* check a enumarted value is correct */
-BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
+bool asn1_check_enumerated(ASN1_DATA *data, int v)
{
uint8 b;
if (!asn1_start_tag(data, ASN1_ENUMERATED)) return False;
}
/* write an enumarted value to the stream */
-BOOL asn1_write_enumerated(ASN1_DATA *data, uint8 v)
+bool asn1_write_enumerated(ASN1_DATA *data, uint8 v)
{
if (!asn1_push_tag(data, ASN1_ENUMERATED)) return False;
asn1_write_uint8(data, v);
Send a extended security session setup blob
****************************************************************************/
-static BOOL cli_session_setup_blob_send(struct cli_state *cli, DATA_BLOB blob)
+static bool cli_session_setup_blob_send(struct cli_state *cli, DATA_BLOB blob)
{
uint32 capabilities = cli_session_setup_capabilities(cli);
char *p;
#define BASE_SESSSETUP_BLOB_PACKET_SIZE (35 + 24 + 22)
-static BOOL cli_session_setup_blob(struct cli_state *cli, DATA_BLOB blob, DATA_BLOB session_key_krb5)
+static bool cli_session_setup_blob(struct cli_state *cli, DATA_BLOB blob, DATA_BLOB session_key_krb5)
{
int32 remaining = blob.length;
int32 cur = 0;
DATA_BLOB key = data_blob(ntlmssp_state->session_key.data,
ntlmssp_state->session_key.length);
DATA_BLOB null_blob = data_blob_null;
- BOOL res;
+ bool res;
fstrcpy(cli->server_domain, ntlmssp_state->server_domain);
cli_set_session_key(cli, ntlmssp_state->session_key);
char *principal;
char *OIDs[ASN1_MAX_OIDS];
int i;
- BOOL got_kerberos_mechanism = False;
+ bool got_kerberos_mechanism = False;
DATA_BLOB blob;
DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length));
Send a uloggoff.
*****************************************************************************/
-BOOL cli_ulogoff(struct cli_state *cli)
+bool cli_ulogoff(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
set_message(cli->outbuf,2,0,True);
Send a tconX.
****************************************************************************/
-BOOL cli_send_tconX(struct cli_state *cli,
+bool cli_send_tconX(struct cli_state *cli,
const char *share, const char *dev, const char *pass, int passlen)
{
fstring fullshare, pword;
Send a tree disconnect.
****************************************************************************/
-BOOL cli_tdis(struct cli_state *cli)
+bool cli_tdis(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
set_message(cli->outbuf,0,0,True);
Send a negprot command.
****************************************************************************/
-BOOL cli_negprot(struct cli_state *cli)
+bool cli_negprot(struct cli_state *cli)
{
char *p;
int numprots;
Send a session request. See rfc1002.txt 4.3 and 4.3.2.
****************************************************************************/
-BOOL cli_session_request(struct cli_state *cli,
+bool cli_session_request(struct cli_state *cli,
struct nmb_name *calling, struct nmb_name *called)
{
char *p;
/* Try again */
{
static int depth;
- BOOL ret;
+ bool ret;
if (depth > 4) {
DEBUG(0,("Retarget recursion - failing\n"));
return False;
@param dest_host The netbios name of the remote host
@param dest_ip (optional) The the destination IP, NULL for name based lookup
@param port (optional) The destination port (0 for default)
- @param retry BOOL. Did this connection fail with a retryable error ?
+ @param retry bool. Did this connection fail with a retryable error ?
*/
NTSTATUS cli_start_connection(struct cli_state **output_cli,
const char *dest_host,
struct in_addr *dest_ip, int port,
int signing_state, int flags,
- BOOL *retry)
+ bool *retry)
{
NTSTATUS nt_status;
struct nmb_name calling;
@param user Username, unix string
@param domain User's domain
@param password User's password, unencrypted unix string.
- @param retry BOOL. Did this connection fail with a retryable error ?
+ @param retry bool. Did this connection fail with a retryable error ?
*/
NTSTATUS cli_full_connection(struct cli_state **output_cli,
const char *user, const char *domain,
const char *password, int flags,
int signing_state,
- BOOL *retry)
+ bool *retry)
{
NTSTATUS nt_status;
struct cli_state *cli = NULL;
Attempt a NetBIOS session request, falling back to *SMBSERVER if needed.
****************************************************************************/
-BOOL attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
+bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
struct in_addr *pdest_ip)
{
struct nmb_name calling, called;
static pstring username;
static pstring password;
-static BOOL use_kerberos;
-static BOOL got_pass;
+static bool use_kerberos;
+static bool got_pass;
static int signing_state;
int max_protocol = PROTOCOL_NT1;
static int port;
static int name_type = 0x20;
-static BOOL have_ip;
+static bool have_ip;
static struct in_addr dest_ip;
static struct client_connection *connections;
********************************************************************/
static struct cli_state *do_connect( const char *server, const char *share,
- BOOL show_sessetup )
+ bool show_sessetup )
{
struct cli_state *c = NULL;
struct nmb_name called, calling;
static struct cli_state *cli_cm_connect( const char *server,
const char *share,
- BOOL show_hdr)
+ bool show_hdr)
{
struct client_connection *node;
struct cli_state *cli_cm_open(const char *server,
const char *share,
- BOOL show_hdr)
+ bool show_hdr)
{
struct cli_state *c;
check for dfs referral
********************************************************************/
-static BOOL cli_dfs_check_error( struct cli_state *cli, NTSTATUS status )
+static bool cli_dfs_check_error( struct cli_state *cli, NTSTATUS status )
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
get the dfs referral link
********************************************************************/
-BOOL cli_dfs_get_referral( struct cli_state *cli,
+bool cli_dfs_get_referral( struct cli_state *cli,
const char *path,
CLIENT_DFS_REFERRAL**refs,
size_t *num_refs,
/********************************************************************
********************************************************************/
-BOOL cli_resolve_path( const char *mountpt,
+bool cli_resolve_path( const char *mountpt,
struct cli_state *rootcli,
const char *path,
struct cli_state **targetcli,
/********************************************************************
********************************************************************/
-BOOL cli_check_msdfs_proxy( struct cli_state *cli, const char *sharename,
+bool cli_check_msdfs_proxy( struct cli_state *cli, const char *sharename,
fstring newserver, fstring newshare )
{
CLIENT_DFS_REFERRAL *refs = NULL;
size_t num_refs;
uint16 consumed;
pstring fullpath;
- BOOL res;
+ bool res;
uint16 cnum;
pstring newextrapath;
* cli_send_mailslot, send a mailslot for client code ...
*/
-BOOL cli_send_mailslot(struct messaging_context *msg_ctx,
- BOOL unique, const char *mailslot,
+bool cli_send_mailslot(struct messaging_context *msg_ctx,
+ bool unique, const char *mailslot,
uint16 priority,
char *buf, int len,
const char *srcname, int src_type,
/*
* cli_get_response: Get a response ...
*/
-BOOL cli_get_response(const char *mailslot, char *buf, int bufsiz)
+bool cli_get_response(const char *mailslot, char *buf, int bufsiz)
{
struct packet_struct *p;
Recv an smb.
****************************************************************************/
-BOOL cli_receive_smb(struct cli_state *cli)
+bool cli_receive_smb(struct cli_state *cli)
{
ssize_t len;
Read a smb readX header.
****************************************************************************/
-BOOL cli_receive_smb_readX_header(struct cli_state *cli)
+bool cli_receive_smb_readX_header(struct cli_state *cli)
{
ssize_t len, offset;
Send an smb to a fd.
****************************************************************************/
-BOOL cli_send_smb(struct cli_state *cli)
+bool cli_send_smb(struct cli_state *cli)
{
size_t len;
size_t nwritten=0;
Returns False if the cli_close call failed.
****************************************************************************/
-BOOL cli_rpc_pipe_close(struct rpc_pipe_client *cli)
+bool cli_rpc_pipe_close(struct rpc_pipe_client *cli)
{
- BOOL ret;
+ bool ret;
if (!cli) {
return False;
Set the case sensitivity flag on the packets. Returns old state.
****************************************************************************/
-BOOL cli_set_case_sensitive(struct cli_state *cli, BOOL case_sensitive)
+bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
{
- BOOL ret = cli->case_sensitive;
+ bool ret = cli->case_sensitive;
cli->case_sensitive = case_sensitive;
return ret;
}
Send a keepalive packet to the server
****************************************************************************/
-BOOL cli_send_keepalive(struct cli_state *cli)
+bool cli_send_keepalive(struct cli_state *cli)
{
if (cli->fd == -1) {
DEBUG(3, ("cli_send_keepalive: fd == -1\n"));
Send/receive a SMBecho command: ping the server
****************************************************************************/
-BOOL cli_echo(struct cli_state *cli, uint16 num_echos,
+bool cli_echo(struct cli_state *cli, uint16 num_echos,
unsigned char *data, size_t length)
{
char *p;
/* Return true if the last packet was in error */
-BOOL cli_is_error(struct cli_state *cli)
+bool cli_is_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), rcls = 0;
/* Return true if the last error was an NT error */
-BOOL cli_is_nt_error(struct cli_state *cli)
+bool cli_is_nt_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
/* Return true if the last error was a DOS error */
-BOOL cli_is_dos_error(struct cli_state *cli)
+bool cli_is_dos_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
Creates new name (sym)linked to oldname.
****************************************************************************/
-static BOOL cli_link_internal(struct cli_state *cli, const char *oldname, const char *newname, BOOL hard_link)
+static bool cli_link_internal(struct cli_state *cli, const char *oldname, const char *newname, bool hard_link)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
Do a POSIX getfacl (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf)
+bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf)
{
unsigned int param_len = 0;
unsigned int data_len = 0;
Stat a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf)
+bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf)
{
unsigned int param_len = 0;
unsigned int data_len = 0;
Symlink a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname)
+bool cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname)
{
return cli_link_internal(cli, oldname, newname, False);
}
Hard a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname)
+bool cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname)
{
return cli_link_internal(cli, oldname, newname, True);
}
Chmod or chown a file internal (UNIX extensions).
****************************************************************************/
-static BOOL cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fname, uint32 mode, uint32 uid, uint32 gid)
+static bool cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fname, uint32 mode, uint32 uid, uint32 gid)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
chmod a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
+bool cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
{
return cli_unix_chmod_chown_internal(cli, fname,
unix_perms_to_wire(mode), SMB_UID_NO_CHANGE, SMB_GID_NO_CHANGE);
chown a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid)
+bool cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid)
{
return cli_unix_chmod_chown_internal(cli, fname, SMB_MODE_NO_CHANGE, (uint32)uid, (uint32)gid);
}
Rename a file.
****************************************************************************/
-BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
+bool cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
char *p;
NT Rename a file.
****************************************************************************/
-BOOL cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
+bool cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
char *p;
NT hardlink a file.
****************************************************************************/
-BOOL cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst)
+bool cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
char *p;
Delete a file.
****************************************************************************/
-BOOL cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs)
+bool cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs)
{
char *p;
Delete a file.
****************************************************************************/
-BOOL cli_unlink(struct cli_state *cli, const char *fname)
+bool cli_unlink(struct cli_state *cli, const char *fname)
{
return cli_unlink_full(cli, fname, aSYSTEM | aHIDDEN);
}
Create a directory.
****************************************************************************/
-BOOL cli_mkdir(struct cli_state *cli, const char *dname)
+bool cli_mkdir(struct cli_state *cli, const char *dname)
{
char *p;
Remove a directory.
****************************************************************************/
-BOOL cli_rmdir(struct cli_state *cli, const char *dname)
+bool cli_rmdir(struct cli_state *cli, const char *dname)
{
char *p;
Set or clear the delete on close flag.
****************************************************************************/
-int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag)
+int cli_nt_delete_on_close(struct cli_state *cli, int fnum, bool flag)
{
unsigned int data_len = 1;
unsigned int param_len = 6;
Close a file.
****************************************************************************/
-BOOL cli_close(struct cli_state *cli, int fnum)
+bool cli_close(struct cli_state *cli, int fnum)
{
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
note that timeout is in units of 2 milliseconds
****************************************************************************/
-BOOL cli_lock(struct cli_state *cli, int fnum,
+bool cli_lock(struct cli_state *cli, int fnum,
uint32 offset, uint32 len, int timeout, enum brl_type lock_type)
{
char *p;
Unlock a file.
****************************************************************************/
-BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
+bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
{
char *p;
Lock a file with 64 bit offsets.
****************************************************************************/
-BOOL cli_lock64(struct cli_state *cli, int fnum,
+bool cli_lock64(struct cli_state *cli, int fnum,
SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type)
{
char *p;
Unlock a file with 64 bit offsets.
****************************************************************************/
-BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
+bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
{
char *p;
Get/unlock a POSIX lock on a file - internal function.
****************************************************************************/
-static BOOL cli_posix_lock_internal(struct cli_state *cli, int fnum,
- SMB_BIG_UINT offset, SMB_BIG_UINT len, BOOL wait_lock, enum brl_type lock_type)
+static bool cli_posix_lock_internal(struct cli_state *cli, int fnum,
+ SMB_BIG_UINT offset, SMB_BIG_UINT len, bool wait_lock, enum brl_type lock_type)
{
unsigned int param_len = 4;
unsigned int data_len = POSIX_LOCK_DATA_SIZE;
POSIX Lock a file.
****************************************************************************/
-BOOL cli_posix_lock(struct cli_state *cli, int fnum,
+bool cli_posix_lock(struct cli_state *cli, int fnum,
SMB_BIG_UINT offset, SMB_BIG_UINT len,
- BOOL wait_lock, enum brl_type lock_type)
+ bool wait_lock, enum brl_type lock_type)
{
if (lock_type != READ_LOCK && lock_type != WRITE_LOCK) {
return False;
POSIX Unlock a file.
****************************************************************************/
-BOOL cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
+bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
{
return cli_posix_lock_internal(cli, fnum, offset, len, False, UNLOCK_LOCK);
}
POSIX Get any lock covering a file.
****************************************************************************/
-BOOL cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen)
+bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen)
{
return True;
}
Do a SMBgetattrE call.
****************************************************************************/
-BOOL cli_getattrE(struct cli_state *cli, int fd,
+bool cli_getattrE(struct cli_state *cli, int fd,
uint16 *attr, SMB_OFF_T *size,
time_t *change_time,
time_t *access_time,
Do a SMBgetatr call
****************************************************************************/
-BOOL cli_getatr(struct cli_state *cli, const char *fname,
+bool cli_getatr(struct cli_state *cli, const char *fname,
uint16 *attr, SMB_OFF_T *size, time_t *write_time)
{
char *p;
Do a SMBsetattrE call.
****************************************************************************/
-BOOL cli_setattrE(struct cli_state *cli, int fd,
+bool cli_setattrE(struct cli_state *cli, int fd,
time_t change_time,
time_t access_time,
time_t write_time)
Do a SMBsetatr call.
****************************************************************************/
-BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t)
+bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t)
{
char *p;
/****************************************************************************
Check for existance of a dir.
****************************************************************************/
-BOOL cli_chkpath(struct cli_state *cli, const char *path)
+bool cli_chkpath(struct cli_state *cli, const char *path)
{
pstring path2;
char *p;
Query disk space.
****************************************************************************/
-BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail)
+bool cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail)
{
memset(cli->outbuf,'\0',smb_size);
set_message(cli->outbuf,0,0,True);
Set an extended attribute utility fn.
*********************************************************/
-static BOOL cli_set_ea(struct cli_state *cli, uint16 setup, char *param, unsigned int param_len,
+static bool cli_set_ea(struct cli_state *cli, uint16 setup, char *param, unsigned int param_len,
const char *ea_name, const char *ea_val, size_t ea_len)
{
unsigned int data_len = 0;
Set an extended attribute on a pathname.
*********************************************************/
-BOOL cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len)
+bool cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len)
{
uint16 setup = TRANSACT2_SETPATHINFO;
unsigned int param_len = 0;
Set an extended attribute on an fnum.
*********************************************************/
-BOOL cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len)
+bool cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len)
{
char param[6];
uint16 setup = TRANSACT2_SETFILEINFO;
Get an extended attribute list tility fn.
*********************************************************/
-static BOOL cli_get_ea_list(struct cli_state *cli,
+static bool cli_get_ea_list(struct cli_state *cli,
uint16 setup, char *param, unsigned int param_len,
TALLOC_CTX *ctx,
size_t *pnum_eas,
char *p;
size_t ea_size;
size_t num_eas;
- BOOL ret = False;
+ bool ret = False;
struct ea_struct *ea_list;
*pnum_eas = 0;
Get an extended attribute list from a pathname.
*********************************************************/
-BOOL cli_get_ea_list_path(struct cli_state *cli, const char *path,
+bool cli_get_ea_list_path(struct cli_state *cli, const char *path,
TALLOC_CTX *ctx,
size_t *pnum_eas,
struct ea_struct **pea_list)
Get an extended attribute list from an fnum.
*********************************************************/
-BOOL cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
+bool cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
TALLOC_CTX *ctx,
size_t *pnum_eas,
struct ea_struct **pea_list)
Open a file - POSIX semantics. Returns fnum. Doesn't request oplock.
****************************************************************************/
-static int cli_posix_open_internal(struct cli_state *cli, const char *fname, int flags, mode_t mode, BOOL is_dir)
+static int cli_posix_open_internal(struct cli_state *cli, const char *fname, int flags, mode_t mode, bool is_dir)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
unlink or rmdir - POSIX semantics.
****************************************************************************/
-static BOOL cli_posix_unlink_internal(struct cli_state *cli, const char *fname, BOOL is_dir)
+static bool cli_posix_unlink_internal(struct cli_state *cli, const char *fname, bool is_dir)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
unlink - POSIX semantics.
****************************************************************************/
-BOOL cli_posix_unlink(struct cli_state *cli, const char *fname)
+bool cli_posix_unlink(struct cli_state *cli, const char *fname)
{
return cli_posix_unlink_internal(cli, fname, False);
}
Get UNIX extensions version info.
****************************************************************************/
-BOOL cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
+bool cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
uint32 *pcaplow, uint32 *pcaphigh)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
Set UNIX extensions capabilities.
****************************************************************************/
-BOOL cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
+bool cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
uint32 caplow, uint32 caphigh)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[4];
char data[12];
return ret;
}
-BOOL cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr)
+bool cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
return ret;
}
-BOOL cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number)
+bool cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
return ret;
}
-BOOL cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate)
+bool cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
}
#endif
-BOOL unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
+bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
DATA_BLOB *edata,
DATA_BLOB *edata_out)
{
}
-BOOL unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data)
+bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data)
{
DATA_BLOB pac_contents;
ASN1_DATA data;
return True;
}
- 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)
{
DATA_BLOB auth_data_wrapped;
- BOOL got_auth_data_pac = False;
+ bool got_auth_data_pac = False;
int i;
#if defined(HAVE_KRB5_TKT_ENC_PART2)
#endif
}
- BOOL kerberos_compatible_enctypes(krb5_context context,
+ bool kerberos_compatible_enctypes(krb5_context context,
krb5_enctype enctype1,
krb5_enctype enctype2)
{
#endif
}
-static BOOL ads_cleanup_expired_creds(krb5_context context,
+static bool ads_cleanup_expired_creds(krb5_context context,
krb5_ccache ccache,
krb5_creds *credsp)
{
krb5_creds * credsp;
krb5_creds creds;
krb5_data in_data;
- BOOL creds_ready = False;
+ bool creds_ready = False;
int i = 0, maxtries = 3;
retval = smb_krb5_parse_name(context, principal, &server);
return retval;
}
- 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_keyblock *skey;
krb5_error_code err;
- BOOL ret = False;
+ bool ret = False;
if (remote)
err = krb5_auth_con_getremotesubkey(context, auth_context, &skey);
return smb_krb5_parse_name(context, name, 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)
{
krb5_data *packet)
{
krb5_error_code ret;
- BOOL got_error_code = False;
+ bool got_error_code = False;
DEBUG(10,("handle_krberror_packet: got error packet\n"));
* allows to process non-default keytab names.
* @param context krb5_context
* @param keytab_name_req string
- * @param write_access BOOL if writable keytab is required
+ * @param write_access bool if writable keytab is required
* @param krb5_keytab pointer to krb5_keytab (close with krb5_kt_close())
* @return krb5_error_code
**********************************************************************/
krb5_error_code smb_krb5_open_keytab(krb5_context context,
const char *keytab_name_req,
- BOOL write_access,
+ bool write_access,
krb5_keytab *keytab)
{
krb5_error_code ret = 0;
TALLOC_CTX *mem_ctx;
char keytab_string[MAX_KEYTAB_NAME_LEN];
- BOOL found_valid_name = False;
+ bool found_valid_name = False;
const char *pragma = "FILE";
const char *tmp = NULL;
char *dirlist = NULL;
int dirlist_len = 0;
int total_received = -1;
- BOOL First = True;
+ bool First = True;
int ff_searchcount=0;
int ff_eos=0;
int ff_dir_handle=0;
{
char *p;
int received = 0;
- BOOL first = True;
+ bool first = True;
char status[21];
int num_asked = (cli->max_xmit - 100)/DIR_STRUCT_SIZE;
int num_received = 0;
return(PTR_DIFF(p, cli->outbuf));
}
-BOOL cli_message_start(struct cli_state *cli, char *host, char *username,
+bool cli_message_start(struct cli_state *cli, char *host, char *username,
int *grp)
{
cli_message_start_build(cli, host, username);
return(PTR_DIFF(p, cli->outbuf));
}
-BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp)
+bool cli_message_text(struct cli_state *cli, char *msg, int len, int grp)
{
cli_message_text_build(cli, msg, len, grp);
return(PTR_DIFF(p, cli->outbuf));
}
-BOOL cli_message_end(struct cli_state *cli, int grp)
+bool cli_message_end(struct cli_state *cli, int grp)
{
cli_message_end_build(cli, grp);
/****************************************************************************
send an ack for an oplock break request
****************************************************************************/
-BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
+bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
{
char *oldbuf = cli->outbuf;
pstring buf;
- BOOL ret;
+ bool ret;
cli->outbuf = buf;
set the oplock handler for a connection
****************************************************************************/
void cli_oplock_handler(struct cli_state *cli,
- BOOL (*handler)(struct cli_state *, int, unsigned char))
+ bool (*handler)(struct cli_state *, int, unsigned char))
{
cli->oplock_handler = handler;
}
Close a file.
****************************************************************************/
-BOOL cli_spl_close(struct cli_state *cli, int fnum)
+bool cli_spl_close(struct cli_state *cli, int fnum)
{
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
#include "includes.h"
-BOOL cli_get_quota_handle(struct cli_state *cli, int *quota_fnum)
+bool cli_get_quota_handle(struct cli_state *cli, int *quota_fnum)
{
*quota_fnum = cli_nt_create_full(cli, FAKE_FILE_NAME_QUOTA_WIN32,
0x00000016, DESIRED_ACCESS_PIPE,
return;
}
-static BOOL parse_user_quota_record(const char *rdata, unsigned int rdata_count, unsigned int *offset, SMB_NTQUOTA_STRUCT *pqt)
+static bool parse_user_quota_record(const char *rdata, unsigned int rdata_count, unsigned int *offset, SMB_NTQUOTA_STRUCT *pqt)
{
int sid_len;
SMB_NTQUOTA_STRUCT qt;
return True;
}
-BOOL cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char params[16];
unsigned int data_len;
return ret;
}
-BOOL cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char params[2];
char data[112];
return ret;
}
-BOOL cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list)
+bool cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char params[16];
char *rparam=NULL, *rdata=NULL;
return ret;
}
-BOOL cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
return ret;
}
-BOOL cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[4];
char data[48];
return ret;
}
-static char *quota_str_static(SMB_BIG_UINT val, BOOL special, BOOL _numeric)
+static char *quota_str_static(SMB_BIG_UINT val, bool special, bool _numeric)
{
static fstring buffer;
return buffer;
}
-void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, BOOL _verbose, BOOL _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, BOOL _numeric))
+void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric))
{
if (!qt) {
smb_panic("dump_ntquota() called with NULL pointer");
}
}
-void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, BOOL _verbose, BOOL _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, BOOL _numeric))
+void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric))
{
SMB_NTQUOTA_LIST *cur;
Call a remote api on an arbitrary pipe. takes param, data and setup buffers.
****************************************************************************/
-BOOL cli_api_pipe(struct cli_state *cli, const char *pipe_name,
+bool cli_api_pipe(struct cli_state *cli, const char *pipe_name,
uint16 *setup, uint32 setup_count, uint32 max_setup_count,
char *params, uint32 param_count, uint32 max_param_count,
char *data, uint32 data_count, uint32 max_data_count,
Call a remote api
****************************************************************************/
-BOOL cli_api(struct cli_state *cli,
+bool cli_api(struct cli_state *cli,
char *param, int prcnt, int mprcnt,
char *data, int drcnt, int mdrcnt,
char **rparam, unsigned int *rprcnt,
Perform a NetWkstaUserLogon.
****************************************************************************/
-BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
+bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
{
char *rparam = NULL;
char *rdata = NULL;
the comment and a state pointer.
****************************************************************************/
-BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
+bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
void (*fn)(const char *, uint32, const char *, void *),
void *state)
{
Send a SamOEMChangePassword command.
****************************************************************************/
-BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
+bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
const char *old_password)
{
pstring param;
Send a qpathinfo call.
****************************************************************************/
-BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
+bool cli_qpathinfo(struct cli_state *cli, const char *fname,
time_t *change_time,
time_t *access_time,
time_t *write_time,
pstring param;
char *rparam=NULL, *rdata=NULL;
int count=8;
- BOOL ret;
+ bool ret;
time_t (*date_fn)(struct cli_state *, void *);
char *p;
Send a setpathinfo call.
****************************************************************************/
-BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
+bool cli_setpathinfo(struct cli_state *cli, const char *fname,
time_t create_time,
time_t access_time,
time_t write_time,
pstring data;
char *rparam=NULL, *rdata=NULL;
int count=8;
- BOOL ret;
+ bool ret;
char *p;
memset(param, 0, sizeof(param));
Send a qpathinfo call with the SMB_QUERY_FILE_ALL_INFO info level.
****************************************************************************/
-BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname,
+bool cli_qpathinfo2(struct cli_state *cli, const char *fname,
struct timespec *create_time,
struct timespec *access_time,
struct timespec *write_time,
Send a qfileinfo QUERY_FILE_NAME_INFO call.
****************************************************************************/
-BOOL cli_qfilename(struct cli_state *cli, int fnum,
+bool cli_qfilename(struct cli_state *cli, int fnum,
pstring name)
{
unsigned int data_len = 0;
Send a qfileinfo call.
****************************************************************************/
-BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
+bool cli_qfileinfo(struct cli_state *cli, int fnum,
uint16 *mode, SMB_OFF_T *size,
struct timespec *create_time,
struct timespec *access_time,
Send a qpathinfo BASIC_INFO call.
****************************************************************************/
-BOOL cli_qpathinfo_basic( struct cli_state *cli, const char *name,
+bool cli_qpathinfo_basic( struct cli_state *cli, const char *name,
SMB_STRUCT_STAT *sbuf, uint32 *attributes )
{
unsigned int param_len = 0;
Send a qfileinfo call.
****************************************************************************/
-BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen)
+bool cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
char *rparam=NULL, *rdata=NULL;
int count=8;
char *p;
- BOOL ret;
+ bool ret;
unsigned int len;
p = param;
* False - failure
*
************************************************************************/
-BOOL cli_get_pdc_name(struct cli_state *cli, char *workgroup, char *pdc_name)
+bool cli_get_pdc_name(struct cli_state *cli, char *workgroup, char *pdc_name)
{
char *rparam = NULL;
char *rdata = NULL;
* Origins: samba 2.0.6 source/libsmb/clientgen.c cli_NetServerEnum()
*
************************************************************************/
-BOOL cli_get_server_domain(struct cli_state *cli)
+bool cli_get_server_domain(struct cli_state *cli)
{
char *rparam = NULL;
char *rdata = NULL;
* Origins: samba 2.0.6 source/libsmb/clientgen.c cli_NetServerEnum()
*
************************************************************************/
-BOOL cli_get_server_type(struct cli_state *cli, uint32 *pstype)
+bool cli_get_server_type(struct cli_state *cli, uint32 *pstype)
{
char *rparam = NULL;
char *rdata = NULL;
return(res == 0 || res == ERRmoredata);
}
-BOOL cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
char **servername)
{
char *rparam = NULL;
+sizeof(RAP_SERVER_INFO_L1) /* return string */
+WORDSIZE /* info level */
+WORDSIZE]; /* buffer size */
- BOOL res = False;
+ bool res = False;
fstring tmp;
/* send a SMBtrans command with api NetServerGetInfo */
* False - failure
*
************************************************************************/
-BOOL cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype)
+bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype)
{
char *rparam = NULL;
char *rdata = NULL;
+WORDSIZE /* buffer size */
+DWORDSIZE /* server type */
+RAP_MACHNAME_LEN]; /* workgroup */
- BOOL found_server = False;
+ bool found_server = False;
int res = -1;
/* send a SMBtrans command with api NetServerEnum */
/****************************************************************************
perform a NetWkstaUserLogoff
****************************************************************************/
-BOOL cli_NetWkstaUserLogoff(struct cli_state *cli,char *user, char *workstation)
+bool cli_NetWkstaUserLogoff(struct cli_state *cli,char *user, char *workstation)
{
char *rparam = NULL;
char *rdata = NULL;
Issue a single SMBread and don't wait for a reply.
****************************************************************************/
-static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
+static bool cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
size_t size, int i)
{
- BOOL bigoffset = False;
+ bool bigoffset = False;
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
size_t readsize;
ssize_t total = 0;
/* We can only do direct reads if not signing. */
- BOOL direct_reads = !client_is_signing_on(cli);
+ bool direct_reads = !client_is_signing_on(cli);
if (size == 0)
return 0;
errors. */
if (cli_is_error(cli)) {
- BOOL recoverable_error = False;
+ bool recoverable_error = False;
NTSTATUS status = NT_STATUS_OK;
uint8 eclass = 0;
uint32 ecode = 0;
Issue a single SMBreadraw and don't wait for a reply.
****************************************************************************/
-static BOOL cli_issue_readraw(struct cli_state *cli, int fnum, off_t offset,
+static bool cli_issue_readraw(struct cli_state *cli, int fnum, off_t offset,
size_t size, int i)
{
issue a single SMBwrite and don't wait for a reply
****************************************************************************/
-static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset,
+static bool cli_issue_write(struct cli_state *cli, int fnum, off_t offset,
uint16 mode, const char *buf,
size_t size, int i)
{
char *p;
- BOOL large_writex = False;
+ bool large_writex = False;
if (size > cli->bufsize) {
cli->outbuf = (char *)SMB_REALLOC(cli->outbuf, size + 1024);
char *rparam=NULL, *rdata=NULL;
unsigned int rparam_count=0, rdata_count=0;
prs_struct pd;
- BOOL pd_initialized = False;
+ bool pd_initialized = False;
SEC_DESC *psd = NULL;
SIVAL(param, 0, fnum);
/****************************************************************************
set the security descriptor for a open file
****************************************************************************/
-BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd)
+bool cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd)
{
char param[8];
char *rparam=NULL, *rdata=NULL;
uint32 sec_info = 0;
TALLOC_CTX *mem_ctx;
prs_struct pd;
- BOOL ret = False;
+ bool ret = False;
if ((mem_ctx = talloc_init("cli_set_secdesc")) == NULL) {
DEBUG(0,("talloc_init failed.\n"));
parse a negTokenInit packet giving a GUID, a list of supported
OIDs (the mechanisms) and a principal name string
*/
-BOOL spnego_parse_negTokenInit(DATA_BLOB blob,
+bool spnego_parse_negTokenInit(DATA_BLOB blob,
char *OIDs[ASN1_MAX_OIDS],
char **principal)
{
int i;
- BOOL ret;
+ bool ret;
ASN1_DATA data;
asn1_load(&data, blob);
/*
parse a negTokenTarg packet giving a list of OIDs and a security blob
*/
-BOOL parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob)
+bool parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob)
{
int i;
ASN1_DATA data;
/*
parse a krb5 GSS-API wrapper packet giving a ticket
*/
-BOOL spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2])
+bool spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2])
{
- BOOL ret;
+ bool ret;
ASN1_DATA data;
int data_remaining;
/*
parse a spnego NTLMSSP challenge packet giving two security blobs
*/
-BOOL spnego_parse_challenge(const DATA_BLOB blob,
+bool spnego_parse_challenge(const DATA_BLOB blob,
DATA_BLOB *chal1, DATA_BLOB *chal2)
{
- BOOL ret;
+ bool ret;
ASN1_DATA data;
ZERO_STRUCTP(chal1);
/*
parse a SPNEGO auth packet. This contains the encrypted passwords
*/
-BOOL spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
+bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
{
ASN1_DATA data;
/*
parse a SPNEGO auth packet. This contains the encrypted passwords
*/
-BOOL spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
+bool spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
const char *mechOID,
DATA_BLOB *auth)
{
Send a SMB trans or trans2 request.
****************************************************************************/
-BOOL cli_send_trans(struct cli_state *cli, int trans,
+bool cli_send_trans(struct cli_state *cli, int trans,
const char *pipe_name,
int fid, int flags,
uint16 *setup, unsigned int lsetup, unsigned int msetup,
Receive a SMB trans or trans2 response allocating the necessary memory.
****************************************************************************/
-BOOL cli_receive_trans(struct cli_state *cli,int trans,
+bool cli_receive_trans(struct cli_state *cli,int trans,
char **param, unsigned int *param_len,
char **data, unsigned int *data_len)
{
unsigned int total_param=0;
unsigned int this_data,this_param;
NTSTATUS status;
- BOOL ret = False;
+ bool ret = False;
*data_len = *param_len = 0;
Send a SMB nttrans request.
****************************************************************************/
-BOOL cli_send_nt_trans(struct cli_state *cli,
+bool cli_send_nt_trans(struct cli_state *cli,
int function,
int flags,
uint16 *setup, unsigned int lsetup, unsigned int msetup,
Receive a SMB nttrans response allocating the necessary memory.
****************************************************************************/
-BOOL cli_receive_nt_trans(struct cli_state *cli,
+bool cli_receive_nt_trans(struct cli_state *cli,
char **param, unsigned int *param_len,
char **data, unsigned int *data_len)
{
unsigned int this_data,this_param;
uint8 eclass;
uint32 ecode;
- BOOL ret = False;
+ bool ret = False;
*data_len = *param_len = 0;
Check a credential sent by the client.
****************************************************************************/
-BOOL creds_server_check(const struct dcinfo *dc, const DOM_CHAL *rcv_cli_chal_in)
+bool creds_server_check(const struct dcinfo *dc, const DOM_CHAL *rcv_cli_chal_in)
{
if (memcmp(dc->clnt_chal.data, rcv_cli_chal_in->data, 8)) {
DEBUG(5,("creds_server_check: challenge : %s\n", credstr(rcv_cli_chal_in->data)));
Step the server credential chain one forward.
****************************************************************************/
-BOOL creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out)
+bool creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out)
{
- BOOL ret;
+ bool ret;
struct dcinfo tmp_dc = *dc;
/* Do all operations on a temporary copy of the dc,
Check a credential returned by the server.
****************************************************************************/
-BOOL creds_client_check(const struct dcinfo *dc, const DOM_CHAL *rcv_srv_chal_in)
+bool creds_client_check(const struct dcinfo *dc, const DOM_CHAL *rcv_srv_chal_in)
{
if (memcmp(dc->srv_chal.data, rcv_srv_chal_in->data, 8)) {
DEBUG(5,("creds_client_check: challenge : %s\n", credstr(rcv_srv_chal_in->data)));
{
time_t expire_time;
char *key;
- BOOL ret = False;
+ bool ret = False;
DATA_BLOB blob;
unsigned char *buf = NULL;
int len = 0;
#define RETURN_ON_FALSE(x) if (!x) return False;
-static BOOL check_cldap_reply_required_flags(uint32_t ret_flags,
+static bool check_cldap_reply_required_flags(uint32_t ret_flags,
uint32_t req_flags)
{
if (req_flags & DS_PDC_REQUIRED)
uint32_t flags,
const char *site_name,
struct DS_DOMAIN_CONTROLLER_INFO **info,
- BOOL *expired)
+ bool *expired)
{
char *key;
DATA_BLOB blob;
struct DS_DOMAIN_CONTROLLER_INFO **info)
{
NTSTATUS status;
- BOOL expired = False;
+ bool expired = False;
status = DsGetDcName_cache_fetch(mem_ctx, domain_name, domain_guid,
flags, site_name, info, &expired);
/****************************************************************
****************************************************************/
-static BOOL check_allowed_required_flags(uint32_t flags)
+static bool check_allowed_required_flags(uint32_t flags)
{
uint32_t return_type = flags & (DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME);
uint32_t offered_type = flags & (DS_IS_FLAT_NAME|DS_IS_DNS_NAME);
struct DS_DOMAIN_CONTROLLER_INFO **info)
{
int i = 0;
- BOOL valid_dc = False;
+ bool valid_dc = False;
struct cldap_netlogon_reply r;
const char *dc_hostname, *dc_domain_name;
const char *dc_address;
off_t offset,
int whence);
-extern BOOL in_client;
+extern bool in_client;
/*
* Is the logging working / configfile read ?
static SMBCSRV *
smbc_server(SMBCCTX *context,
- BOOL connect_if_not_found,
+ bool connect_if_not_found,
const char *server,
const char *share,
fstring workgroup,
* Get info from an SMB server on a file. Use a qpathinfo call first
* and if that fails, use getatr, as Win95 sometimes refuses qpathinfo
*/
-static BOOL
+static bool
smbc_getatr(SMBCCTX * context,
SMBCSRV *srv,
char *path,
*
* "mode" (attributes) parameter may be set to -1 if it is not to be set.
*/
-static BOOL
+static bool
smbc_setatr(SMBCCTX * context, SMBCSRV *srv, char *path,
time_t create_time,
time_t access_time,
ace_compare(SEC_ACE *ace1,
SEC_ACE *ace2)
{
- BOOL b1;
- BOOL b2;
+ bool b1;
+ bool b2;
/* If the ACEs are equal, we have nothing more to do. */
if (sec_ace_equal(ace1, ace2)) {
convert_sid_to_string(struct cli_state *ipc_cli,
POLICY_HND *pol,
fstring str,
- BOOL numeric,
+ bool numeric,
DOM_SID *sid)
{
char **domains = NULL;
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL
+static bool
convert_string_to_sid(struct cli_state *ipc_cli,
POLICY_HND *pol,
- BOOL numeric,
+ bool numeric,
DOM_SID *sid,
const char *str)
{
enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
- BOOL result = True;
+ bool result = True;
struct rpc_pipe_client *pipe_hnd = find_lsa_pipe_hnd(ipc_cli);
if (!pipe_hnd) {
/* parse an ACE in the same format as print_ace() */
-static BOOL
+static bool
parse_ace(struct cli_state *ipc_cli,
POLICY_HND *pol,
SEC_ACE *ace,
- BOOL numeric,
+ bool numeric,
char *str)
{
char *p;
p = tok;
while(*p) {
- BOOL found = False;
+ bool found = False;
for (v = special_values; v->perm; v++) {
if (v->perm[0] == *p) {
}
/* add an ACE to a list of ACEs in a SEC_ACL */
-static BOOL
+static bool
add_ace(SEC_ACL **the_acl,
SEC_ACE *ace,
TALLOC_CTX *ctx)
sec_desc_parse(TALLOC_CTX *ctx,
struct cli_state *ipc_cli,
POLICY_HND *pol,
- BOOL numeric,
+ bool numeric,
char *str)
{
const char *p = str;
uint32 i;
int n = 0;
int n_used;
- BOOL all;
- BOOL all_nt;
- BOOL all_nt_acls;
- BOOL all_dos;
- BOOL some_nt;
- BOOL some_dos;
- BOOL exclude_nt_revision = False;
- BOOL exclude_nt_owner = False;
- BOOL exclude_nt_group = False;
- BOOL exclude_nt_acl = False;
- BOOL exclude_dos_mode = False;
- BOOL exclude_dos_size = False;
- BOOL exclude_dos_create_time = False;
- BOOL exclude_dos_access_time = False;
- BOOL exclude_dos_write_time = False;
- BOOL exclude_dos_change_time = False;
- BOOL exclude_dos_inode = False;
- BOOL numeric = True;
- BOOL determine_size = (bufsize == 0);
+ bool all;
+ bool all_nt;
+ bool all_nt_acls;
+ bool all_dos;
+ bool some_nt;
+ bool some_dos;
+ bool exclude_nt_revision = False;
+ bool exclude_nt_owner = False;
+ bool exclude_nt_group = False;
+ bool exclude_nt_acl = False;
+ bool exclude_dos_mode = False;
+ bool exclude_dos_size = False;
+ bool exclude_dos_create_time = False;
+ bool exclude_dos_access_time = False;
+ bool exclude_dos_write_time = False;
+ bool exclude_dos_change_time = False;
+ bool exclude_dos_inode = False;
+ bool numeric = True;
+ bool determine_size = (bufsize == 0);
int fnum = -1;
SEC_DESC *sd;
fstring sidstr;
size_t sd_size;
int ret = 0;
char *p;
- BOOL numeric = True;
+ bool numeric = True;
/* the_acl will be null for REMOVE_ALL operations */
if (the_acl) {
case SMBC_XATTR_MODE_REMOVE:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->aces[i],
case SMBC_XATTR_MODE_ADD:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sid_equal(&sd->dacl->aces[i].trustee,
va_list ap;
union {
int i;
- BOOL b;
+ bool b;
smbc_get_auth_data_with_context_fn auth_fn;
void *v;
} option_value;
/*
* Log to standard error instead of standard output.
*/
- option_value.b = (BOOL) va_arg(ap, int);
+ option_value.b = (bool) va_arg(ap, int);
context->internal->_debug_stderr = option_value.b;
} else if (strcmp(option_name, "full_time_names") == 0) {
* be CHANGE_TIME but was confused and sometimes referred to
* CREATE_TIME.)
*/
- option_value.b = (BOOL) va_arg(ap, int);
+ option_value.b = (bool) va_arg(ap, int);
context->internal->_full_time_names = option_value.b;
} else if (strcmp(option_name, "open_share_mode") == 0) {
* Do some library-wide intializations the first time we get
* called
*/
- BOOL conf_loaded = False;
+ bool conf_loaded = False;
/* Set this to what the user wants */
DEBUGLEVEL = context->debug;
* false on failure
**/
-BOOL namecache_enable(void)
+bool namecache_enable(void)
{
/*
* Check if name caching disabled by setting the name cache
* false on failure
**/
-BOOL namecache_shutdown(void)
+bool namecache_shutdown(void)
{
if (!gencache_shutdown()) {
DEBUG(2, ("namecache_shutdown: Couldn't close namecache on top of gencache.\n"));
* ip addresses being stored
**/
-BOOL namecache_store(const char *name, int name_type,
+bool namecache_store(const char *name, int name_type,
int num_names, struct ip_service *ip_list)
{
time_t expiry;
char *key, *value_string;
int i;
- BOOL ret;
+ bool ret;
/*
* we use gecache call to avoid annoying debug messages about
* false if name isn't found in the cache or has expired
**/
-BOOL namecache_fetch(const char *name, int name_type, struct ip_service **ip_list,
+bool namecache_fetch(const char *name, int name_type, struct ip_service **ip_list,
int *num_names)
{
char *key, *value;
*
**/
-BOOL namecache_delete(const char *name, int name_type)
+bool namecache_delete(const char *name, int name_type)
{
- BOOL ret;
+ bool ret;
char *key;
if (!gencache_init())
/* Store a name status record. */
-BOOL namecache_status_store(const char *keyname, int keyname_type,
+bool namecache_status_store(const char *keyname, int keyname_type,
int name_type, struct in_addr keyip,
const char *srvname)
{
char *key;
time_t expiry;
- BOOL ret;
+ bool ret;
if (!gencache_init())
return False;
/* Fetch a name status record. */
-BOOL namecache_status_fetch(const char *keyname, int keyname_type,
+bool namecache_status_fetch(const char *keyname, int keyname_type,
int name_type, struct in_addr keyip, char *srvname_out)
{
char *key = NULL;
#include "includes.h"
/* nmbd.c sets this to True. */
-BOOL global_in_nmbd = False;
+bool global_in_nmbd = False;
/****************************
* SERVER AFFINITY ROUTINES *
/****************************************************************************
****************************************************************************/
-BOOL saf_store( const char *domain, const char *servername )
+bool saf_store( const char *domain, const char *servername )
{
char *key;
time_t expire;
- BOOL ret = False;
+ bool ret = False;
if ( !domain || !servername ) {
DEBUG(2,("saf_store: Refusing to store empty domain or servername!\n"));
return ret;
}
-BOOL saf_delete( const char *domain )
+bool saf_delete( const char *domain )
{
char *key;
- BOOL ret = False;
+ bool ret = False;
if ( !domain ) {
DEBUG(2,("saf_delete: Refusing to delete empty domain\n"));
{
char *server = NULL;
time_t timeout;
- BOOL ret = False;
+ bool ret = False;
char *key = NULL;
if ( !domain || strlen(domain) == 0) {
struct in_addr to_ip, int *num_names,
struct node_status_extra *extra)
{
- BOOL found=False;
+ bool found=False;
int retries = 2;
int retry_time = 2000;
struct timeval tval;
a servers name given its IP. Return the matched name in *name.
**************************************************************************/
-BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, fstring name)
+bool name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, fstring name)
{
NODE_STATUS_STRUCT *status = NULL;
struct nmb_name nname;
int count, i;
int sock;
- BOOL result = False;
+ bool result = False;
if (lp_disable_netbios()) {
DEBUG(5,("name_status_find(%s#%02x): netbios is disabled\n", q_name, q_type));
****************************************************************************/
struct in_addr *name_query(int fd,const char *name,int name_type,
- BOOL bcast,BOOL recurse,
+ bool bcast,bool recurse,
struct in_addr to_ip, int *count, int *flags,
- BOOL *timed_out)
+ bool *timed_out)
{
- BOOL found=False;
+ bool found=False;
int i, retries = 3;
int retry_time = bcast?250:2000;
struct timeval tval;
Parse the next line in the lmhosts file.
*********************************************************/
-BOOL getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
+bool getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
{
pstring line;
return False on failure. Port is set to PORT_NONE;
*********************************************************/
-static BOOL convert_ip2service( struct ip_service **return_iplist, struct in_addr *ip_list, int count )
+static bool convert_ip2service( struct ip_service **return_iplist, struct in_addr *ip_list, int count )
{
int i;
for (i=0; i<srv_count; i++) {
struct in_addr wins_ip;
int flags;
- BOOL timed_out;
+ bool timed_out;
wins_ip = wins_srv_ip_tag(wins_tags[t], src_ip);
pstring name_resolve_list;
fstring tok;
const char *ptr;
- BOOL allones = (strcmp(name,"255.255.255.255") == 0);
- BOOL allzeros = (strcmp(name,"0.0.0.0") == 0);
- BOOL is_address = is_ipaddress_v4(name);
+ bool allones = (strcmp(name,"255.255.255.255") == 0);
+ bool allzeros = (strcmp(name,"0.0.0.0") == 0);
+ bool is_address = is_ipaddress_v4(name);
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
int i;
smb.conf to determine the order of name resolution.
*********************************************************/
-BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type)
+bool resolve_name(const char *name, struct in_addr *return_ip, int name_type)
{
struct ip_service *ip_list = NULL;
char *sitename = sitename_fetch(lp_realm()); /* wild guess */
Find the IP address of the master browser or DMB for a workgroup.
*********************************************************/
-BOOL find_master_ip(const char *group, struct in_addr *master_ip)
+bool find_master_ip(const char *group, struct in_addr *master_ip)
{
struct ip_service *ip_list = NULL;
int count = 0;
for a domain.
*********************************************************/
-BOOL get_pdc_ip(const char *domain, struct in_addr *ip)
+bool get_pdc_ip(const char *domain, struct in_addr *ip)
{
struct ip_service *ip_list = NULL;
int count = 0;
*********************************************************/
static NTSTATUS get_dc_list(const char *domain, const char *sitename, struct ip_service **ip_list,
- int *count, enum dc_lookup_type lookup_type, int *ordered)
+ int *count, enum dc_lookup_type lookup_type, bool *ordered)
{
fstring resolve_order;
char *saf_servername;
int local_count, i, j;
struct ip_service *return_iplist = NULL;
struct ip_service *auto_ip_list = NULL;
- BOOL done_auto_lookup = False;
+ bool done_auto_lookup = False;
int auto_count = 0;
NTSTATUS status;
Small wrapper function to get the DC list and sort it if neccessary.
*********************************************************************/
-NTSTATUS get_sorted_dc_list( const char *domain, const char *sitename, struct ip_service **ip_list, int *count, BOOL ads_only )
+NTSTATUS get_sorted_dc_list( const char *domain, const char *sitename, struct ip_service **ip_list, int *count, bool ads_only )
{
- BOOL ordered;
+ bool ordered;
NTSTATUS status;
enum dc_lookup_type lookup_type = DC_NORMAL_LOOKUP;
NTSTATUS get_kdc_list( const char *realm, const char *sitename, struct ip_service **ip_list, int *count)
{
- BOOL ordered;
+ bool ordered;
NTSTATUS status;
*count = 0;
**********************************************************************/
#ifdef HAVE_KRB5
-static BOOL is_our_primary_domain(const char *domain)
+static bool is_our_primary_domain(const char *domain)
{
int role = lp_server_role();
Find the name and IP address for a server in the realm/domain
*************************************************************************/
-static BOOL ads_dc_name(const char *domain,
+static bool ads_dc_name(const char *domain,
const char *realm,
struct in_addr *dc_ip,
fstring srv_name)
valid since we have already done a name_status_find on it
***************************************************************************/
-static BOOL rpc_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out)
+static bool rpc_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out)
{
struct ip_service *ip_list = NULL;
struct in_addr dc_ip, exclude_ip;
wrapper around ads and rpc methods of finds DC's
**********************************************************************/
-BOOL get_dc_name(const char *domain, const char *realm, fstring srv_name, struct in_addr *ip_out)
+bool get_dc_name(const char *domain, const char *realm, fstring srv_name, struct in_addr *ip_out)
{
struct in_addr dc_ip;
- BOOL ret;
- BOOL our_domain = False;
+ bool ret;
+ bool our_domain = False;
zero_ip_v4(&dc_ip);
Handle "compressed" name pointers.
******************************************************************/
-static BOOL handle_name_ptrs(unsigned char *ubuf,int *offset,int length,
- BOOL *got_pointer,int *ret)
+static bool handle_name_ptrs(unsigned char *ubuf,int *offset,int length,
+ bool *got_pointer,int *ret)
{
int loop_count=0;
int m,n=0;
unsigned char *ubuf = (unsigned char *)inbuf;
int ret = 0;
- BOOL got_pointer=False;
+ bool got_pointer=False;
int loop_count=0;
int offset = ofs;
Allocate and parse some resource records.
******************************************************************/
-static BOOL parse_alloc_res_rec(char *inbuf,int *offset,int length,
+static bool parse_alloc_res_rec(char *inbuf,int *offset,int length,
struct res_rec **recs, int count)
{
int i;
This is documented in section 4.4.1 of RFC1002.
******************************************************************/
-static BOOL parse_dgram(char *inbuf,int length,struct dgram_packet *dgram)
+static bool parse_dgram(char *inbuf,int length,struct dgram_packet *dgram)
{
int offset;
int flags;
or is invalid for some reason, True otherwise.
******************************************************************/
-static BOOL parse_nmb(char *inbuf,int length,struct nmb_packet *nmb)
+static bool parse_nmb(char *inbuf,int length,struct nmb_packet *nmb)
{
int nm_flags,offset;
int port)
{
struct packet_struct *p;
- BOOL ok=False;
+ bool ok=False;
p = SMB_MALLOC_P(struct packet_struct);
if (!p)
Send a udp packet on a already open socket.
******************************************************************/
-static BOOL send_udp(int fd,char *buf,int len,struct in_addr ip,int port)
+static bool send_udp(int fd,char *buf,int len,struct in_addr ip,int port)
{
- BOOL ret = False;
+ bool ret = False;
int i;
struct sockaddr_in sock_out;
Compare two nmb names
******************************************************************/
-BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2)
+bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2)
{
return ((n1->name_type == n2->name_type) &&
strequal(n1->name ,n2->name ) &&
Send a packet_struct.
******************************************************************/
-BOOL send_packet(struct packet_struct *p)
+bool send_packet(struct packet_struct *p)
{
char buf[1024];
int len=0;
See if a datagram has the right mailslot name.
***************************************************************************/
-BOOL match_mailslot_name(struct packet_struct *p, const char *mailslot_name)
+bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name)
{
struct dgram_packet *dgram = &p->packet.dgram;
char *buf;
Core of smb password checking routine.
****************************************************************************/
-static BOOL smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
+static bool smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
const uchar *part_passwd,
const DATA_BLOB *sec_blob,
DATA_BLOB *user_sess_key)
Note: The same code works with both NTLMv2 and LMv2.
****************************************************************************/
-static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
+static bool smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
const uchar *part_passwd,
const DATA_BLOB *sec_blob,
const char *user, const char *domain,
- BOOL upper_case_domain, /* should the domain be transformed into upper case? */
+ bool upper_case_domain, /* should the domain be transformed into upper case? */
DATA_BLOB *user_sess_key)
{
/* Finish the encryption of part_passwd. */
uchar value_from_encryption[16];
uchar client_response[16];
DATA_BLOB client_key_data;
- BOOL res;
+ bool res;
if (part_passwd == NULL) {
DEBUG(10,("No password set - DISALLOWING access\n"));
*
*/
-static BOOL may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
+static bool may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
{
return True;
}
}
static void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
- uint32 neg_flags, BOOL allow_lm) {
+ uint32 neg_flags, bool allow_lm) {
if (neg_flags & NTLMSSP_NEGOTIATE_UNICODE) {
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
ntlmssp_state->neg_flags &= ~NTLMSSP_NEGOTIATE_OEM;
NTSTATUS nt_status = NT_STATUS_OK;
/* used by NTLM2 */
- BOOL doing_ntlm2 = False;
+ bool doing_ntlm2 = False;
uchar session_nonce[16];
uchar session_nonce_hash[16];
d = word (4 bytes)
C = constant ascii string
*/
-BOOL msrpc_gen(DATA_BLOB *blob,
+bool msrpc_gen(DATA_BLOB *blob,
const char *format, ...)
{
int i, n;
C = constant ascii string
*/
-BOOL msrpc_parse(const DATA_BLOB *blob,
+bool msrpc_parse(const DATA_BLOB *blob,
const char *format, ...)
{
int i;
const uchar *whole_pdu, size_t pdu_length,
enum ntlmssp_direction direction,
DATA_BLOB *sig,
- BOOL encrypt_sig)
+ bool encrypt_sig)
{
if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) {
HMACMD5Context ctx;
struct in_addr ip;
NTSTATUS result;
- BOOL pass_must_change = False;
+ bool pass_must_change = False;
*err_str = '\0';
open the tdb
***********************************************************************/
-BOOL netsamlogon_cache_init(void)
+bool netsamlogon_cache_init(void)
{
if (!netsamlogon_tdb) {
netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0,
Shutdown samlogon_cache database
***********************************************************************/
-BOOL netsamlogon_cache_shutdown(void)
+bool netsamlogon_cache_shutdown(void)
{
if(netsamlogon_tdb)
return (tdb_close(netsamlogon_tdb) == 0);
***********************************************************************/
void netsamlogon_clear_cached_user(TDB_CONTEXT *tdb, NET_USER_INFO_3 *user)
{
- BOOL got_tdb = False;
+ bool got_tdb = False;
DOM_SID sid;
fstring key_str, sid_string;
username should be in UTF-8 format
***********************************************************************/
-BOOL netsamlogon_cache_store( const char *username, NET_USER_INFO_3 *user )
+bool netsamlogon_cache_store( const char *username, NET_USER_INFO_3 *user )
{
TDB_DATA data;
fstring keystr;
prs_struct ps;
- BOOL result = False;
+ bool result = False;
DOM_SID user_sid;
time_t t = time(NULL);
TALLOC_CTX *mem_ctx;
return user;
}
-BOOL netsamlogon_cache_have(const DOM_SID *user_sid)
+bool netsamlogon_cache_have(const DOM_SID *user_sid)
{
TALLOC_CTX *mem_ctx = talloc_init("netsamlogon_cache_have");
NET_USER_INFO_3 *user = NULL;
- BOOL result;
+ bool result;
if (!mem_ctx)
return False;
uint64_t ino, const struct smb_share_mode_entry *new_entry,
const char *sharepath, const char *filename);
-static BOOL sharemodes_procid_equal(const struct server_id *p1, const struct server_id *p2)
+static bool sharemodes_procid_equal(const struct server_id *p1, const struct server_id *p2)
{
return (p1->pid == p2->pid);
}
struct outstanding_packet_lookup *prev, *next;
uint16 mid;
uint32 reply_seq_num;
- BOOL can_delete; /* Set to False in trans state. */
+ bool can_delete; /* Set to False in trans state. */
};
struct smb_basic_signing_context {
struct outstanding_packet_lookup *outstanding_packet_list;
};
-static BOOL store_sequence_for_reply(struct outstanding_packet_lookup **list,
+static bool store_sequence_for_reply(struct outstanding_packet_lookup **list,
uint16 mid, uint32 reply_seq_num)
{
struct outstanding_packet_lookup *t;
return True;
}
-static BOOL get_sequence_for_reply(struct outstanding_packet_lookup **list,
+static bool get_sequence_for_reply(struct outstanding_packet_lookup **list,
uint16 mid, uint32 *reply_seq_num)
{
struct outstanding_packet_lookup *t;
return False;
}
-static BOOL set_sequence_can_delete_flag(struct outstanding_packet_lookup **list, uint16 mid, BOOL can_delete_entry)
+static bool set_sequence_can_delete_flag(struct outstanding_packet_lookup **list, uint16 mid, bool can_delete_entry)
{
struct outstanding_packet_lookup *t;
SMB signing - Common code before we set a new signing implementation
************************************************************/
-static BOOL cli_set_smb_signing_common(struct cli_state *cli)
+static bool cli_set_smb_signing_common(struct cli_state *cli)
{
if (!cli->sign_info.allow_smb_signing) {
return False;
SMB signing - Common code for 'real' implementations
************************************************************/
-static BOOL set_smb_signing_real_common(struct smb_sign_info *si)
+static bool set_smb_signing_real_common(struct smb_sign_info *si)
{
if (si->mandatory_signing) {
DEBUG(5, ("Mandatory SMB signing enabled!\n"));
SMB signing - NULL implementation - check a MAC sent by server.
************************************************************/
-static BOOL null_check_incoming_message(const char *inbuf,
+static bool null_check_incoming_message(const char *inbuf,
struct smb_sign_info *si,
- BOOL must_be_ok)
+ bool must_be_ok)
{
return True;
}
shut down a real signing mechanism
*/
-static BOOL null_set_signing(struct smb_sign_info *si)
+static bool null_set_signing(struct smb_sign_info *si)
{
si->signing_context = NULL;
}
-static BOOL signing_good(const char *inbuf, struct smb_sign_info *si,
- BOOL good, uint32 seq, BOOL must_be_ok)
+static bool signing_good(const char *inbuf, struct smb_sign_info *si,
+ bool good, uint32 seq, bool must_be_ok)
{
if (good) {
SMB signing - Client implementation - check a MAC sent by server.
************************************************************/
-static BOOL client_check_incoming_message(const char *inbuf,
+static bool client_check_incoming_message(const char *inbuf,
struct smb_sign_info *si,
- BOOL must_be_ok)
+ bool must_be_ok)
{
- BOOL good;
+ bool good;
uint32 reply_seq_number;
unsigned char calc_md5_mac[16];
unsigned char *server_sent_mac;
SMB signing - Simple implementation - setup the MAC key.
************************************************************/
-BOOL cli_simple_set_signing(struct cli_state *cli,
+bool cli_simple_set_signing(struct cli_state *cli,
const DATA_BLOB user_session_key,
const DATA_BLOB response)
{
SMB signing - TEMP implementation - check a MAC sent by server.
************************************************************/
-static BOOL temp_check_incoming_message(const char *inbuf,
- struct smb_sign_info *si, BOOL foo)
+static bool temp_check_incoming_message(const char *inbuf,
+ struct smb_sign_info *si, bool foo)
{
return True;
}
SMB signing - NULL implementation - setup the MAC key.
************************************************************/
-BOOL cli_null_set_signing(struct cli_state *cli)
+bool cli_null_set_signing(struct cli_state *cli)
{
return null_set_signing(&cli->sign_info);
}
SMB signing - temp implementation - setup the MAC key.
************************************************************/
-BOOL cli_temp_set_signing(struct cli_state *cli)
+bool cli_temp_set_signing(struct cli_state *cli)
{
if (!cli_set_smb_signing_common(cli)) {
return False;
* which had a bad checksum, True otherwise.
*/
-BOOL cli_check_sign_mac(struct cli_state *cli)
+bool cli_check_sign_mac(struct cli_state *cli)
{
if (!cli->sign_info.check_incoming_message(cli->inbuf, &cli->sign_info, True)) {
free_signing_context(&cli->sign_info);
Enter trans/trans2/nttrans state.
************************************************************/
-BOOL client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid)
+bool client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid)
{
struct smb_sign_info *si = &cli->sign_info;
struct smb_basic_signing_context *data = (struct smb_basic_signing_context *)si->signing_context;
Leave trans/trans2/nttrans state.
************************************************************/
-BOOL client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid)
+bool client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid)
{
uint32 reply_seq_num;
struct smb_sign_info *si = &cli->sign_info;
Is client signing on ?
************************************************************/
-BOOL client_is_signing_on(struct cli_state *cli)
+bool client_is_signing_on(struct cli_state *cli)
{
struct smb_sign_info *si = &cli->sign_info;
return si->doing_signing;
SMB signing - Server implementation - check a MAC sent by server.
************************************************************/
-static BOOL srv_check_incoming_message(const char *inbuf,
+static bool srv_check_incoming_message(const char *inbuf,
struct smb_sign_info *si,
- BOOL must_be_ok)
+ bool must_be_ok)
{
- BOOL good;
+ bool good;
struct smb_basic_signing_context *data =
(struct smb_basic_signing_context *)si->signing_context;
uint32 reply_seq_number = data->send_seq_num;
Turn signing off or on for oplock break code.
************************************************************/
-BOOL srv_oplock_set_signing(BOOL onoff)
+bool srv_oplock_set_signing(bool onoff)
{
- BOOL ret = srv_sign_info.doing_signing;
+ bool ret = srv_sign_info.doing_signing;
srv_sign_info.doing_signing = onoff;
return ret;
}
Called to validate an incoming packet from the client.
************************************************************/
-BOOL srv_check_sign_mac(const char *inbuf, BOOL must_be_ok)
+bool srv_check_sign_mac(const char *inbuf, bool must_be_ok)
{
/* Check if it's a session keepalive. */
if(CVAL(inbuf,0) == SMBkeepalive) {
reads/writes if it is.
************************************************************/
-BOOL srv_is_signing_active(void)
+bool srv_is_signing_active(void)
{
return srv_sign_info.doing_signing;
}
in the negprot.
************************************************************/
-BOOL srv_is_signing_negotiated(void)
+bool srv_is_signing_negotiated(void)
{
return srv_sign_info.negotiated_smb_signing;
}
Returns whether signing is actually happening
************************************************************/
-BOOL srv_signing_started(void)
+bool srv_signing_started(void)
{
struct smb_basic_signing_context *data;
Returns False if password must have been truncated to create LM hash
*/
-BOOL SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24])
+bool SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24])
{
- BOOL ret;
+ bool ret;
uchar lm_hash[16];
ret = E_deshash(passwd, lm_hash);
* @note p16 is filled in regardless
*/
-BOOL E_deshash(const char *passwd, uchar p16[16])
+bool E_deshash(const char *passwd, uchar p16[16])
{
- BOOL ret = True;
+ bool ret = True;
fstring dospwd;
ZERO_STRUCT(dospwd);
}
/* Does both the NTLMv2 owfs of a user's password */
-BOOL ntv2_owf_gen(const uchar owf[16],
+bool ntv2_owf_gen(const uchar owf[16],
const char *user_in, const char *domain_in,
- BOOL upper_case_domain, /* Transform the domain into UPPER case */
+ bool upper_case_domain, /* Transform the domain into UPPER case */
uchar kr_buf[16])
{
smb_ucs2_t *user;
return final_response;
}
-BOOL SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16],
+bool SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16],
const DATA_BLOB *server_chal,
const DATA_BLOB *names_blob,
DATA_BLOB *lm_response, DATA_BLOB *nt_response,
/* Plaintext version of the above. */
-BOOL SMBNTLMv2encrypt(const char *user, const char *domain, const char *password,
+bool SMBNTLMv2encrypt(const char *user, const char *domain, const char *password,
const DATA_BLOB *server_chal,
const DATA_BLOB *names_blob,
DATA_BLOB *lm_response, DATA_BLOB *nt_response,
encode a password buffer with a unicode password. The buffer
is filled with random data to make it harder to attack.
************************************************************/
-BOOL encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
+bool encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
{
uchar new_pw[512];
size_t new_pw_len;
returned password including termination.
************************************************************/
-BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
+bool decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
int new_pwrd_size, uint32 *new_pw_len,
int string_flags)
{
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
-static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
+static bool read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
{
ZERO_STRUCTP(token);
return !asn1->has_error;
}
-static BOOL write_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
+static bool write_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
{
asn1_push_tag(asn1, ASN1_CONTEXT(0));
asn1_push_tag(asn1, ASN1_SEQUENCE(0));
return !asn1->has_error;
}
-static BOOL read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
+static bool read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
{
ZERO_STRUCTP(token);
return !asn1->has_error;
}
-static BOOL write_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
+static bool write_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
{
asn1_push_tag(asn1, ASN1_CONTEXT(1));
asn1_push_tag(asn1, ASN1_SEQUENCE(0));
return ret;
}
-BOOL free_spnego_data(SPNEGO_DATA *spnego)
+bool free_spnego_data(SPNEGO_DATA *spnego)
{
- BOOL ret = True;
+ bool ret = True;
if (!spnego) goto out;
* false if cache init failed
**/
-BOOL trustdom_cache_enable(void)
+bool trustdom_cache_enable(void)
{
/* Init trustdom cache by calling gencache initialisation */
if (!gencache_init()) {
* false if it failed
**/
-BOOL trustdom_cache_shutdown(void)
+bool trustdom_cache_shutdown(void)
{
/* Close trustdom cache by calling gencache shutdown */
if (!gencache_shutdown()) {
* false if store attempt failed
**/
-BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
+bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
time_t timeout)
{
char *key, *alt_key;
fstring sid_string;
- BOOL ret;
+ bool ret;
/*
* we use gecache call to avoid annoying debug messages
* false if has expired/doesn't exist
**/
-BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid)
+bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
{
char *key = NULL, *value = NULL;
time_t timeout;
store the timestamp from the last update
*******************************************************************/
-BOOL trustdom_cache_store_timestamp( uint32 t, time_t timeout )
+bool trustdom_cache_store_timestamp( uint32 t, time_t timeout )
{
fstring value;
Enumerate the list of trusted domains from a DC
*********************************************************************/
-BOOL enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
+bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
char ***domain_names, uint32 *num_domains,
DOM_SID **sids )
{
uint32 enum_ctx = 0;
struct cli_state *cli = NULL;
struct rpc_pipe_client *lsa_pipe;
- BOOL retry;
+ bool retry;
*domain_names = NULL;
*num_domains = 0;
See if two locking contexts are equal.
****************************************************************************/
-BOOL brl_same_context(const struct lock_context *ctx1,
+bool brl_same_context(const struct lock_context *ctx1,
const struct lock_context *ctx2)
{
return (procid_equal(&ctx1->pid, &ctx2->pid) &&
See if lck1 and lck2 overlap.
****************************************************************************/
-static BOOL brl_overlap(const struct lock_struct *lck1,
+static bool brl_overlap(const struct lock_struct *lck1,
const struct lock_struct *lck2)
{
/* this extra check is not redundent - it copes with locks
See if lock2 can be added when lock1 is in place.
****************************************************************************/
-static BOOL brl_conflict(const struct lock_struct *lck1,
+static bool brl_conflict(const struct lock_struct *lck1,
const struct lock_struct *lck2)
{
/* Ignore PENDING locks. */
know already match.
****************************************************************************/
-static BOOL brl_conflict_posix(const struct lock_struct *lck1,
+static bool brl_conflict_posix(const struct lock_struct *lck1,
const struct lock_struct *lck2)
{
#if defined(DEVELOPER)
}
#if ZERO_ZERO
-static BOOL brl_conflict1(const struct lock_struct *lck1,
+static bool brl_conflict1(const struct lock_struct *lck1,
const struct lock_struct *lck2)
{
if (IS_PENDING_LOCK(lck1->lock_type) || IS_PENDING_LOCK(lck2->lock_type))
This is never used in the POSIX lock case.
****************************************************************************/
-static BOOL brl_conflict_other(const struct lock_struct *lck1, const struct lock_struct *lck2)
+static bool brl_conflict_other(const struct lock_struct *lck1, const struct lock_struct *lck2)
{
if (IS_PENDING_LOCK(lck1->lock_type) || IS_PENDING_LOCK(lck2->lock_type))
return False;
Check if an unlock overlaps a pending lock.
****************************************************************************/
-static BOOL brl_pending_overlap(const struct lock_struct *lock, const struct lock_struct *pend_lock)
+static bool brl_pending_overlap(const struct lock_struct *lock, const struct lock_struct *pend_lock)
{
if ((lock->start <= pend_lock->start) && (lock->start + lock->size > pend_lock->start))
return True;
app depends on this ?
****************************************************************************/
-static NTSTATUS brl_lock_failed(files_struct *fsp, const struct lock_struct *lock, BOOL blocking_lock)
+static NTSTATUS brl_lock_failed(files_struct *fsp, const struct lock_struct *lock, bool blocking_lock)
{
if (lock->start >= 0xEF000000 && (lock->start >> 63) == 0) {
/* amazing the little things you learn with a test
****************************************************************************/
static NTSTATUS brl_lock_windows(struct byte_range_lock *br_lck,
- struct lock_struct *plock, BOOL blocking_lock)
+ struct lock_struct *plock, bool blocking_lock)
{
unsigned int i;
files_struct *fsp = br_lck->fsp;
static unsigned int brlock_posix_split_merge(struct lock_struct *lck_arr, /* Output array. */
const struct lock_struct *ex, /* existing lock. */
const struct lock_struct *plock, /* proposed lock. */
- BOOL *lock_was_added)
+ bool *lock_was_added)
{
- BOOL lock_types_differ = (ex->lock_type != plock->lock_type);
+ bool lock_types_differ = (ex->lock_type != plock->lock_type);
/* We can't merge non-conflicting locks on different context - ignore fnum. */
unsigned int i, count;
struct lock_struct *locks = br_lck->lock_data;
struct lock_struct *tp;
- BOOL lock_was_added = False;
- BOOL signal_pending_read = False;
+ bool lock_was_added = False;
+ bool signal_pending_read = False;
/* No zero-zero locks for POSIX. */
if (plock->start == 0 && plock->size == 0) {
br_off size,
enum brl_type lock_type,
enum brl_flavour lock_flav,
- BOOL blocking_lock,
+ bool blocking_lock,
uint32 *psmbpid)
{
NTSTATUS ret;
Unlock a range of bytes - Windows semantics.
****************************************************************************/
-static BOOL brl_unlock_windows(struct messaging_context *msg_ctx,
+static bool brl_unlock_windows(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
Unlock a range of bytes - POSIX semantics.
****************************************************************************/
-static BOOL brl_unlock_posix(struct messaging_context *msg_ctx,
+static bool brl_unlock_posix(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
unsigned int i, j, count;
struct lock_struct *tp;
struct lock_struct *locks = br_lck->lock_data;
- BOOL overlap_found = False;
+ bool overlap_found = False;
/* No zero-zero locks for POSIX. */
if (plock->start == 0 && plock->size == 0) {
for (i = 0; i < br_lck->num_locks; i++) {
struct lock_struct *lock = &locks[i];
struct lock_struct tmp_lock[3];
- BOOL lock_was_added = False;
+ bool lock_was_added = False;
unsigned int tmp_count;
/* Only remove our own locks - ignore fnum. */
Unlock a range of bytes.
****************************************************************************/
-BOOL brl_unlock(struct messaging_context *msg_ctx,
+bool brl_unlock(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
uint32 smbpid,
struct server_id pid,
Returns True if the region required is currently unlocked, False if locked.
****************************************************************************/
-BOOL brl_locktest(struct byte_range_lock *br_lck,
+bool brl_locktest(struct byte_range_lock *br_lck,
uint32 smbpid,
struct server_id pid,
br_off start,
enum brl_type lock_type,
enum brl_flavour lock_flav)
{
- BOOL ret = True;
+ bool ret = True;
unsigned int i;
struct lock_struct lock;
const struct lock_struct *locks = br_lck->lock_data;
/* Make sure existing locks don't conflict */
for (i=0; i < br_lck->num_locks; i++) {
const struct lock_struct *exlock = &locks[i];
- BOOL conflict = False;
+ bool conflict = False;
if (exlock->lock_flav == WINDOWS_LOCK) {
conflict = brl_conflict(exlock, &lock);
*/
if(lp_posix_locking(fsp->conn->params)) {
- BOOL ret = is_posix_locked(fsp, pstart, psize, plock_type, POSIX_LOCK);
+ bool ret = is_posix_locked(fsp, pstart, psize, plock_type, POSIX_LOCK);
DEBUG(10,("brl_lockquery: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
(double)*pstart, (double)*psize, ret ? "locked" : "unlocked",
Remove a particular pending lock.
****************************************************************************/
-BOOL brl_lock_cancel(struct byte_range_lock *br_lck,
+bool brl_lock_cancel(struct byte_range_lock *br_lck,
uint32 smbpid,
struct server_id pid,
br_off start,
int num_deleted_windows_locks = 0;
struct lock_struct *locks = br_lck->lock_data;
struct server_id pid = procid_self();
- BOOL unlock_individually = False;
+ bool unlock_individually = False;
if(lp_posix_locking(fsp->conn->params)) {
for (i=0; i < br_lck->num_locks; i++) {
struct lock_struct *lock = &locks[i];
- BOOL del_this_lock = False;
+ bool del_this_lock = False;
if (lock->context.tid == tid && procid_equal(&lock->context.pid, &pid)) {
if ((lock->lock_flav == WINDOWS_LOCK) && (lock->fnum == fnum)) {
Ensure this set of lock entries is valid.
****************************************************************************/
-static BOOL validate_lock_entries(unsigned int *pnum_entries, struct lock_struct **pplocks)
+static bool validate_lock_entries(unsigned int *pnum_entries, struct lock_struct **pplocks)
{
unsigned int i;
unsigned int num_valid_entries = 0;
********************************************************************/
static struct byte_range_lock *brl_get_locks_internal(TALLOC_CTX *mem_ctx,
- files_struct *fsp, BOOL read_only)
+ files_struct *fsp, bool read_only)
{
TDB_DATA key, data;
struct byte_range_lock *br_lck = TALLOC_P(mem_ctx, struct byte_range_lock);
Called in the read/write codepath.
****************************************************************************/
-BOOL is_locked(files_struct *fsp,
+bool is_locked(files_struct *fsp,
uint32 smbpid,
SMB_BIG_UINT count,
SMB_BIG_UINT offset,
{
int strict_locking = lp_strict_locking(fsp->conn->params);
enum brl_flavour lock_flav = lp_posix_cifsu_locktype(fsp);
- BOOL ret = True;
+ bool ret = True;
if (count == 0) {
return False;
SMB_BIG_UINT offset,
enum brl_type lock_type,
enum brl_flavour lock_flav,
- BOOL blocking_lock,
+ bool blocking_lock,
NTSTATUS *perr,
uint32 *plock_pid)
{
SMB_BIG_UINT offset,
enum brl_flavour lock_flav)
{
- BOOL ok = False;
+ bool ok = False;
struct byte_range_lock *br_lck = NULL;
if (!fsp->can_lock) {
SMB_BIG_UINT offset,
enum brl_flavour lock_flav)
{
- BOOL ok = False;
+ bool ok = False;
struct byte_range_lock *br_lck = NULL;
if (!fsp->can_lock) {
static int open_read_only;
-BOOL locking_init(int read_only)
+bool locking_init(int read_only)
{
brl_init(read_only);
Deinitialize the share_mode management.
******************************************************************/
-BOOL locking_end(void)
+bool locking_end(void)
{
brl_shutdown(open_read_only);
if (lock_db) {
Get all share mode entries for a dev/inode pair.
********************************************************************/
-static BOOL parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck)
+static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck)
{
struct locking_data *data;
int i;
return 0;
}
-static BOOL fill_share_mode_lock(struct share_mode_lock *lck,
+static bool fill_share_mode_lock(struct share_mode_lock *lck,
struct file_id id,
const char *servicepath,
const char *fname,
Based on an initial code idea from SATOH Fumiyasu <fumiya@samba.gr.jp>
********************************************************************/
-BOOL rename_share_filename(struct messaging_context *msg_ctx,
+bool rename_share_filename(struct messaging_context *msg_ctx,
struct share_mode_lock *lck,
const char *servicepath,
const char *newname)
return True;
}
-BOOL get_delete_on_close_flag(struct file_id id)
+bool get_delete_on_close_flag(struct file_id id)
{
- BOOL result;
+ bool result;
struct share_mode_lock *lck;
if (!(lck = fetch_share_mode_unlocked(NULL, id, NULL, NULL))) {
return result;
}
-BOOL is_valid_share_mode_entry(const struct share_mode_entry *e)
+bool is_valid_share_mode_entry(const struct share_mode_entry *e)
{
int num_props = 0;
return (num_props != 0);
}
-BOOL is_deferred_open_entry(const struct share_mode_entry *e)
+bool is_deferred_open_entry(const struct share_mode_entry *e)
{
return (e->op_type == DEFERRED_OPEN_ENTRY);
}
-BOOL is_unused_share_mode_entry(const struct share_mode_entry *e)
+bool is_unused_share_mode_entry(const struct share_mode_entry *e)
{
return (e->op_type == UNUSED_SHARE_MODE_ENTRY);
}
}
void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
- uid_t uid, uint16 mid, uint16 op_type, BOOL initial_delete_on_close_allowed)
+ uid_t uid, uint16 mid, uint16 op_type, bool initial_delete_on_close_allowed)
{
struct share_mode_entry entry;
fill_share_mode_entry(&entry, fsp, uid, mid, op_type);
not automatically a logic error if they are identical. JRA.)
********************************************************************/
-static BOOL share_modes_identical(struct share_mode_entry *e1,
+static bool share_modes_identical(struct share_mode_entry *e1,
struct share_mode_entry *e2)
{
/* We used to check for e1->share_access == e2->share_access here
e1->share_file_id == e2->share_file_id );
}
-static BOOL deferred_open_identical(struct share_mode_entry *e1,
+static bool deferred_open_identical(struct share_mode_entry *e1,
struct share_mode_entry *e2)
{
return (procid_equal(&e1->pid, &e2->pid) &&
entries left.
********************************************************************/
-BOOL del_share_mode(struct share_mode_lock *lck, files_struct *fsp)
+bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp)
{
struct share_mode_entry entry, *e;
Remove an oplock mid and mode entry from a share mode.
********************************************************************/
-BOOL remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
+bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
{
struct share_mode_entry entry, *e;
Downgrade a oplock type from exclusive to level II.
********************************************************************/
-BOOL downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
+bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
{
struct share_mode_entry entry, *e;
open_file_ntcreate. JRA.
****************************************************************************/
-NTSTATUS can_set_delete_on_close(files_struct *fsp, BOOL delete_on_close,
+NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
uint32 dosmode)
{
if (!delete_on_close) {
Do we have an open file handle that created this entry ?
****************************************************************************/
-BOOL can_set_initial_delete_on_close(const struct share_mode_lock *lck)
+bool can_set_initial_delete_on_close(const struct share_mode_lock *lck)
{
int i;
lck entry. This function is used when the lock is already granted.
****************************************************************************/
-void set_delete_on_close_lck(struct share_mode_lock *lck, BOOL delete_on_close, UNIX_USER_TOKEN *tok)
+void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, UNIX_USER_TOKEN *tok)
{
if (lck->delete_on_close != delete_on_close) {
set_delete_on_close_token(lck, tok);
}
}
-BOOL set_delete_on_close(files_struct *fsp, BOOL delete_on_close, UNIX_USER_TOKEN *tok)
+bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKEN *tok)
{
struct share_mode_lock *lck;
Sets the allow initial delete on close flag for this share mode.
****************************************************************************/
-BOOL set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, BOOL delete_on_close)
+bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, bool delete_on_close)
{
struct share_mode_entry entry, *e;
False if not.
****************************************************************************/
-static BOOL posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
+static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count)
{
SMB_OFF_T offset = (SMB_OFF_T)u_offset;
broken NFS implementations.
****************************************************************************/
-static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+static bool posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
- BOOL ret;
+ bool ret;
DEBUG(8,("posix_fcntl_lock %d %d %.0f %.0f %d\n",fsp->fh->fd,op,(double)offset,(double)count,type));
broken NFS implementations.
****************************************************************************/
-static BOOL posix_fcntl_getlock(files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype)
+static bool posix_fcntl_getlock(files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype)
{
pid_t pid;
- BOOL ret;
+ bool ret;
DEBUG(8,("posix_fcntl_getlock %d %.0f %.0f %d\n",
fsp->fh->fd,(double)*poffset,(double)*pcount,*ptype));
region is locked, False otherwise.
****************************************************************************/
-BOOL is_posix_locked(files_struct *fsp,
+bool is_posix_locked(files_struct *fsp,
SMB_BIG_UINT *pu_offset,
SMB_BIG_UINT *pu_count,
enum brl_type *plock_type,
Create the in-memory POSIX lock databases.
********************************************************************/
-BOOL posix_locking_init(int read_only)
+bool posix_locking_init(int read_only)
{
if (posix_pending_close_tdb) {
return True;
Delete the in-memory POSIX lock databases.
********************************************************************/
-BOOL posix_locking_end(void)
+bool posix_locking_end(void)
{
if (posix_pending_close_tdb && tdb_close(posix_pending_close_tdb) != 0) {
return False;
lock could be granted, False if not.
****************************************************************************/
-BOOL set_posix_lock_windows_flavour(files_struct *fsp,
+bool set_posix_lock_windows_flavour(files_struct *fsp,
SMB_BIG_UINT u_offset,
SMB_BIG_UINT u_count,
enum brl_type lock_type,
SMB_OFF_T offset;
SMB_OFF_T count;
int posix_lock_type = map_posix_lock_type(fsp,lock_type);
- BOOL ret = True;
+ bool ret = True;
size_t lock_count;
TALLOC_CTX *l_ctx = NULL;
struct lock_list *llist = NULL;
lock could be released, False if not.
****************************************************************************/
-BOOL release_posix_lock_windows_flavour(files_struct *fsp,
+bool release_posix_lock_windows_flavour(files_struct *fsp,
SMB_BIG_UINT u_offset,
SMB_BIG_UINT u_count,
enum brl_type deleted_lock_type,
{
SMB_OFF_T offset;
SMB_OFF_T count;
- BOOL ret = True;
+ bool ret = True;
TALLOC_CTX *ul_ctx = NULL;
struct lock_list *ulist = NULL;
struct lock_list *ul = NULL;
upper layer would have refused it.
****************************************************************************/
-BOOL set_posix_lock_posix_flavour(files_struct *fsp,
+bool set_posix_lock_posix_flavour(files_struct *fsp,
SMB_BIG_UINT u_offset,
SMB_BIG_UINT u_count,
enum brl_type lock_type,
have a different lock context.
****************************************************************************/
-BOOL release_posix_lock_posix_flavour(files_struct *fsp,
+bool release_posix_lock_posix_flavour(files_struct *fsp,
SMB_BIG_UINT u_offset,
SMB_BIG_UINT u_count,
const struct lock_context *lock_ctx,
const struct lock_struct *plocks,
int num_locks)
{
- BOOL ret = True;
+ bool ret = True;
SMB_OFF_T offset;
SMB_OFF_T count;
TALLOC_CTX *ul_ctx = NULL;
#include "gpfs_gpl.h"
static void *libgpfs_handle = NULL;
-static BOOL gpfs_share_modes;
+static bool gpfs_share_modes;
static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny);
static int (*gpfs_set_lease_fn)(int fd, unsigned int leaseType);
static int (*gpfs_putacl_fn)(char *pathname, int flags, void *acl);
-BOOL set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
+bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
uint32 share_access)
{
unsigned int allow = GPFS_SHARE_NONE;
return -1;
}
-BOOL set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
+bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
uint32 share_access)
{
DEBUG(0, ("VFS module - smbgpfs.so loaded, without gpfs support compiled\n"));
return 0;
}
-static BOOL smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */
+static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */
DOM_SID *psid_owner, /* in */
DOM_SID *psid_group, /* in */
SEC_ACE **ppnt_ace_list, /* out */
typedef struct _smbacl4_vfs_params {
enum smbacl4_mode_enum mode;
- BOOL do_chown;
+ bool do_chown;
enum smbacl4_acedup_enum acedup;
} smbacl4_vfs_params;
enum smbacl4_acedup_enum acedup,
SMB4ACL_T *acl, /* may modify it */
SMB_ACE4PROP_T *ace, /* the "new" ACE */
- BOOL *paddNewACE,
+ bool *paddNewACE,
int i
)
{
for(i=0; i<dacl->num_aces; i++) {
SMB_ACE4PROP_T ace_v4;
- BOOL addNewACE = True;
+ bool addNewACE = True;
if (smbacl4_fill_ace4(mem_ctx, pparams, ownerUID, ownerGID,
dacl->aces + i, &ace_v4))
{
smbacl4_vfs_params params;
SMB4ACL_T *acl = NULL;
- BOOL result;
+ bool result;
SMB_STRUCT_STAT sbuf;
uid_t newUID = (uid_t)-1;
/* Callback function needed to set the native acl
* when applicable */
-typedef BOOL (*set_nfs4acl_native_fn_t)(files_struct *, SMB4ACL_T *);
+typedef bool (*set_nfs4acl_native_fn_t)(files_struct *, SMB4ACL_T *);
NTSTATUS smb_set_nt_acl_nfs4(files_struct *fsp,
uint32 security_info_sent,
static char space_replacement = '%';
/* Do we expect SIDs as pts names? */
-static BOOL sidpts;
+static bool sidpts;
extern int afs_syscall(int, char *, int, char *, int);
struct afs_ace {
- BOOL positive;
+ bool positive;
char *name;
DOM_SID sid;
enum lsa_SidType type;
};
-static BOOL init_afs_acl(struct afs_acl *acl)
+static bool init_afs_acl(struct afs_acl *acl)
{
ZERO_STRUCT(*acl);
acl->ctx = talloc_init("afs_acl");
}
static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx,
- BOOL positive,
+ bool positive,
const char *name, uint32 rights)
{
DOM_SID sid;
}
static void add_afs_ace(struct afs_acl *acl,
- BOOL positive,
+ bool positive,
const char *name, uint32 rights)
{
struct afs_ace *ace;
* Second field: Rights
*/
-static BOOL parse_afs_acl(struct afs_acl *acl, const char *acl_str)
+static bool parse_afs_acl(struct afs_acl *acl, const char *acl_str)
{
int nplus, nminus;
int aces;
return True;
}
-static BOOL unparse_afs_acl(struct afs_acl *acl, char *acl_str)
+static bool unparse_afs_acl(struct afs_acl *acl, char *acl_str)
{
/* TODO: String length checks!!!! */
return;
}
-static BOOL same_principal(struct afs_ace *x, struct afs_ace *y)
+static bool same_principal(struct afs_ace *x, struct afs_ace *y)
{
return ( (x->positive == y->positive) &&
(sid_compare(&x->sid, &y->sid) == 0) );
for (ace = dir_acl->acelist; ace != NULL; ace = ace->next) {
struct afs_ace *file_ace;
- BOOL found = False;
+ bool found = False;
for (file_ace = file_acl->acelist;
file_ace != NULL;
for (ace = file_acl->acelist; ace != NULL; ace = ace->next) {
struct afs_ace *dir_ace;
- BOOL already_seen = False;
+ bool already_seen = False;
for (dir_ace = dir_acl->acelist;
dir_ace != NULL;
return sd_size;
}
-static BOOL mappable_sid(const DOM_SID *sid)
+static bool mappable_sid(const DOM_SID *sid)
{
DOM_SID domain_sid;
return False;
}
-static BOOL nt_to_afs_acl(const char *filename,
+static bool nt_to_afs_acl(const char *filename,
uint32 security_info_sent,
struct security_descriptor *psd,
uint32 (*nt_to_afs_rights)(const char *filename,
return True;
}
-static BOOL afs_get_afs_acl(char *filename, struct afs_acl *acl)
+static bool afs_get_afs_acl(char *filename, struct afs_acl *acl)
{
struct afs_iob iob;
extern struct current_user current_user;
extern int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid);
-extern BOOL unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp,
+extern bool unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp,
uint32 security_info_sent, SEC_DESC *psd);
extern SMB_ACL_T aixacl_to_smbacl( struct acl *file_acl);
return acl;
}
-static BOOL aixjfs2_get_nfs4_acl(files_struct *fsp,
- SMB4ACL_T **ppacl, BOOL *pretryPosix)
+static bool aixjfs2_get_nfs4_acl(files_struct *fsp,
+ SMB4ACL_T **ppacl, bool *pretryPosix)
{
int32_t i;
uint32 security_info, SEC_DESC **ppdesc)
{
SMB4ACL_T *pacl = NULL;
- BOOL result;
- BOOL retryPosix = False;
+ bool result;
+ bool retryPosix = False;
*ppdesc = NULL;
result = aixjfs2_get_nfs4_acl(fsp, &pacl, &retryPosix);
return 1; /* haven't found that ACL type. */
}
-static BOOL aixjfs2_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
+static bool aixjfs2_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
{
SMB4ACE_T *smbace;
TALLOC_CTX *mem_ctx;
* per-fsp data to make sure we only ever do this once. If pread is being
* emulated by seek/read/seek, when this will suck quite a lot.
*/
-static BOOL prime_cache(
+static bool prime_cache(
struct vfs_handle_struct * handle,
files_struct * fsp,
int fd,
static char *capdecode(char *to, const char *from);
static SMB_BIG_UINT cap_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)
{
pstring cappath;
}
-static BOOL cap_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath)
+static bool cap_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath)
{
pstring capoldpath, capnewpath;
capencode(capoldpath, oldpath);
return SMB_VFS_NEXT_SYMLINK(handle, capoldpath, capnewpath);
}
-static BOOL cap_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
+static bool cap_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
{
pstring cappath;
capencode(cappath, path);
return SMB_VFS_NEXT_NTIMES(handle, path, ts);
}
-static BOOL catia_symlink(vfs_handle_struct *handle,
+static bool catia_symlink(vfs_handle_struct *handle,
const char *oldpath, const char *newpath)
{
return SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath);
}
-static BOOL catia_readlink(vfs_handle_struct *handle,
+static bool catia_readlink(vfs_handle_struct *handle,
const char *path, char *buf, size_t bufsiz)
{
return SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz);
/* Disk operations */
-static SMB_BIG_UINT vfswrap_disk_free(vfs_handle_struct *handle, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+static SMB_BIG_UINT vfswrap_disk_free(vfs_handle_struct *handle, const char *path, bool small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
SMB_BIG_UINT result;
#endif
}
-static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
+static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
{
errno = ENOSYS;
return -1; /* Not implemented. */
static int vfswrap_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
{
int result;
- BOOL has_dacl = False;
+ bool has_dacl = False;
START_PROFILE(syscall_mkdir);
return result;
}
-static BOOL vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+static bool vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
- BOOL result;
+ bool result;
START_PROFILE(syscall_fcntl_lock);
result = fcntl_lock(fd, op, offset, count, type);
return 0;
}
-static BOOL vfswrap_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 vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
{
- BOOL result;
+ bool result;
START_PROFILE(syscall_fcntl_getlock);
result = fcntl_getlock(fd, poffset, pcount, ptype, ppid);
This is to redirect a DFS client to a host close to it.
***********************************************************/
-static BOOL read_target_host(const char *mapfile, pstring targethost)
+static bool read_target_host(const char *mapfile, pstring targethost)
{
XFILE *f;
pstring buf;
char *space = buf;
- BOOL found = False;
+ bool found = False;
f = x_fopen(mapfile, O_RDONLY, 0);
***********************************************************/
-static BOOL expand_msdfs_target(connection_struct* conn, pstring target)
+static bool expand_msdfs_target(connection_struct* conn, pstring target)
{
pstring mapfilename;
char *filename_start = strchr_m(target, '@');
static void smb_full_audit_disconnect(vfs_handle_struct *handle);
static SMB_BIG_UINT smb_full_audit_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);
static int smb_full_audit_get_quota(struct vfs_handle_struct *handle,
enum SMB_QUOTA_TYPE qtype, unid_t id,
SMB_DISK_QUOTA *qt);
static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- SHADOW_COPY_DATA *shadow_copy_data, BOOL labels);
+ SHADOW_COPY_DATA *shadow_copy_data, bool labels);
static int smb_full_audit_statvfs(struct vfs_handle_struct *handle,
const char *path,
struct vfs_statvfs_struct *statbuf);
const char *path, const struct timespec ts[2]);
static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
int fd, SMB_OFF_T len);
-static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd,
+static bool smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd,
int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
static int smb_full_audit_kernel_flock(struct vfs_handle_struct *handle,
struct files_struct *fsp, int fd,
uint32 share_mode);
static int smb_full_audit_linux_setlease(vfs_handle_struct *handle, files_struct *fsp,
int fd, int leasetype);
-static BOOL smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd,
+static bool smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd,
SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
static int smb_full_audit_symlink(vfs_handle_struct *handle,
const char *oldpath, const char *newpath);
return prefix;
}
-static BOOL log_success(vfs_handle_struct *handle, vfs_op_type op)
+static bool log_success(vfs_handle_struct *handle, vfs_op_type op)
{
struct vfs_full_audit_private_data *pd = NULL;
return bitmap_query(pd->success_ops, op);
}
-static BOOL log_failure(vfs_handle_struct *handle, vfs_op_type op)
+static bool log_failure(vfs_handle_struct *handle, vfs_op_type op)
{
struct vfs_full_audit_private_data *pd = NULL;
static void init_bitmap(struct bitmap **bm, const char **ops)
{
- BOOL log_all = False;
+ bool log_all = False;
if (*bm != NULL)
return;
while (*ops != NULL) {
int i;
- BOOL found = False;
+ bool found = False;
if (strequal(*ops, "all")) {
log_all = True;
return vfs_op_names[op].name;
}
-static void do_log(vfs_op_type op, BOOL success, vfs_handle_struct *handle,
+static void do_log(vfs_op_type op, bool success, vfs_handle_struct *handle,
const char *format, ...)
{
fstring err_msg;
static SMB_BIG_UINT smb_full_audit_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)
{
SMB_BIG_UINT result;
static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
+ SHADOW_COPY_DATA *shadow_copy_data, bool labels)
{
int result;
return result;
}
-static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd,
+static bool smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd,
int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
- BOOL result;
+ bool result;
result = SMB_VFS_NEXT_LOCK(handle, fsp, fd, op, offset, count, type);
return result;
}
-static BOOL smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd,
+static bool smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd,
SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
{
- BOOL result;
+ bool result;
result = SMB_VFS_NEXT_GETLOCK(handle, fsp, fd, poffset, pcount, ptype, ppid);
return gpfsacl_get_nt_acl_common(fsp, security_info, ppdesc);
}
-static BOOL gpfsacl_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
+static bool gpfsacl_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
{
int ret;
gpfs_aclLen_t gacl_len;
/* prototypes for private functions */
static HPUX_ACL_T hpux_acl_init(int count);
-static BOOL smb_acl_to_hpux_acl(SMB_ACL_T smb_acl,
+static bool smb_acl_to_hpux_acl(SMB_ACL_T smb_acl,
HPUX_ACL_T *solariacl, int *count,
SMB_ACL_TYPE_T type);
static SMB_ACL_T hpux_acl_to_smb_acl(HPUX_ACL_T hpuxacl, int count,
SMB_ACL_TYPE_T type);
static HPUX_ACL_TAG_T smb_tag_to_hpux_tag(SMB_ACL_TAG_T smb_tag);
static SMB_ACL_TAG_T hpux_tag_to_smb_tag(HPUX_ACL_TAG_T hpux_tag);
-static BOOL hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count,
+static bool hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count,
HPUX_ACL_T add_acl, int add_count, SMB_ACL_TYPE_T type);
-static BOOL hpux_acl_get_file(const char *name, HPUX_ACL_T *hpuxacl,
+static bool hpux_acl_get_file(const char *name, HPUX_ACL_T *hpuxacl,
int *count);
static SMB_ACL_PERM_T hpux_perm_to_smb_perm(const HPUX_PERM_T perm);
static HPUX_PERM_T smb_perm_to_hpux_perm(const SMB_ACL_PERM_T perm);
#if 0
-static BOOL hpux_acl_check(HPUX_ACL_T hpux_acl, int count);
+static bool hpux_acl_check(HPUX_ACL_T hpux_acl, int count);
#endif
/* aclsort (internal) and helpers: */
-static BOOL hpux_acl_sort(HPUX_ACL_T acl, int count);
+static bool hpux_acl_sort(HPUX_ACL_T acl, int count);
static int hpux_internal_aclsort(int acl_count, int calclass, HPUX_ACL_T aclp);
static void hpux_count_obj(int acl_count, HPUX_ACL_T aclp,
struct hpux_acl_types *acl_type_count);
static void hpux_swap_acl_entries(HPUX_ACE_T *aclp0, HPUX_ACE_T *aclp1);
-static BOOL hpux_prohibited_duplicate_type(int acl_type);
+static bool hpux_prohibited_duplicate_type(int acl_type);
-static BOOL hpux_acl_call_present(void);
-static BOOL hpux_aclsort_call_present(void);
+static bool hpux_acl_call_present(void);
+static bool hpux_aclsort_call_present(void);
/* public functions - the api */
* Convert the SMB acl to the ACCESS or DEFAULT part of a
* hpux ACL, as desired.
*/
-static BOOL smb_acl_to_hpux_acl(SMB_ACL_T smb_acl,
+static bool smb_acl_to_hpux_acl(SMB_ACL_T smb_acl,
HPUX_ACL_T *hpux_acl, int *count,
SMB_ACL_TYPE_T type)
{
- BOOL ret = False;
+ bool ret = False;
int i;
int check_which, check_rc;
}
-static BOOL hpux_acl_get_file(const char *name, HPUX_ACL_T *hpux_acl,
+static bool hpux_acl_get_file(const char *name, HPUX_ACL_T *hpux_acl,
int *count)
{
- BOOL result = False;
+ bool result = False;
static HPUX_ACE_T dummy_ace;
DEBUG(10, ("hpux_acl_get_file called for file '%s'\n", name));
* time. If it should become necessary to add all of an ACL, one
* would have to replace this parameter by another type.
*/
-static BOOL hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count,
+static bool hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count,
HPUX_ACL_T add_acl, int add_count,
SMB_ACL_TYPE_T type)
{
* happen aclsort() will fail and return an error and someone will
* have to fix it...)
*/
-static BOOL hpux_acl_sort(HPUX_ACL_T hpux_acl, int count)
+static bool hpux_acl_sort(HPUX_ACL_T hpux_acl, int count)
{
int fixmask = (count <= 4);
* False - If the ACL type doesn't match any of the prohibited types.
*/
-static BOOL hpux_prohibited_duplicate_type(int acl_type)
+static bool hpux_prohibited_duplicate_type(int acl_type)
{
switch(acl_type) {
case USER:
* calls if it isn't there.
*/
-static BOOL hpux_acl_call_present(void)
+static bool hpux_acl_call_present(void)
{
shl_t handle = NULL;
void *value;
int ret_val=0;
- static BOOL already_checked = False;
+ static bool already_checked = False;
if(already_checked)
return True;
* a dispatcher function could be handy...
*/
-static BOOL hpux_aclsort_call_present(void)
+static bool hpux_aclsort_call_present(void)
{
shl_t handle = NULL;
void *value;
int ret_val = 0;
- static BOOL already_checked = False;
+ static bool already_checked = False;
if (already_checked) {
return True;
* concrete error messages for debugging...
* (acl sort just says that the acl is invalid...)
*/
-static BOOL hpux_acl_check(HPUX_ACL_T hpux_acl, int count)
+static bool hpux_acl_check(HPUX_ACL_T hpux_acl, int count)
{
int check_rc;
int check_which;
static int atalk_rmdir(struct vfs_handle_struct *handle, const char *path)
{
- BOOL add = False;
+ bool add = False;
TALLOC_CTX *ctx = 0;
char *dpath;
* We want one FAM connection per smbd, not one per tcon.
*/
static FAMConnection fam_connection;
-static BOOL fam_connection_initialized = False;
+static bool fam_connection_initialized = False;
static struct fam_watch_context *fam_notify_list;
static void fam_handler(struct event_context *event_ctx,
/* prototypes for static functions first - for clarity */
-static BOOL smb_ace_to_internal(acl_entry_t posix_ace,
+static bool smb_ace_to_internal(acl_entry_t posix_ace,
struct smb_acl_entry *ace);
static struct smb_acl_t *smb_acl_to_internal(acl_t acl);
static int smb_acl_set_mode(acl_entry_t entry, SMB_ACL_PERM_T perm);
/* private functions */
-static BOOL smb_ace_to_internal(acl_entry_t posix_ace,
+static bool smb_ace_to_internal(acl_entry_t posix_ace,
struct smb_acl_entry *ace)
{
acl_tag_t tag;
#include "includes.h"
#if !defined(HAVE_LINUX_READAHEAD) && !defined(HAVE_POSIX_FADVISE)
-static BOOL didmsg;
+static bool didmsg;
#endif
struct readahead_data {
SMB_OFF_T off_bound;
SMB_OFF_T len;
- BOOL didmsg;
+ bool didmsg;
};
/*
return tmp_str;
}
-static BOOL recycle_keep_dir_tree(vfs_handle_struct *handle)
+static bool recycle_keep_dir_tree(vfs_handle_struct *handle)
{
- BOOL ret;
+ bool ret;
ret = lp_parm_bool(SNUM(handle->conn), "recycle", "keeptree", False);
return ret;
}
-static BOOL recycle_versions(vfs_handle_struct *handle)
+static bool recycle_versions(vfs_handle_struct *handle)
{
- BOOL ret;
+ bool ret;
ret = lp_parm_bool(SNUM(handle->conn), "recycle", "versions", False);
return ret;
}
-static BOOL recycle_touch(vfs_handle_struct *handle)
+static bool recycle_touch(vfs_handle_struct *handle)
{
- BOOL ret;
+ bool ret;
ret = lp_parm_bool(SNUM(handle->conn), "recycle", "touch", False);
return ret;
}
-static BOOL recycle_touch_mtime(vfs_handle_struct *handle)
+static bool recycle_touch_mtime(vfs_handle_struct *handle)
{
- BOOL ret;
+ bool ret;
ret = lp_parm_bool(SNUM(handle->conn), "recycle", "touch_mtime", False);
return (mode_t)dirmode;
}
-static BOOL recycle_directory_exist(vfs_handle_struct *handle, const char *dname)
+static bool recycle_directory_exist(vfs_handle_struct *handle, const char *dname)
{
SMB_STRUCT_STAT st;
return False;
}
-static BOOL recycle_file_exist(vfs_handle_struct *handle, const char *fname)
+static bool recycle_file_exist(vfs_handle_struct *handle, const char *fname)
{
SMB_STRUCT_STAT st;
* @param dname Directory tree to be created
* @return Returns True for success
**/
-static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname)
+static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname)
{
size_t len;
mode_t mode;
char *tmp_str = NULL;
char *token;
char *tok_str;
- BOOL ret = False;
+ bool ret = False;
mode = recycle_directory_mode(handle);
* Return True if found
**/
-static BOOL matchdirparam(const char **dir_exclude_list, char *path)
+static bool matchdirparam(const char **dir_exclude_list, char *path)
{
char *startp = NULL, *endp = NULL;
* @param needle string to be matched exectly to haystack including pattern matching
* @return True if found
**/
-static BOOL matchparam(const char **haystack_list, const char *needle)
+static bool matchparam(const char **haystack_list, const char *needle)
{
int i;
* Touch access or modify date
**/
static void recycle_do_touch(vfs_handle_struct *handle, const char *fname,
- BOOL touch_mtime)
+ bool touch_mtime)
{
SMB_STRUCT_STAT st;
struct timespec ts[2];
int i = 1;
SMB_OFF_T maxsize, minsize;
SMB_OFF_T file_size; /* space_avail; */
- BOOL exist;
+ bool exist;
int rc = -1;
repository = talloc_sub_advanced(NULL, lp_servicename(SNUM(conn)),
SMB_STRUCT_DIRENT *dirs;
} shadow_copy_Dir;
-static BOOL shadow_copy_match_name(const char *name)
+static bool shadow_copy_match_name(const char *name)
{
if (strncmp(SHADOW_COPY_PREFIX,name, sizeof(SHADOW_COPY_PREFIX)-1)==0 &&
(strlen(SHADOW_COPY_SAMPLE) == strlen(name))) {
return 0;
}
-static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
+static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
{
SMB_STRUCT_DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fsp->conn->connectpath,NULL,0);
/* prototypes for private functions */
static SOLARIS_ACL_T solaris_acl_init(int count);
-static BOOL smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
+static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
SOLARIS_ACL_T *solariacl, int *count,
SMB_ACL_TYPE_T type);
static SMB_ACL_T solaris_acl_to_smb_acl(SOLARIS_ACL_T solarisacl, int count,
SMB_ACL_TYPE_T type);
static SOLARIS_ACL_TAG_T smb_tag_to_solaris_tag(SMB_ACL_TAG_T smb_tag);
static SMB_ACL_TAG_T solaris_tag_to_smb_tag(SOLARIS_ACL_TAG_T solaris_tag);
-static BOOL solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count,
+static bool solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count,
SOLARIS_ACL_T add_acl, int add_count, SMB_ACL_TYPE_T type);
-static BOOL solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solarisacl,
+static bool solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solarisacl,
int *count);
-static BOOL solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solarisacl, int *count);
-static BOOL solaris_acl_sort(SOLARIS_ACL_T acl, int count);
+static bool solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solarisacl, int *count);
+static bool solaris_acl_sort(SOLARIS_ACL_T acl, int count);
static SMB_ACL_PERM_T solaris_perm_to_smb_perm(const SOLARIS_PERM_T perm);
static SOLARIS_PERM_T smb_perm_to_solaris_perm(const SMB_ACL_PERM_T perm);
-static BOOL solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count);
+static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count);
/* public functions - the api */
* Convert the SMB acl to the ACCESS or DEFAULT part of a
* solaris ACL, as desired.
*/
-static BOOL smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
+static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
SOLARIS_ACL_T *solaris_acl, int *count,
SMB_ACL_TYPE_T type)
{
- BOOL ret = False;
+ bool ret = False;
int i;
int check_which, check_rc;
}
-static BOOL solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solaris_acl,
+static bool solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solaris_acl,
int *count)
{
- BOOL result = False;
+ bool result = False;
DEBUG(10, ("solaris_acl_get_file called for file '%s'\n", name));
}
-static BOOL solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solaris_acl, int *count)
+static bool solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solaris_acl, int *count)
{
- BOOL ret = False;
+ bool ret = False;
DEBUG(10, ("entering solaris_acl_get_fd\n"));
* should become necessary to add all of an ACL, one would have
* to replace this parameter by another type.
*/
-static BOOL solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count,
+static bool solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count,
SOLARIS_ACL_T add_acl, int add_count,
SMB_ACL_TYPE_T type)
{
* happen aclsort() will fail and return an error and someone will
* have to fix it...)
*/
-static BOOL solaris_acl_sort(SOLARIS_ACL_T solaris_acl, int count)
+static bool solaris_acl_sort(SOLARIS_ACL_T solaris_acl, int count)
{
int fixmask = (count <= 4);
* concrete error messages for debugging...
* (acl sort just says that the acl is invalid...)
*/
-static BOOL solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count)
+static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count)
{
int check_rc;
int check_which;
/* prototypes for private functions first - for clarity */
static struct smb_acl_t *tru64_acl_to_smb_acl(const struct acl *tru64_acl);
-static BOOL tru64_ace_to_smb_ace(acl_entry_t tru64_ace,
+static bool tru64_ace_to_smb_ace(acl_entry_t tru64_ace,
struct smb_acl_entry *smb_ace);
static acl_t smb_acl_to_tru64_acl(const SMB_ACL_T smb_acl);
static acl_tag_t smb_tag_to_tru64(SMB_ACL_TAG_T smb_tag);
return NULL;
}
-static BOOL tru64_ace_to_smb_ace(acl_entry_t tru64_ace,
+static bool tru64_ace_to_smb_ace(acl_entry_t tru64_ace,
struct smb_acl_entry *smb_ace)
{
acl_tag_t tru64_tag;
}
/* call-back function processing the NT acl -> ZFS acl using NFSv4 conv. */
-static BOOL zfs_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
+static bool zfs_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
{
int naces = smb_get_naces(smbacl), i;
ace_t *acebuf;
/***************************************************************************
check if a particular name is already being queried
****************************************************************************/
-static BOOL query_current(struct query_record *r)
+static bool query_current(struct query_record *r)
{
return dns_current &&
nmb_name_equal(&r->name,
/***************************************************************************
write a query to the child process
****************************************************************************/
-static BOOL write_child(struct packet_struct *p)
+static bool write_child(struct packet_struct *p)
{
struct query_record r;
queue a DNS query
****************************************************************************/
-BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question)
+bool queue_dns_query(struct packet_struct *p,struct nmb_name *question)
{
if (in_dns || fd_in == -1)
return False;
we use this when we can't do async DNS lookups
****************************************************************************/
-BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question)
+bool queue_dns_query(struct packet_struct *p,struct nmb_name *question)
{
struct name_record *namerec = NULL;
struct in_addr dns_ip;
int ClientDGRAM = -1;
int global_nmb_port = -1;
-extern BOOL rescan_listen_set;
-extern BOOL global_in_nmbd;
+extern bool rescan_listen_set;
+extern bool global_in_nmbd;
-extern BOOL override_logfile;
+extern bool override_logfile;
/* are we running as a daemon ? */
-static BOOL is_daemon;
+static bool is_daemon;
/* fork or run in foreground ? */
-static BOOL Fork = True;
+static bool Fork = True;
/* log to standard output ? */
-static BOOL log_stdout;
+static bool log_stdout;
/* have we found LanMan clients yet? */
-BOOL found_lm_clients = False;
+bool found_lm_clients = False;
/* what server type are we currently */
Reload the list of network interfaces.
************************************************************************** */
-static BOOL reload_interfaces(time_t t)
+static bool reload_interfaces(time_t t)
{
static time_t lastt;
int n;
Reload the services file.
**************************************************************************** */
-static BOOL reload_nmbd_services(BOOL test)
+static bool reload_nmbd_services(bool test)
{
- BOOL ret;
+ bool ret;
set_remote_machine_name("nmbd", False);
/**************************************************************************** **
* React on 'smbcontrol nmbd reload-config' in the same way as to SIGHUP
- * We use buf here to return BOOL result to process() when reload_interfaces()
+ * We use buf here to return bool result to process() when reload_interfaces()
* detects that there are no subnets.
**************************************************************************** */
/* If reload_interfaces() returned True */
/* we need to shutdown if there are no subnets... */
/* pass this info back to process() */
- *((BOOL*)data->data) = reload_interfaces(0);
+ *((bool *)data->data) = reload_interfaces(0);
}
}
static void process(void)
{
- BOOL run_election;
- BOOL no_subnets;
+ bool run_election;
+ bool no_subnets;
while( True ) {
time_t t = time(NULL);
Open the socket communication.
**************************************************************************** */
-static BOOL open_sockets(BOOL isdaemon, int port)
+static bool open_sockets(bool isdaemon, int port)
{
/*
* The sockets opened here will be used to receive broadcast
int main(int argc, const char *argv[])
{
pstring logfile;
- static BOOL opt_interactive;
+ static bool opt_interactive;
poptContext pc;
static char *p_lmhosts = dyn_LMHOSTSFILE;
- static BOOL no_process_group = False;
+ static bool no_process_group = False;
int opt;
struct poptOption long_options[] = {
POPT_AUTOHELP
******************************************************************/
static void reset_workgroup_state( struct subnet_record *subrec, const char *workgroup_name,
- BOOL force_new_election )
+ bool force_new_election )
{
struct work_record *work;
struct server_record *servrec;
struct nmb_name *released_name,
struct in_addr released_ip)
{
- BOOL force_new_election = False;
+ bool force_new_election = False;
unstring relname;
- memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL));
+ memcpy((char *)&force_new_election, userdata->data, sizeof(bool));
DEBUG(3,("unbecome_local_master_success: released name %s.\n",
nmb_namestr(released_name)));
{
struct name_record *namerec;
struct userdata_struct *userdata = rrec->userdata;
- BOOL force_new_election = False;
+ bool force_new_election = False;
unstring failname;
- memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL));
+ memcpy((char *)&force_new_election, userdata->data, sizeof(bool));
DEBUG(0,("unbecome_local_master_fail: failed to release name %s. \
Removing from namelist anyway.\n", nmb_namestr(fail_name)));
******************************************************************/
static void release_1d_name( struct subnet_record *subrec, const char *workgroup_name,
- BOOL force_new_election)
+ bool force_new_election)
{
struct nmb_name nmbname;
struct name_record *namerec;
make_nmb_name(&nmbname, workgroup_name, 0x1d);
if((namerec = find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME))!=NULL) {
struct userdata_struct *userdata;
- size_t size = sizeof(struct userdata_struct) + sizeof(BOOL);
+ size_t size = sizeof(struct userdata_struct) + sizeof(bool);
if((userdata = (struct userdata_struct *)SMB_MALLOC(size)) == NULL) {
DEBUG(0,("release_1d_name: malloc fail.\n"));
userdata->copy_fn = NULL;
userdata->free_fn = NULL;
- userdata->userdata_len = sizeof(BOOL);
- memcpy((char *)userdata->data, &force_new_election, sizeof(BOOL));
+ userdata->userdata_len = sizeof(bool);
+ memcpy((char *)userdata->data, &force_new_election, sizeof(bool));
release_name(subrec, namerec,
unbecome_local_master_success,
******************************************************************/
void unbecome_local_master_browser(struct subnet_record *subrec, struct work_record *work,
- BOOL force_new_election)
+ bool force_new_election)
{
struct name_record *namerec;
struct nmb_name nmbname;
Determine if I win an election.
******************************************************************/
-static BOOL win_election(struct work_record *work, int version,
+static bool win_election(struct work_record *work, int version,
uint32 criterion, int timeup, const char *server_name)
{
int mytimeup = time(NULL) - StartupTime;
be done by run_elections().
***************************************************************************/
-BOOL check_elections(void)
+bool check_elections(void)
{
struct subnet_record *subrec;
- BOOL run_any_election = False;
+ bool run_any_election = False;
for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) {
struct work_record *work;
#include "includes.h"
-extern BOOL found_lm_clients;
+extern bool found_lm_clients;
#if 0
struct in_addr owner_ip;
struct nmb_name *question = &nmb->question.question_name;
unstring qname;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
uint16 nb_flags = get_nb_flags(nmb->additional->rdata);
- BOOL group = (nb_flags & NB_GROUP) ? True : False;
+ bool group = (nb_flags & NB_GROUP) ? True : False;
struct name_record *namerec;
int rcode = 0;
{
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
struct in_addr from_ip;
putip((char *)&from_ip,&nmb->additional->rdata[2]);
{
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
uint16 nb_flags = get_nb_flags(nmb->additional->rdata);
- BOOL group = (nb_flags & NB_GROUP) ? True : False;
+ bool group = (nb_flags & NB_GROUP) ? True : False;
struct name_record *namerec = NULL;
int ttl = nmb->additional->ttl;
struct in_addr from_ip;
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
int name_type = question->name_type;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
int ttl=0;
int rcode = 0;
char *prdata = NULL;
char rdata[6];
- BOOL success = False;
+ bool success = False;
struct name_record *namerec = NULL;
int reply_data_len = 0;
int i;
subnet it will be found by normal name query processing.
****************************************************************************/
-BOOL find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp)
+bool find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp)
{
struct name_record *namerec;
Also add the magic Samba names.
**************************************************************************/
-BOOL register_my_workgroup_and_names(void)
+bool register_my_workgroup_and_names(void)
{
struct subnet_record *subrec;
int i;
struct name_record *find_name_on_subnet(struct subnet_record *subrec,
const struct nmb_name *nmbname,
- BOOL self_only)
+ bool self_only)
{
struct nmb_name uc_name;
struct name_record *name_ret;
************************************************************************/
struct name_record *find_name_for_remote_broadcast_subnet(struct nmb_name *nmbname,
- BOOL self_only)
+ bool self_only)
{
struct subnet_record *subrec;
struct name_record *namerec;
Add an entry to a subnet name list.
***********************************************************************/
-BOOL add_name_to_subnet( struct subnet_record *subrec,
+bool add_name_to_subnet( struct subnet_record *subrec,
const char *name,
int type,
uint16 nb_flags,
int num_ips,
struct in_addr *iplist)
{
- BOOL ret = False;
+ bool ret = False;
struct name_record *namerec;
time_t time_now = time(NULL);
Utility function to check if an IP address exists in a name record.
******************************************************************/
-BOOL find_ip_in_name_record( struct name_record *namerec, struct in_addr ip )
+bool find_ip_in_name_record( struct name_record *namerec, struct in_addr ip )
{
int i;
struct packet_struct *p)
{
struct nmb_packet *nmb = &p->packet.nmb;
- BOOL success = False;
+ bool success = False;
struct nmb_name *question_name = &rrec->packet->packet.nmb.question.question_name;
struct in_addr answer_ip;
{
struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb;
/* We can only fail here, never succeed. */
- BOOL failed = True;
+ bool failed = True;
struct nmb_name *question_name = &sent_nmb->question.question_name;
if(rrec->num_msgs != 0) {
name is not there we look for the name on the given subnet.
****************************************************************************/
-static BOOL query_local_namelists(struct subnet_record *subrec, struct nmb_name *nmbname,
+static bool query_local_namelists(struct subnet_record *subrec, struct nmb_name *nmbname,
struct name_record **namerecp)
{
struct name_record *namerec;
Try and query for a name.
****************************************************************************/
-BOOL query_name(struct subnet_record *subrec, const char *name, int type,
+bool query_name(struct subnet_record *subrec, const char *name, int type,
query_name_success_function success_fn,
query_name_fail_function fail_fn,
struct userdata_struct *userdata)
Try and query for a name from nmbd acting as a WINS server.
****************************************************************************/
-BOOL query_name_from_wins_server(struct in_addr ip_to,
+bool query_name_from_wins_server(struct in_addr ip_to,
const char *name, int type,
query_name_success_function success_fn,
query_name_fail_function fail_fn,
*/
struct nmb_packet *nmb = &p->packet.nmb;
- BOOL bcast = nmb->header.nm_flags.bcast;
- BOOL success = True;
+ bool bcast = nmb->header.nm_flags.bcast;
+ bool success = True;
struct nmb_name *question_name = &rrec->packet->packet.nmb.question.question_name;
struct nmb_name *answer_name = &nmb->answers->rr_name;
struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb;
*/
struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb;
- BOOL bcast = sent_nmb->header.nm_flags.bcast;
- BOOL success = False;
+ bool bcast = sent_nmb->header.nm_flags.bcast;
+ bool success = False;
struct nmb_name *question_name = &sent_nmb->question.question_name;
uint16 nb_flags = 0;
int ttl = 0;
* error. If we are releasing unicast, then we expect to get a response.
*/
struct nmb_packet *nmb = &p->packet.nmb;
- BOOL bcast = nmb->header.nm_flags.bcast;
- BOOL success = True;
+ bool bcast = nmb->header.nm_flags.bcast;
+ bool success = True;
struct nmb_name *question_name = &rrec->packet->packet.nmb.question.question_name;
struct nmb_name *answer_name = &nmb->answers->rr_name;
struct in_addr released_ip;
doesn't respond and someone else wants the name then the
normal WACK/name query from the WINS server will cope */
struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb;
- BOOL bcast = sent_nmb->header.nm_flags.bcast;
+ bool bcast = sent_nmb->header.nm_flags.bcast;
struct nmb_name *question_name = &sent_nmb->question.question_name;
struct in_addr released_ip;
for (i = 0; i < namerec->data.num_ips; i++) {
struct in_addr wins_ip = wins_srv_ip_tag(wins_tags[t], namerec->data.ip[i]);
- BOOL last_one = ((i==namerec->data.num_ips - 1) && !wins_tags[t+1]);
+ bool last_one = ((i==namerec->data.num_ips - 1) && !wins_tags[t+1]);
if (queue_release_name(unicast_subnet,
release_name_response,
release_name_timeout_response,
Try and do a node status to a name - given the name & IP address.
****************************************************************************/
-BOOL node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
+bool node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
struct in_addr send_ip, node_status_success_function success_fn,
node_status_fail_function fail_fn, struct userdata_struct *userdata)
{
static void queue_packet(struct packet_struct *packet);
-BOOL rescan_listen_set = False;
+bool rescan_listen_set = False;
/*******************************************************************
Either loops back or sends out a completed NetBIOS packet.
**************************************************************************/
-static BOOL send_netbios_packet(struct packet_struct *p)
+static bool send_netbios_packet(struct packet_struct *p)
{
- BOOL loopback_this_packet = False;
+ bool loopback_this_packet = False;
/* Check if we are sending to or from ourselves as a WINS server. */
if(ismyip_v4(p->ip) && (p->port == global_nmb_port))
**************************************************************************/
static struct packet_struct *create_and_init_netbios_packet(struct nmb_name *nmbname,
- BOOL bcast, BOOL rec_des,
+ bool bcast, bool rec_des,
struct in_addr to_ip)
{
struct packet_struct *packet = NULL;
Sets up the common elements of register, refresh or release packet.
**************************************************************************/
-static BOOL create_and_init_additional_record(struct packet_struct *packet,
+static bool create_and_init_additional_record(struct packet_struct *packet,
uint16 nb_flags,
const struct in_addr *register_ip)
{
Sends out a name query.
**************************************************************************/
-static BOOL initiate_name_query_packet( struct packet_struct *packet)
+static bool initiate_name_query_packet( struct packet_struct *packet)
{
struct nmb_packet *nmb = NULL;
Sends out a name query - from a WINS server.
**************************************************************************/
-static BOOL initiate_name_query_packet_from_wins_server( struct packet_struct *packet)
+static bool initiate_name_query_packet_from_wins_server( struct packet_struct *packet)
{
struct nmb_packet *nmb = NULL;
Sends out a name register.
**************************************************************************/
-static BOOL initiate_name_register_packet( struct packet_struct *packet,
+static bool initiate_name_register_packet( struct packet_struct *packet,
uint16 nb_flags, const struct in_addr *register_ip)
{
struct nmb_packet *nmb = &packet->packet.nmb;
Sends out a multihomed name register.
**************************************************************************/
-static BOOL initiate_multihomed_name_register_packet(struct packet_struct *packet,
+static bool initiate_multihomed_name_register_packet(struct packet_struct *packet,
uint16 nb_flags, struct in_addr *register_ip)
{
struct nmb_packet *nmb = &packet->packet.nmb;
Sends out a name refresh.
**************************************************************************/
-static BOOL initiate_name_refresh_packet( struct packet_struct *packet,
+static bool initiate_name_refresh_packet( struct packet_struct *packet,
uint16 nb_flags, struct in_addr *refresh_ip)
{
struct nmb_packet *nmb = &packet->packet.nmb;
Sends out a name release.
**************************************************************************/
-static BOOL initiate_name_release_packet( struct packet_struct *packet,
+static bool initiate_name_release_packet( struct packet_struct *packet,
uint16 nb_flags, struct in_addr *release_ip)
{
struct nmb_packet *nmb = &packet->packet.nmb;
Sends out a node status.
**************************************************************************/
-static BOOL initiate_node_status_packet( struct packet_struct *packet )
+static bool initiate_node_status_packet( struct packet_struct *packet )
{
struct nmb_packet *nmb = &packet->packet.nmb;
broadcast subnet.
****************************************************************************/
-static BOOL assert_check_subnet(struct subnet_record *subrec)
+static bool assert_check_subnet(struct subnet_record *subrec)
{
if( subrec == remote_broadcast_subnet) {
DEBUG(0,("assert_check_subnet: Attempt to send packet on remote broadcast subnet. \
{
struct packet_struct *p;
struct response_record *rrec;
- BOOL ret;
+ bool ret;
/* Sanity check. */
if(subrec != unicast_subnet) {
struct nmb_packet *nmb = NULL;
struct res_rec answers;
struct nmb_packet *orig_nmb = &orig_packet->packet.nmb;
- BOOL loopback_this_packet = False;
+ bool loopback_this_packet = False;
int rr_type = RR_TYPE_NB;
const char *packet_type = "unknown";
stage as subsequent processing is expensive.
****************************************************************************/
-static BOOL listening(struct packet_struct *p,struct nmb_name *nbname)
+static bool listening(struct packet_struct *p,struct nmb_name *nbname)
{
struct subnet_record *subrec = NULL;
Validate a response nmb packet.
****************************************************************************/
-static BOOL validate_nmb_response_packet( struct nmb_packet *nmb )
+static bool validate_nmb_response_packet( struct nmb_packet *nmb )
{
- BOOL ignore = False;
+ bool ignore = False;
switch (nmb->header.opcode) {
case NMB_NAME_REG_OPCODE:
Validate a request nmb packet.
****************************************************************************/
-static BOOL validate_nmb_packet( struct nmb_packet *nmb )
+static bool validate_nmb_packet( struct nmb_packet *nmb )
{
- BOOL ignore = False;
+ bool ignore = False;
switch (nmb->header.opcode) {
case NMB_NAME_REG_OPCODE:
plus the broadcast sockets.
***************************************************************************/
-static BOOL create_listen_fdset(fd_set **ppset, int **psock_array, int *listen_number, int *maxfd)
+static bool create_listen_fdset(fd_set **ppset, int **psock_array, int *listen_number, int *maxfd)
{
int *sock_array = NULL;
struct subnet_record *subrec = NULL;
return True if the socket is dead
***************************************************************************/
-BOOL listen_for_packets(BOOL run_election)
+bool listen_for_packets(bool run_election)
{
static fd_set *listen_set = NULL;
static int listen_number = 0;
Construct and send a netbios DGRAM.
**************************************************************************/
-BOOL send_mailslot(BOOL unique, const char *mailslot,char *buf, size_t len,
+bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len,
const char *srcname, int src_type,
const char *dstname, int dest_type,
struct in_addr dest_ip,struct in_addr src_ip,
int dest_port)
{
- BOOL loopback_this_packet = False;
+ bool loopback_this_packet = False;
struct packet_struct p;
struct dgram_packet *dgram = &p.packet.dgram;
char *ptr,*p2;
uint16 lmnttoken = 0;
uint16 lm20token = 0;
uint32 domainsidsize;
- BOOL short_request = False;
+ bool short_request = False;
char *getdc;
char *uniuser; /* Unicode user name. */
pstring ascuser;
Check if a refresh is queued for a particular name on a particular subnet.
**************************************************************************/
-BOOL is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec)
+bool is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec)
{
struct response_record *rrec = NULL;
#include "includes.h"
extern int updatecount;
-extern BOOL found_lm_clients;
+extern bool found_lm_clients;
/****************************************************************************
Send a browser reset packet.
x_fprintf(fp, "\"%s\"\n", description);
}
-void write_browse_list(time_t t, BOOL force_write)
+void write_browse_list(time_t t, bool force_write)
{
struct subnet_record *subrec;
struct work_record *work;
uint32 stype;
int i;
XFILE *fp;
- BOOL list_changed = force_write;
+ bool list_changed = force_write;
static time_t lasttime = 0;
/* Always dump if we're being told to by a signal. */
Create subnet entries.
**************************************************************************/
-BOOL create_subnets(void)
+bool create_subnets(void)
{
/* We only count IPv4 interfaces whilst we're waiting. */
int num_interfaces = iface_count_v4();
Function to tell us if we can use the unicast subnet.
******************************************************************/
-BOOL we_are_a_wins_client(void)
+bool we_are_a_wins_client(void)
{
if (wins_srv_count() > 0) {
return True;
static void sync_child(char *name, int nm_type,
char *workgroup,
- struct in_addr ip, BOOL local, BOOL servers,
+ struct in_addr ip, bool local, bool servers,
char *fname)
{
fstring unix_workgroup;
void sync_browse_lists(struct work_record *work,
char *name, int nm_type,
- struct in_addr ip, BOOL local, BOOL servers)
+ struct in_addr ip, bool local, bool servers)
{
struct sync_record *s;
static int counter;
on the linked list. We will free this later in XXXX().
*****************************************************************************/
-struct name_record *find_name_on_wins_subnet(const struct nmb_name *nmbname, BOOL self_only)
+struct name_record *find_name_on_wins_subnet(const struct nmb_name *nmbname, bool self_only)
{
TDB_DATA data, key;
struct name_record *nr = NULL;
Overwrite or add a given name in the wins.tdb.
*****************************************************************************/
-static BOOL store_or_replace_wins_namerec(const struct name_record *namerec, int tdb_flag)
+static bool store_or_replace_wins_namerec(const struct name_record *namerec, int tdb_flag)
{
TDB_DATA key, data;
int ret;
Overwrite a given name in the wins.tdb.
*****************************************************************************/
-BOOL wins_store_changed_namerec(const struct name_record *namerec)
+bool wins_store_changed_namerec(const struct name_record *namerec)
{
return store_or_replace_wins_namerec(namerec, TDB_REPLACE);
}
Primary interface into creating and overwriting records in the wins.tdb.
*****************************************************************************/
-BOOL add_name_to_wins_subnet(const struct name_record *namerec)
+bool add_name_to_wins_subnet(const struct name_record *namerec)
{
return store_or_replace_wins_namerec(namerec, TDB_INSERT);
}
on the linked list.
*****************************************************************************/
-BOOL remove_name_from_wins_namelist(struct name_record *namerec)
+bool remove_name_from_wins_namelist(struct name_record *namerec)
{
TDB_DATA key;
int ret;
Return the general ID value and increase it if requested.
*****************************************************************************/
-static void get_global_id_and_update(SMB_BIG_UINT *current_id, BOOL update)
+static void get_global_id_and_update(SMB_BIG_UINT *current_id, bool update)
{
/*
* it's kept as a static here, to prevent people from messing
Determine if this packet should be allocated to the WINS server.
*****************************************************************************/
-BOOL packet_is_for_wins_server(struct packet_struct *packet)
+bool packet_is_for_wins_server(struct packet_struct *packet)
{
struct nmb_packet *nmb = &packet->packet.nmb;
Load or create the WINS database.
*****************************************************************************/
-BOOL initialise_wins(void)
+bool initialise_wins(void)
{
time_t time_now = time(NULL);
XFILE *fp;
int ttl;
const char *ptr;
char *p;
- BOOL got_token;
- BOOL was_ip;
+ bool got_token;
+ bool was_ip;
int i;
unsigned int hash;
int version;
{
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
uint16 nb_flags = get_nb_flags(nmb->additional->rdata);
- BOOL group = (nb_flags & NB_GROUP) ? True : False;
+ bool group = (nb_flags & NB_GROUP) ? True : False;
struct name_record *namerec = NULL;
int ttl = get_ttl_from_packet(nmb);
struct in_addr from_ip;
unstring name;
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
uint16 nb_flags = get_nb_flags(nmb->additional->rdata);
int ttl = get_ttl_from_packet(nmb);
struct name_record *namerec = NULL;
struct in_addr from_ip;
- BOOL registering_group_name = (nb_flags & NB_GROUP) ? True : False;
+ bool registering_group_name = (nb_flags & NB_GROUP) ? True : False;
struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
putip((char *)&from_ip,&nmb->additional->rdata[2]);
{
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
uint16 nb_flags = get_nb_flags(nmb->additional->rdata);
int ttl = get_ttl_from_packet(nmb);
struct name_record *namerec = NULL;
struct in_addr from_ip;
- BOOL group = (nb_flags & NB_GROUP) ? True : False;
+ bool group = (nb_flags & NB_GROUP) ? True : False;
struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
unstring qname;
{
struct nmb_packet *nmb = &p->packet.nmb;
struct nmb_name *question = &nmb->question.question_name;
- BOOL bcast = nmb->header.nm_flags.bcast;
+ bool bcast = nmb->header.nm_flags.bcast;
uint16 nb_flags = get_nb_flags(nmb->additional->rdata);
struct name_record *namerec = NULL;
struct in_addr from_ip;
- BOOL releasing_group_name = (nb_flags & NB_GROUP) ? True : False;;
+ bool releasing_group_name = (nb_flags & NB_GROUP) ? True : False;;
putip((char *)&from_ip,&nmb->additional->rdata[2]);
static int wins_processing_traverse_fn(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *state)
{
time_t t = *(time_t *)state;
- BOOL store_record = False;
+ bool store_record = False;
struct name_record *namerec = NULL;
struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
}
-void wins_write_database(time_t t, BOOL background)
+void wins_write_database(time_t t, bool background)
{
static time_t last_write_time = 0;
pstring fname, fnamenew;
struct name_record *namerec = NULL;
struct name_record *new_namerec = NULL;
struct nmb_name question;
- BOOL overwrite=False;
+ bool overwrite=False;
struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
int i;
Dump a copy of the workgroup database into the log file.
**************************************************************************/
-void dump_workgroups(BOOL force_write)
+void dump_workgroups(bool force_write)
{
struct subnet_record *subrec;
int debuglevel = force_write ? 0 : 4;
/* Call winbindd to convert a name to a sid */
-BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
+bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
enum lsa_SidType *name_type)
{
struct winbindd_request request;
/* Call winbindd to convert sid to name */
-BOOL winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **domain, const char **name,
enum lsa_SidType *name_type)
{
return True;
}
-BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
+bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
/* Call winbindd to convert SID to uid */
-BOOL winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid)
+bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert uid to sid */
-BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
+bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert SID to gid */
-BOOL winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid)
+bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert gid to sid */
-BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
+bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert SID to uid */
-BOOL winbind_sids_to_unixids(struct id_map *ids, int num_ids)
+bool winbind_sids_to_unixids(struct id_map *ids, int num_ids)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_idmap_dump_maps(TALLOC_CTX *memctx, const char *file)
+bool winbind_idmap_dump_maps(TALLOC_CTX *memctx, const char *file)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_allocate_uid(uid_t *uid)
+bool winbind_allocate_uid(uid_t *uid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-BOOL winbind_allocate_gid(gid_t *gid)
+bool winbind_allocate_gid(gid_t *gid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-BOOL winbind_set_mapping(const struct id_map *map)
+bool winbind_set_mapping(const struct id_map *map)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_set_uid_hwm(unsigned long id)
+bool winbind_set_uid_hwm(unsigned long id)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_set_gid_hwm(unsigned long id)
+bool winbind_set_gid_hwm(unsigned long id)
{
struct winbindd_request request;
struct winbindd_response response;
simple wrapper function to see if winbindd is alive
**********************************************************************/
-BOOL winbind_ping( void )
+bool winbind_ping( void )
{
NSS_STATUS result;
extern int winbindd_fd;
-static char winbind_separator_int(BOOL strict)
+static char winbind_separator_int(bool strict)
{
struct winbindd_response response;
- static BOOL got_sep;
+ static bool got_sep;
static char sep;
if (got_sep)
/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
form DOMAIN/user into a domain and a user */
-static BOOL parse_wbinfo_domain_user(const char *domuser, fstring domain,
+static bool parse_wbinfo_domain_user(const char *domuser, fstring domain,
fstring user)
{
/* pull pwent info for a given user */
-static BOOL wbinfo_get_userinfo(char *user)
+static bool wbinfo_get_userinfo(char *user)
{
struct winbindd_request request;
struct winbindd_response response;
}
/* pull pwent info for a given uid */
-static BOOL wbinfo_get_uidinfo(int uid)
+static bool wbinfo_get_uidinfo(int uid)
{
struct winbindd_request request;
struct winbindd_response response;
}
/* pull grent for a given group */
-static BOOL wbinfo_get_groupinfo(char *group)
+static bool wbinfo_get_groupinfo(char *group)
{
struct winbindd_request request;
struct winbindd_response response;
/* List groups a user is a member of */
-static BOOL wbinfo_get_usergroups(char *user)
+static bool wbinfo_get_usergroups(char *user)
{
struct winbindd_request request;
struct winbindd_response response;
/* List group SIDs a user SID is a member of */
-static BOOL wbinfo_get_usersids(char *user_sid)
+static bool wbinfo_get_usersids(char *user_sid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-static BOOL wbinfo_get_userdomgroups(const char *user_sid)
+static bool wbinfo_get_userdomgroups(const char *user_sid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Convert NetBIOS name to IP */
-static BOOL wbinfo_wins_byname(char *name)
+static bool wbinfo_wins_byname(char *name)
{
struct winbindd_request request;
struct winbindd_response response;
/* Convert IP to NetBIOS name */
-static BOOL wbinfo_wins_byip(char *ip)
+static bool wbinfo_wins_byip(char *ip)
{
struct winbindd_request request;
struct winbindd_response response;
/* List trusted domains */
-static BOOL wbinfo_list_domains(BOOL list_all_domains)
+static bool wbinfo_list_domains(bool list_all_domains)
{
struct winbindd_request request;
struct winbindd_response response;
/* List own domain */
-static BOOL wbinfo_list_own_domain(void)
+static bool wbinfo_list_own_domain(void)
{
d_printf("%s\n", get_winbind_domain());
}
/* show sequence numbers */
-static BOOL wbinfo_show_sequence(const char *domain)
+static bool wbinfo_show_sequence(const char *domain)
{
struct winbindd_request request;
struct winbindd_response response;
/* Show domain info */
-static BOOL wbinfo_domain_info(const char *domain_name)
+static bool wbinfo_domain_info(const char *domain_name)
{
struct winbindd_request request;
struct winbindd_response response;
}
/* Get a foreign DC's name */
-static BOOL wbinfo_getdcname(const char *domain_name)
+static bool wbinfo_getdcname(const char *domain_name)
{
struct winbindd_request request;
struct winbindd_response response;
}
/* Find a DC */
-static BOOL wbinfo_dsgetdcname(const char *domain_name, uint32_t flags)
+static bool wbinfo_dsgetdcname(const char *domain_name, uint32_t flags)
{
struct winbindd_request request;
struct winbindd_response response;
/* Check trust account password */
-static BOOL wbinfo_check_secret(void)
+static bool wbinfo_check_secret(void)
{
struct winbindd_response response;
NSS_STATUS result;
/* Convert uid to sid */
-static BOOL wbinfo_uid_to_sid(uid_t uid)
+static bool wbinfo_uid_to_sid(uid_t uid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Convert gid to sid */
-static BOOL wbinfo_gid_to_sid(gid_t gid)
+static bool wbinfo_gid_to_sid(gid_t gid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Convert sid to uid */
-static BOOL wbinfo_sid_to_uid(char *sid)
+static bool wbinfo_sid_to_uid(char *sid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-static BOOL wbinfo_sid_to_gid(char *sid)
+static bool wbinfo_sid_to_gid(char *sid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-static BOOL wbinfo_allocate_uid(void)
+static bool wbinfo_allocate_uid(void)
{
uid_t uid;
return True;
}
-static BOOL wbinfo_allocate_gid(void)
+static bool wbinfo_allocate_gid(void)
{
gid_t gid;
/* Convert sid to string */
-static BOOL wbinfo_lookupsid(char *sid)
+static bool wbinfo_lookupsid(char *sid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Lookup a list of RIDs */
-static BOOL wbinfo_lookuprids(char *domain, char *arg)
+static bool wbinfo_lookuprids(char *domain, char *arg)
{
size_t i;
DOM_SID sid;
/* Convert string to sid */
-static BOOL wbinfo_lookupname(char *name)
+static bool wbinfo_lookupname(char *name)
{
struct winbindd_request request;
struct winbindd_response response;
/* Authenticate a user with a plaintext password */
-static BOOL wbinfo_auth_krb5(char *username, const char *cctype, uint32 flags)
+static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32 flags)
{
struct winbindd_request request;
struct winbindd_response response;
/* Authenticate a user with a plaintext password */
-static BOOL wbinfo_auth(char *username)
+static bool wbinfo_auth(char *username)
{
struct winbindd_request request;
struct winbindd_response response;
/* Authenticate a user with a challenge/response */
-static BOOL wbinfo_auth_crap(char *username)
+static bool wbinfo_auth_crap(char *username)
{
struct winbindd_request request;
struct winbindd_response response;
/* Authenticate a user with a plaintext password and set a token */
-static BOOL wbinfo_klog(char *username)
+static bool wbinfo_klog(char *username)
{
struct winbindd_request request;
struct winbindd_response response;
/* Print domain users */
-static BOOL print_domain_users(const char *domain)
+static bool print_domain_users(const char *domain)
{
struct winbindd_request request;
struct winbindd_response response;
/* Print domain groups */
-static BOOL print_domain_groups(const char *domain)
+static bool print_domain_groups(const char *domain)
{
struct winbindd_request request;
struct winbindd_response response;
/* Set the authorised user for winbindd access in secrets.tdb */
-static BOOL wbinfo_set_auth_user(char *username)
+static bool wbinfo_set_auth_user(char *username)
{
const char *password;
char *p;
SAFE_FREE(password);
}
-static BOOL wbinfo_ping(void)
+static bool wbinfo_ping(void)
{
NSS_STATUS result;
}
break;
case 'a': {
- BOOL got_error = False;
+ bool got_error = False;
if (!wbinfo_auth(string_arg)) {
d_fprintf(stderr, "Could not authenticate user %s with "
static int initialised;
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname, struct hostent *he,
char *buffer, size_t buflen, int *h_errnop);
NODE_STATUS_STRUCT *status;
int i, count, len, size;
char response[1024];
- BOOL found = False;
+ bool found = False;
nsd_logprintf(NSD_LOG_MIN, "entering lookup (wins)\n");
if (! rq)
const char *name;
struct samu *sampass = NULL;
void (*oldsig_handler)(int);
- extern BOOL in_client;
+ extern bool in_client;
/* Samba initialization. */
load_case_tables();
} while (0)
static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl,
- const char *name, struct samu *sampass, BOOL exist);
+ const char *name, struct samu *sampass, bool exist);
/*
unsigned int ctrl;
int retval, *ret_data = NULL;
struct samu *sampass = NULL;
- extern BOOL in_client;
+ extern bool in_client;
const char *name;
void (*oldsig_handler)(int) = NULL;
- BOOL found;
+ bool found;
/* Points to memory managed by the PAM library. Do not free. */
char *p = NULL;
/* Helper function for adding a user to the db. */
static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl,
- const char *name, struct samu *sampass, BOOL exist)
+ const char *name, struct samu *sampass, bool exist)
{
pstring err_str;
pstring msg_str;
unsigned int ctrl;
int retval;
- extern BOOL in_client;
+ extern bool in_client;
struct samu *sampass = NULL;
void (*oldsig_handler)(int);
extern void _cleanup_failures(pam_handle_t *, void *, int);
/* compare 2 strings */
-extern BOOL strequal(const char *, const char *);
+extern bool strequal(const char *, const char *);
extern struct smb_passwd *
-_my_get_smbpwnam(FILE *, const char *, BOOL *, BOOL *, long *);
+_my_get_smbpwnam(FILE *, const char *, bool *, bool *, long *);
extern int _smb_verify_password( pam_handle_t *pamh , struct samu *sampass,
const char *p, unsigned int ctrl );
#include "includes.h"
-BOOL in_client = False; /* Not in the client by default */
-BOOL bLoaded = False;
+bool in_client = False; /* Not in the client by default */
+bool bLoaded = False;
extern pstring user_socket_options;
extern enum protocol_types Protocol;
#endif
static int regdb_last_seqnum = 0;
-static BOOL include_registry_globals = False;
+static bool include_registry_globals = False;
/* some helpful bits */
#define LP_SNUM_OK(i) (((i) >= 0) && ((i) < iNumServices) && (ServicePtrs != NULL) && ServicePtrs[(i)]->valid)
#define USERSHARE_VALID 1
#define USERSHARE_PENDING_DELETE 2
-BOOL use_getwd_cache = True;
+bool use_getwd_cache = True;
extern int extra_time_offset;
-static BOOL defaults_saved = False;
+static bool defaults_saved = False;
typedef struct _param_opt_struct param_opt_struct;
struct _param_opt_struct {
char *szWINSHook;
char *szUtmpDir;
char *szWtmpDir;
- BOOL bUtmp;
+ bool bUtmp;
char *szIdmapUID;
char *szIdmapGID;
- BOOL bPassdbExpandExplicit;
+ bool bPassdbExpandExplicit;
int AlgorithmicRidBase;
char *szTemplateHomedir;
char *szTemplateShell;
char *szWinbindSeparator;
- BOOL bWinbindEnumUsers;
- BOOL bWinbindEnumGroups;
- BOOL bWinbindUseDefaultDomain;
- BOOL bWinbindTrustedDomainsOnly;
- BOOL bWinbindNestedGroups;
- int winbind_expand_groups;
- BOOL bWinbindRefreshTickets;
- BOOL bWinbindOfflineLogon;
- BOOL bWinbindNormalizeNames;
- BOOL bWinbindRpcOnly;
+ bool bWinbindEnumUsers;
+ bool bWinbindEnumGroups;
+ bool bWinbindUseDefaultDomain;
+ bool bWinbindTrustedDomainsOnly;
+ bool bWinbindNestedGroups;
+ int winbind_expand_groups;
+ bool bWinbindRefreshTickets;
+ bool bWinbindOfflineLogon;
+ bool bWinbindNormalizeNames;
+ bool bWinbindRpcOnly;
char **szIdmapDomains;
char **szIdmapBackend; /* deprecated */
char *szIdmapAllocBackend;
int minprotocol;
int security;
char **AuthMethods;
- BOOL paranoid_server_security;
+ bool paranoid_server_security;
int maxdisksize;
int lpqcachetime;
int iMaxSmbdProcesses;
- BOOL bDisableSpoolss;
+ bool bDisableSpoolss;
int syslog;
int os_level;
int enhanced_browsing;
char *szIPrintServer;
char *ctdbdSocket;
char **szClusterAddresses;
- BOOL clustering;
- int ldap_passwd_sync;
+ bool clustering;
+ int ldap_passwd_sync;
int ldap_replication_sleep;
int ldap_timeout; /* This is initialised in init_globals */
int ldap_page_size;
- BOOL ldap_delete_dn;
- BOOL bMsAddPrinterWizard;
- BOOL bDNSproxy;
- BOOL bWINSsupport;
- BOOL bWINSproxy;
- BOOL bLocalMaster;
- BOOL bPreferredMaster;
- BOOL bDomainMaster;
- BOOL bDomainLogons;
- BOOL bEncryptPasswords;
- BOOL bUpdateEncrypt;
+ bool ldap_delete_dn;
+ bool bMsAddPrinterWizard;
+ bool bDNSproxy;
+ bool bWINSsupport;
+ bool bWINSproxy;
+ bool bLocalMaster;
+ int iPreferredMaster;
+ int iDomainMaster;
+ bool bDomainLogons;
+ bool bEncryptPasswords;
+ bool bUpdateEncrypt;
int clientSchannel;
int serverSchannel;
- BOOL bNullPasswords;
- BOOL bObeyPamRestrictions;
- BOOL bLoadPrinters;
+ bool bNullPasswords;
+ bool bObeyPamRestrictions;
+ bool bLoadPrinters;
int PrintcapCacheTime;
- BOOL bLargeReadwrite;
- BOOL bReadRaw;
- BOOL bWriteRaw;
- BOOL bSyslogOnly;
- BOOL bBrowseList;
- BOOL bNISHomeMap;
- BOOL bTimeServer;
- BOOL bBindInterfacesOnly;
- BOOL bPamPasswordChange;
- BOOL bUnixPasswdSync;
- BOOL bPasswdChatDebug;
+ bool bLargeReadwrite;
+ bool bReadRaw;
+ bool bWriteRaw;
+ bool bSyslogOnly;
+ bool bBrowseList;
+ bool bNISHomeMap;
+ bool bTimeServer;
+ bool bBindInterfacesOnly;
+ bool bPamPasswordChange;
+ bool bUnixPasswdSync;
+ bool bPasswdChatDebug;
int iPasswdChatTimeout;
- BOOL bTimestampLogs;
- BOOL bNTSmbSupport;
- BOOL bNTPipeSupport;
- BOOL bNTStatusSupport;
- BOOL bStatCache;
+ bool bTimestampLogs;
+ bool bNTSmbSupport;
+ bool bNTPipeSupport;
+ bool bNTStatusSupport;
+ bool bStatCache;
int iMaxStatCacheSize;
- BOOL bKernelOplocks;
- BOOL bAllowTrustedDomains;
- BOOL bLanmanAuth;
- BOOL bNTLMAuth;
- BOOL bUseSpnego;
- BOOL bClientLanManAuth;
- BOOL bClientNTLMv2Auth;
- BOOL bClientPlaintextAuth;
- BOOL bClientUseSpnego;
- BOOL bDebugPrefixTimestamp;
- BOOL bDebugHiresTimestamp;
- BOOL bDebugPid;
- BOOL bDebugUid;
- BOOL bDebugClass;
- BOOL bEnableCoreFiles;
- BOOL bHostMSDfs;
- BOOL bUseMmap;
- BOOL bHostnameLookups;
- BOOL bUnixExtensions;
- BOOL bDisableNetbios;
- BOOL bUseKerberosKeytab;
- BOOL bDeferSharingViolations;
- BOOL bEnablePrivileges;
- BOOL bASUSupport;
- BOOL bUsershareOwnerOnly;
- BOOL bUsershareAllowGuests;
- BOOL bRegistryShares;
+ bool bKernelOplocks;
+ bool bAllowTrustedDomains;
+ bool bLanmanAuth;
+ bool bNTLMAuth;
+ bool bUseSpnego;
+ bool bClientLanManAuth;
+ bool bClientNTLMv2Auth;
+ bool bClientPlaintextAuth;
+ bool bClientUseSpnego;
+ bool bDebugPrefixTimestamp;
+ bool bDebugHiresTimestamp;
+ bool bDebugPid;
+ bool bDebugUid;
+ bool bDebugClass;
+ bool bEnableCoreFiles;
+ bool bHostMSDfs;
+ bool bUseMmap;
+ bool bHostnameLookups;
+ bool bUnixExtensions;
+ bool bDisableNetbios;
+ bool bUseKerberosKeytab;
+ bool bDeferSharingViolations;
+ bool bEnablePrivileges;
+ bool bASUSupport;
+ bool bUsershareOwnerOnly;
+ bool bUsershareAllowGuests;
+ bool bRegistryShares;
int restrict_anonymous;
int name_cache_timeout;
int client_signing;
int iIdmapCacheTime;
int iIdmapNegativeCacheTime;
- BOOL bResetOnZeroVC;
+ bool bResetOnZeroVC;
int iKeepalive;
param_opt_struct *param_opt;
} global;
* This structure describes a single service.
*/
typedef struct {
- BOOL valid;
- BOOL autoloaded;
+ bool valid;
+ bool autoloaded;
int usershare;
time_t usershare_last_mod;
char *szService;
int iCSCPolicy;
int iBlock_size;
int iDfreeCacheTime;
- BOOL bPreexecClose;
- BOOL bRootpreexecClose;
+ bool bPreexecClose;
+ bool bRootpreexecClose;
int iCaseSensitive;
- BOOL bCasePreserve;
- BOOL bShortCasePreserve;
- BOOL bHideDotFiles;
- BOOL bHideSpecialFiles;
- BOOL bHideUnReadable;
- BOOL bHideUnWriteableFiles;
- BOOL bBrowseable;
- BOOL bAvailable;
- BOOL bRead_only;
- BOOL bNo_set_dir;
- BOOL bGuest_only;
- BOOL bGuest_ok;
- BOOL bPrint_ok;
- BOOL bMap_system;
- BOOL bMap_hidden;
- BOOL bMap_archive;
- BOOL bStoreDosAttributes;
- BOOL bDmapiSupport;
- BOOL bLocking;
+ bool bCasePreserve;
+ bool bShortCasePreserve;
+ bool bHideDotFiles;
+ bool bHideSpecialFiles;
+ bool bHideUnReadable;
+ bool bHideUnWriteableFiles;
+ bool bBrowseable;
+ bool bAvailable;
+ bool bRead_only;
+ bool bNo_set_dir;
+ bool bGuest_only;
+ bool bGuest_ok;
+ bool bPrint_ok;
+ bool bMap_system;
+ bool bMap_hidden;
+ bool bMap_archive;
+ bool bStoreDosAttributes;
+ bool bDmapiSupport;
+ bool bLocking;
int iStrictLocking;
- BOOL bPosixLocking;
- BOOL bShareModes;
- BOOL bOpLocks;
- BOOL bLevel2OpLocks;
- BOOL bOnlyUser;
- BOOL bMangledNames;
- BOOL bWidelinks;
- BOOL bSymlinks;
- BOOL bSyncAlways;
- BOOL bStrictAllocate;
- BOOL bStrictSync;
+ bool bPosixLocking;
+ bool bShareModes;
+ bool bOpLocks;
+ bool bLevel2OpLocks;
+ bool bOnlyUser;
+ bool bMangledNames;
+ bool bWidelinks;
+ bool bSymlinks;
+ bool bSyncAlways;
+ bool bStrictAllocate;
+ bool bStrictSync;
char magic_char;
- BOOL *copymap;
- BOOL bDeleteReadonly;
- BOOL bFakeOplocks;
- BOOL bDeleteVetoFiles;
- BOOL bDosFilemode;
- BOOL bDosFiletimes;
- BOOL bDosFiletimeResolution;
- BOOL bFakeDirCreateTimes;
- BOOL bBlockingLocks;
- BOOL bInheritPerms;
- BOOL bInheritACLS;
- BOOL bInheritOwner;
- BOOL bMSDfsRoot;
- BOOL bUseClientDriver;
- BOOL bDefaultDevmode;
- BOOL bForcePrintername;
- BOOL bNTAclSupport;
- BOOL bForceUnknownAclUser;
- BOOL bUseSendfile;
- BOOL bProfileAcls;
- BOOL bMap_acl_inherit;
- BOOL bAfs_Share;
- BOOL bEASupport;
- BOOL bAclCheckPermissions;
- BOOL bAclMapFullControl;
- BOOL bAclGroupControl;
- BOOL bChangeNotify;
- BOOL bKernelChangeNotify;
+ bool *copymap;
+ bool bDeleteReadonly;
+ bool bFakeOplocks;
+ bool bDeleteVetoFiles;
+ bool bDosFilemode;
+ bool bDosFiletimes;
+ bool bDosFiletimeResolution;
+ bool bFakeDirCreateTimes;
+ bool bBlockingLocks;
+ bool bInheritPerms;
+ bool bInheritACLS;
+ bool bInheritOwner;
+ bool bMSDfsRoot;
+ bool bUseClientDriver;
+ bool bDefaultDevmode;
+ bool bForcePrintername;
+ bool bNTAclSupport;
+ bool bForceUnknownAclUser;
+ bool bUseSendfile;
+ bool bProfileAcls;
+ bool bMap_acl_inherit;
+ bool bAfs_Share;
+ bool bEASupport;
+ bool bAclCheckPermissions;
+ bool bAclMapFullControl;
+ bool bAclGroupControl;
+ bool bChangeNotify;
+ bool bKernelChangeNotify;
int iallocation_roundup_size;
int iAioReadSize;
int iAioWriteSize;
static TDB_CONTEXT *ServiceHash;
static int *invalid_services = NULL;
static int num_invalid_services = 0;
-static BOOL bInGlobalSection = True;
-static BOOL bGlobalOnly = False;
+static bool bInGlobalSection = True;
+static bool bGlobalOnly = False;
static int server_role;
static int default_server_announce;
#define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
/* prototypes for the special type handlers */
-static BOOL handle_include( int snum, const char *pszParmValue, char **ptr);
-static BOOL handle_copy( int snum, const char *pszParmValue, char **ptr);
-static BOOL handle_netbios_name( int snum, const char *pszParmValue, char **ptr);
-static BOOL handle_idmap_uid( int snum, const char *pszParmValue, char **ptr);
-static BOOL handle_idmap_gid( int snum, const char *pszParmValue, char **ptr);
-static BOOL handle_debug_list( int snum, const char *pszParmValue, char **ptr );
-static BOOL handle_workgroup( int snum, const char *pszParmValue, char **ptr );
-static BOOL handle_netbios_aliases( int snum, const char *pszParmValue, char **ptr );
-static BOOL handle_netbios_scope( int snum, const char *pszParmValue, char **ptr );
-static BOOL handle_charset( int snum, const char *pszParmValue, char **ptr );
-static BOOL handle_printing( int snum, const char *pszParmValue, char **ptr);
+static bool handle_include( int snum, const char *pszParmValue, char **ptr);
+static bool handle_copy( int snum, const char *pszParmValue, char **ptr);
+static bool handle_netbios_name( int snum, const char *pszParmValue, char **ptr);
+static bool handle_idmap_uid( int snum, const char *pszParmValue, char **ptr);
+static bool handle_idmap_gid( int snum, const char *pszParmValue, char **ptr);
+static bool handle_debug_list( int snum, const char *pszParmValue, char **ptr );
+static bool handle_workgroup( int snum, const char *pszParmValue, char **ptr );
+static bool handle_netbios_aliases( int snum, const char *pszParmValue, char **ptr );
+static bool handle_netbios_scope( int snum, const char *pszParmValue, char **ptr );
+static bool handle_charset( int snum, const char *pszParmValue, char **ptr );
+static bool handle_printing( int snum, const char *pszParmValue, char **ptr);
static void set_server_role(void);
static void set_default_server_announce_type(void);
{"os level", P_INTEGER, P_GLOBAL, &Globals.os_level, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED},
{"lm announce", P_ENUM, P_GLOBAL, &Globals.lm_announce, NULL, enum_bool_auto, FLAG_ADVANCED},
{"lm interval", P_INTEGER, P_GLOBAL, &Globals.lm_interval, NULL, NULL, FLAG_ADVANCED},
- {"preferred master", P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_BASIC | FLAG_ADVANCED},
- {"prefered master", P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_HIDE},
+ {"preferred master", P_ENUM, P_GLOBAL, &Globals.iPreferredMaster, NULL, enum_bool_auto, FLAG_BASIC | FLAG_ADVANCED},
+ {"prefered master", P_ENUM, P_GLOBAL, &Globals.iPreferredMaster, NULL, enum_bool_auto, FLAG_HIDE},
{"local master", P_BOOL, P_GLOBAL, &Globals.bLocalMaster, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED},
- {"domain master", P_ENUM, P_GLOBAL, &Globals.bDomainMaster, NULL, enum_bool_auto, FLAG_BASIC | FLAG_ADVANCED},
+ {"domain master", P_ENUM, P_GLOBAL, &Globals.iDomainMaster, NULL, enum_bool_auto, FLAG_BASIC | FLAG_ADVANCED},
{"browse list", P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL, NULL, FLAG_ADVANCED},
{"browseable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT},
{"browsable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_HIDE},
Initialise the global parameter structure.
***************************************************************************/
-static void init_globals(BOOL first_time_only)
+static void init_globals(bool first_time_only)
{
- static BOOL done_init = False;
+ static bool done_init = False;
pstring s;
/* If requested to initialize only once and we've already done it... */
*/
Globals.bMsAddPrinterWizard = True;
- Globals.bPreferredMaster = Auto; /* depending on bDomainMaster */
Globals.os_level = 20;
Globals.bLocalMaster = True;
- Globals.bDomainMaster = Auto; /* depending on bDomainLogons */
+ Globals.iDomainMaster = Auto; /* depending on bDomainLogons */
Globals.bDomainLogons = False;
Globals.bBrowseList = True;
Globals.bWINSsupport = False;
#define FN_GLOBAL_LIST(fn_name,ptr) \
const char **fn_name(void) {return(*(const char ***)(ptr));}
#define FN_GLOBAL_BOOL(fn_name,ptr) \
- BOOL fn_name(void) {return(*(BOOL *)(ptr));}
+ bool fn_name(void) {return(*(bool *)(ptr));}
#define FN_GLOBAL_CHAR(fn_name,ptr) \
char fn_name(void) {return(*(char *)(ptr));}
#define FN_GLOBAL_INTEGER(fn_name,ptr) \
#define FN_LOCAL_LIST(fn_name,val) \
const char **fn_name(int i) {return(const char **)(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);}
#define FN_LOCAL_BOOL(fn_name,val) \
- BOOL fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);}
+ bool fn_name(int i) {return(bool)(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);}
#define FN_LOCAL_INTEGER(fn_name,val) \
int fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);}
#define FN_LOCAL_PARM_BOOL(fn_name,val) \
- BOOL fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
+ bool fn_name(const struct share_params *p) {return(bool)(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
#define FN_LOCAL_PARM_INTEGER(fn_name,val) \
int fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
#define FN_LOCAL_PARM_STRING(fn_name,val) \
/* local prototypes */
static int map_parameter(const char *pszParmName);
-static int map_parameter_canonical(const char *pszParmName, BOOL *inverse);
-static BOOL set_boolean(BOOL *pb, const char *pszParmValue);
-static const char *get_boolean(BOOL bool_value);
+static int map_parameter_canonical(const char *pszParmName, bool *inverse);
+static bool set_boolean(bool *pb, const char *pszParmValue);
+static const char *get_boolean(bool bool_value);
static int getservicebyname(const char *pszServiceName,
service * pserviceDest);
static void copy_service(service * pserviceDest,
- service * pserviceSource, BOOL *pcopymapDest);
-static BOOL do_parameter(const char *pszParmName, const char *pszParmValue);
-static BOOL do_section(const char *pszSectionName);
+ service * pserviceSource, bool *pcopymapDest);
+static bool do_parameter(const char *pszParmName, const char *pszParmValue);
+static bool do_section(const char *pszSectionName);
static void init_copymap(service * pservice);
-static BOOL hash_a_service(const char *name, int number);
+static bool hash_a_service(const char *name, int number);
static void free_service_byindex(int iService);
static char * canonicalize_servicename(const char *name);
static void show_parameter(int parmIndex);
-static BOOL is_synonym_of(int parm1, int parm2, BOOL *inverse);
+static bool is_synonym_of(int parm1, int parm2, bool *inverse);
/* This is a helper function for parametrical options support. */
/* It returns a pointer to parametrical option value if it exists or NULL otherwise */
/* Actual parametrical functions are quite simple */
static param_opt_struct *get_parametrics(int snum, const char *type, const char *option)
{
- BOOL global_section = False;
+ bool global_section = False;
char* param_key;
param_opt_struct *data;
/*******************************************************************
convenience routine to return boolean parameters.
********************************************************************/
-static BOOL lp_bool(const char *s)
+static bool lp_bool(const char *s)
{
- BOOL ret = False;
+ bool ret = False;
if (!s || !*s) {
MISSING_PARAMETER(lp_bool);
/* Return parametric option from a given service. Type is a part of option before ':' */
/* Parametric option has following syntax: 'Type: option = value' */
-BOOL lp_parm_bool(int snum, const char *type, const char *option, BOOL def)
+bool lp_parm_bool(int snum, const char *type, const char *option, bool def)
{
param_opt_struct *data = get_parametrics(snum, type, option);
Add a name/index pair for the services array to the hash table.
***************************************************************************/
-static BOOL hash_a_service(const char *name, int idx)
+static bool hash_a_service(const char *name, int idx)
{
char *canon_name;
from service ifrom.
***************************************************************************/
-BOOL lp_add_home(const char *pszHomename, int iDefaultService,
+bool lp_add_home(const char *pszHomename, int iDefaultService,
const char *user, const char *pszHomedir)
{
int i;
Add the IPC service.
***************************************************************************/
-static BOOL lp_add_ipc(const char *ipc_name, BOOL guest_ok)
+static bool lp_add_ipc(const char *ipc_name, bool guest_ok)
{
pstring comment;
int i = add_a_service(&sDefault, ipc_name);
Add a new printer service, with defaults coming from service iFrom.
***************************************************************************/
-BOOL lp_add_printer(const char *pszPrintername, int iDefaultService)
+bool lp_add_printer(const char *pszPrintername, int iDefaultService)
{
const char *comment = "From Printcap";
int i = add_a_service(ServicePtrs[iDefaultService], pszPrintername);
Parametric options (names containing a colon) are considered valid.
***************************************************************************/
-BOOL lp_parameter_is_valid(const char *pszParmName)
+bool lp_parameter_is_valid(const char *pszParmName)
{
return ((map_parameter(pszParmName) != -1) ||
(strchr(pszParmName, ':') != NULL));
and strings not belonging to any option.
***************************************************************************/
-BOOL lp_parameter_is_global(const char *pszParmName)
+bool lp_parameter_is_global(const char *pszParmName)
{
int num = map_parameter(pszParmName);
For parametric options, True is returned.
**************************************************************************/
-BOOL lp_parameter_is_canonical(const char *parm_name)
+bool lp_parameter_is_canonical(const char *parm_name)
{
if (!lp_parameter_is_valid(parm_name)) {
return False;
"usual" synonym.
**************************************************************************/
-BOOL lp_canonicalize_parameter(const char *parm_name, const char **canon_parm,
- BOOL *inverse)
+bool lp_canonicalize_parameter(const char *parm_name, const char **canon_parm,
+ bool *inverse)
{
int num;
Return false in all other cases.
**************************************************************************/
-BOOL lp_canonicalize_parameter_with_value(const char *parm_name,
+bool lp_canonicalize_parameter_with_value(const char *parm_name,
const char *val,
const char **canon_parm,
const char **canon_val)
{
int num;
- BOOL inverse;
+ bool inverse;
if (!lp_parameter_is_valid(parm_name)) {
*canon_parm = NULL;
Returns -1 if the parameter string is not recognised.
***************************************************************************/
-static int map_parameter_canonical(const char *pszParmName, BOOL *inverse)
+static int map_parameter_canonical(const char *pszParmName, bool *inverse)
{
int parm_num, canon_num;
- BOOL loc_inverse = False;
+ bool loc_inverse = False;
parm_num = map_parameter(pszParmName);
if ((parm_num < 0) || !(parm_table[parm_num].flags & FLAG_HIDE)) {
False otherwise.
***************************************************************************/
-static BOOL is_synonym_of(int parm1, int parm2, BOOL *inverse)
+static bool is_synonym_of(int parm1, int parm2, bool *inverse)
{
if ((parm_table[parm1].ptr == parm_table[parm2].ptr) &&
(parm_table[parm1].flags & FLAG_HIDE) &&
{
int enumIndex, flagIndex;
int parmIndex2;
- BOOL hadFlag;
- BOOL hadSyn;
- BOOL inverse;
+ bool hadFlag;
+ bool hadSyn;
+ bool inverse;
const char *type[] = { "P_BOOL", "P_BOOLREV", "P_CHAR", "P_INTEGER",
"P_OCTAL", "P_LIST", "P_STRING", "P_USTRING", "P_GSTRING",
"P_UGSTRING", "P_ENUM", "P_SEP"};
represent a boolean.
***************************************************************************/
-static BOOL set_boolean(BOOL *pb, const char *pszParmValue)
+static bool set_boolean(bool *pb, const char *pszParmValue)
{
- BOOL bRetval;
- BOOL value;
+ bool bRetval;
+ bool value;
bRetval = True;
value = False;
Check if a given string correctly represents a boolean value.
***************************************************************************/
-BOOL lp_string_is_valid_boolean(const char *parm_value)
+bool lp_string_is_valid_boolean(const char *parm_value)
{
return set_boolean(NULL, parm_value);
}
Get the standard string representation of a boolean value ("yes" or "no")
***************************************************************************/
-static const char *get_boolean(BOOL bool_value)
+static const char *get_boolean(bool bool_value)
{
static const char *yes_str = "yes";
static const char *no_str = "no";
represent a boolean.
***************************************************************************/
-BOOL lp_invert_boolean(const char *str, const char **inverse_str)
+bool lp_invert_boolean(const char *str, const char **inverse_str)
{
- BOOL val;
+ bool val;
if (!set_boolean(&val, str)) {
return False;
not correctly represent a boolean.
***************************************************************************/
-BOOL lp_canonicalize_boolean(const char *str, const char**canon_str)
+bool lp_canonicalize_boolean(const char *str, const char**canon_str)
{
- BOOL val;
+ bool val;
if (!set_boolean(&val, str)) {
return False;
If pcopymapDest is NULL then copy all fields
***************************************************************************/
-static void copy_service(service * pserviceDest, service * pserviceSource, BOOL *pcopymapDest)
+static void copy_service(service * pserviceDest, service * pserviceSource, bool *pcopymapDest)
{
int i;
- BOOL bcopyall = (pcopymapDest == NULL);
+ bool bcopyall = (pcopymapDest == NULL);
param_opt_struct *data, *pdata, *paramo;
- BOOL not_added;
+ bool not_added;
for (i = 0; parm_table[i].label; i++)
if (parm_table[i].ptr && parm_table[i].p_class == P_LOCAL &&
switch (parm_table[i].type) {
case P_BOOL:
case P_BOOLREV:
- *(BOOL *)dest_ptr = *(BOOL *)src_ptr;
+ *(bool *)dest_ptr = *(bool *)src_ptr;
break;
case P_INTEGER:
if (pserviceSource->copymap)
memcpy((void *)pserviceDest->copymap,
(void *)pserviceSource->copymap,
- sizeof(BOOL) * NUMPARAMETERS);
+ sizeof(bool) * NUMPARAMETERS);
}
data = pserviceSource->param_opt;
incomplete or faulty, else True.
***************************************************************************/
-BOOL service_ok(int iService)
+bool service_ok(int iService)
{
- BOOL bRetval;
+ bool bRetval;
bRetval = True;
if (ServicePtrs[iService]->szService[0] == '\0') {
* and regdb_unpack_values, circumventing any fancy stuff, to
* give us access to the registry globals.
*/
-static BOOL process_registry_globals(BOOL (*pfunc)(const char *, const char *))
+static bool process_registry_globals(bool (*pfunc)(const char *, const char *))
{
- BOOL ret = False;
+ bool ret = False;
struct tdb_wrap *reg_tdb = NULL;
WERROR err;
char *keystr;
* using the reg_api functions...
*
*/
-static BOOL process_registry_globals(BOOL (*pfunc)(const char *, const char *))
+static bool process_registry_globals(bool (*pfunc)(const char *, const char *))
{
- BOOL ret = False;
+ bool ret = False;
TALLOC_CTX *ctx = NULL;
char *regpath = NULL;
WERROR werr = WERR_OK;
Check if a config file has changed date.
********************************************************************/
-BOOL lp_file_list_changed(void)
+bool lp_file_list_changed(void)
{
struct file_lists *f = file_lists;
struct tdb_wrap *reg_tdb = NULL;
Note: We must *NOT* use string_set() here as ptr points to global_myname.
***************************************************************************/
-static BOOL handle_netbios_name(int snum, const char *pszParmValue, char **ptr)
+static bool handle_netbios_name(int snum, const char *pszParmValue, char **ptr)
{
- BOOL ret;
+ bool ret;
pstring netbios_name;
pstrcpy(netbios_name, pszParmValue);
return ret;
}
-static BOOL handle_charset(int snum, const char *pszParmValue, char **ptr)
+static bool handle_charset(int snum, const char *pszParmValue, char **ptr)
{
if (strcmp(*ptr, pszParmValue) != 0) {
string_set(ptr, pszParmValue);
-static BOOL handle_workgroup(int snum, const char *pszParmValue, char **ptr)
+static bool handle_workgroup(int snum, const char *pszParmValue, char **ptr)
{
- BOOL ret;
+ bool ret;
ret = set_global_myworkgroup(pszParmValue);
string_set(&Globals.szWorkgroup,lp_workgroup());
return ret;
}
-static BOOL handle_netbios_scope(int snum, const char *pszParmValue, char **ptr)
+static bool handle_netbios_scope(int snum, const char *pszParmValue, char **ptr)
{
- BOOL ret;
+ bool ret;
ret = set_global_scope(pszParmValue);
string_set(&Globals.szNetbiosScope,global_scope());
return ret;
}
-static BOOL handle_netbios_aliases(int snum, const char *pszParmValue, char **ptr)
+static bool handle_netbios_aliases(int snum, const char *pszParmValue, char **ptr)
{
str_list_free(&Globals.szNetbiosAliases);
Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL);
Handle the include operation.
***************************************************************************/
-static BOOL handle_include(int snum, const char *pszParmValue, char **ptr)
+static bool handle_include(int snum, const char *pszParmValue, char **ptr)
{
pstring fname;
pstrcpy(fname, pszParmValue);
Handle the interpretation of the copy parameter.
***************************************************************************/
-static BOOL handle_copy(int snum, const char *pszParmValue, char **ptr)
+static bool handle_copy(int snum, const char *pszParmValue, char **ptr)
{
- BOOL bRetval;
+ bool bRetval;
int iTemp;
service serviceTemp;
static uid_t idmap_uid_low, idmap_uid_high;
static gid_t idmap_gid_low, idmap_gid_high;
-BOOL lp_idmap_uid(uid_t *low, uid_t *high)
+bool lp_idmap_uid(uid_t *low, uid_t *high)
{
if (idmap_uid_low == 0 || idmap_uid_high == 0)
return False;
return True;
}
-BOOL lp_idmap_gid(gid_t *low, gid_t *high)
+bool lp_idmap_gid(gid_t *low, gid_t *high)
{
if (idmap_gid_low == 0 || idmap_gid_high == 0)
return False;
/* Do some simple checks on "idmap [ug]id" parameter values */
-static BOOL handle_idmap_uid(int snum, const char *pszParmValue, char **ptr)
+static bool handle_idmap_uid(int snum, const char *pszParmValue, char **ptr)
{
uint32 low, high;
return True;
}
-static BOOL handle_idmap_gid(int snum, const char *pszParmValue, char **ptr)
+static bool handle_idmap_gid(int snum, const char *pszParmValue, char **ptr)
{
uint32 low, high;
Handle the DEBUG level list.
***************************************************************************/
-static BOOL handle_debug_list( int snum, const char *pszParmValueIn, char **ptr )
+static bool handle_debug_list( int snum, const char *pszParmValueIn, char **ptr )
{
pstring pszParmValue;
/***************************************************************************
***************************************************************************/
-static BOOL handle_printing(int snum, const char *pszParmValue, char **ptr)
+static bool handle_printing(int snum, const char *pszParmValue, char **ptr)
{
static int parm_num = -1;
service *s;
{
int i;
SAFE_FREE(pservice->copymap);
- pservice->copymap = SMB_MALLOC_ARRAY(BOOL,NUMPARAMETERS);
+ pservice->copymap = SMB_MALLOC_ARRAY(bool,NUMPARAMETERS);
if (!pservice->copymap)
DEBUG(0,
("Couldn't allocate copymap!! (size %d)\n",
then assume we are in the globals.
***************************************************************************/
-BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue)
+bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue)
{
int parmnum, i, slen;
void *parm_ptr = NULL; /* where we are going to store the result */
pstring param_key;
char *sep;
param_opt_struct *paramo, *data;
- BOOL not_added;
+ bool not_added;
parmnum = map_parameter(pszParmName);
switch (parm_table[parmnum].type)
{
case P_BOOL:
- *(BOOL *)parm_ptr = lp_bool(pszParmValue);
+ *(bool *)parm_ptr = lp_bool(pszParmValue);
break;
case P_BOOLREV:
- *(BOOL *)parm_ptr = !lp_bool(pszParmValue);
+ *(bool *)parm_ptr = !lp_bool(pszParmValue);
break;
case P_INTEGER:
Process a parameter.
***************************************************************************/
-static BOOL do_parameter(const char *pszParmName, const char *pszParmValue)
+static bool do_parameter(const char *pszParmName, const char *pszParmValue)
{
if (!bInGlobalSection && bGlobalOnly)
return (True);
break;
case P_BOOL:
- fprintf(f, "%s", BOOLSTR(*(BOOL *)ptr));
+ fprintf(f, "%s", BOOLSTR(*(bool *)ptr));
break;
case P_BOOLREV:
- fprintf(f, "%s", BOOLSTR(!*(BOOL *)ptr));
+ fprintf(f, "%s", BOOLSTR(!*(bool *)ptr));
break;
case P_INTEGER:
Check if two parameters are equal.
***************************************************************************/
-static BOOL equal_parameter(parm_type type, void *ptr1, void *ptr2)
+static bool equal_parameter(parm_type type, void *ptr1, void *ptr2)
{
switch (type) {
case P_BOOL:
case P_BOOLREV:
- return (*((BOOL *)ptr1) == *((BOOL *)ptr2));
+ return (*((bool *)ptr1) == *((bool *)ptr2));
case P_INTEGER:
case P_ENUM:
Returns True on success, False on failure.
***************************************************************************/
-static BOOL do_section(const char *pszSectionName)
+static bool do_section(const char *pszSectionName)
{
- BOOL bRetval;
- BOOL isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) ||
+ bool bRetval;
+ bool isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) ||
(strwicmp(pszSectionName, GLOBAL_NAME2) == 0));
bRetval = False;
Determine if a partcular base parameter is currentl set to the default value.
***************************************************************************/
-static BOOL is_default(int i)
+static bool is_default(int i)
{
if (!defaults_saved)
return False;
case P_BOOL:
case P_BOOLREV:
return parm_table[i].def.bvalue ==
- *(BOOL *)parm_table[i].ptr;
+ *(bool *)parm_table[i].ptr;
case P_CHAR:
return parm_table[i].def.cvalue ==
*(char *)parm_table[i].ptr;
Return True if a local parameter is currently set to the global default.
***************************************************************************/
-BOOL lp_is_default(int snum, struct parm_struct *parm)
+bool lp_is_default(int snum, struct parm_struct *parm)
{
int pdiff = PTR_DIFF(parm->ptr, &sDefault);
Display the contents of a parameter of a single services record.
***************************************************************************/
-BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal)
+bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal)
{
int i;
- BOOL result = False;
+ bool result = False;
parm_class p_class;
unsigned flag = 0;
fstring local_parm_name;
/***************************************************************************
Display the contents of a single copy structure.
***************************************************************************/
-static void dump_copy_map(BOOL *pcopymap)
+static void dump_copy_map(bool *pcopymap)
{
int i;
if (!pcopymap)
Return TRUE if the passed service number is within range.
***************************************************************************/
-BOOL lp_snum_ok(int iService)
+bool lp_snum_ok(int iService)
{
return (LP_SNUM_OK(iService) && ServicePtrs[iService]->bAvailable);
}
Have we loaded a services file yet?
***************************************************************************/
-BOOL lp_loaded(void)
+bool lp_loaded(void)
{
return (bLoaded);
}
Unload unused services.
***************************************************************************/
-void lp_killunused(BOOL (*snumused) (int))
+void lp_killunused(bool (*snumused) (int))
{
int i;
for (i = 0; i < iNumServices; i++) {
case P_BOOL:
case P_BOOLREV:
parm_table[i].def.bvalue =
- *(BOOL *)parm_table[i].ptr;
+ *(bool *)parm_table[i].ptr;
break;
case P_CHAR:
parm_table[i].def.cvalue =
case SEC_USER:
if (lp_domain_logons()) {
- if (Globals.bDomainMaster) /* auto or yes */
+ if (Globals.iDomainMaster) /* auto or yes */
server_role = ROLE_DOMAIN_PDC;
else
server_role = ROLE_DOMAIN_BDC;
get their sorry ass fired.
***************************************************************************/
-static BOOL check_usershare_stat(const char *fname, SMB_STRUCT_STAT *psbuf)
+static bool check_usershare_stat(const char *fname, SMB_STRUCT_STAT *psbuf)
{
if (!S_ISREG(psbuf->st_mode)) {
DEBUG(0,("check_usershare_stat: file %s owned by uid %u is "
pstring sharepath,
pstring comment,
SEC_DESC **ppsd,
- BOOL *pallow_guest)
+ bool *pallow_guest)
{
const char **prefixallowlist = lp_usershare_prefix_allow_list();
const char **prefixdenylist = lp_usershare_prefix_deny_list();
int iService = -1;
TALLOC_CTX *ctx = NULL;
SEC_DESC *psd = NULL;
- BOOL guest_ok = False;
+ bool guest_ok = False;
/* Ensure share name doesn't contain invalid characters. */
if (!validate_net_name(file_name, INVALID_SHARENAME_CHARS, strlen(file_name))) {
Checks if a usershare entry has been modified since last load.
***************************************************************************/
-static BOOL usershare_exists(int iService, time_t *last_mod)
+static bool usershare_exists(int iService, time_t *last_mod)
{
SMB_STRUCT_STAT lsbuf;
const char *usersharepath = Globals.szUsersharePath;
False on failure.
***************************************************************************/
-BOOL lp_load(const char *pszFname,
- BOOL global_only,
- BOOL save_defaults,
- BOOL add_ipc,
- BOOL initialize_globals)
+bool lp_load(const char *pszFname,
+ bool global_only,
+ bool save_defaults,
+ bool add_ipc,
+ bool initialize_globals)
{
pstring n2;
- BOOL bRetval;
+ bool bRetval;
param_opt_struct *data, *pdata;
pstrcpy(n2, pszFname);
Display the contents of the services array in human-readable form.
***************************************************************************/
-void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint)
+void lp_dump(FILE *f, bool show_defaults, int maxtoprint)
{
int iService;
Display the contents of one service in human-readable form.
***************************************************************************/
-void lp_dump_one(FILE * f, BOOL show_defaults, int snum)
+void lp_dump_one(FILE * f, bool show_defaults, int snum)
{
if (VALID(snum)) {
if (ServicePtrs[snum]->szService[0] == '\0')
return (iService);
}
-BOOL share_defined(const char *service_name)
+bool share_defined(const char *service_name)
{
return (lp_servicenumber(service_name) != -1);
}
If we are PDC then prefer us as DMB
************************************************************/
-BOOL lp_domain_master(void)
+bool lp_domain_master(void)
{
- if (Globals.bDomainMaster == Auto)
+ if (Globals.iDomainMaster == Auto)
return (lp_server_role() == ROLE_DOMAIN_PDC);
- return Globals.bDomainMaster;
+ return (bool)Globals.iDomainMaster;
}
/***********************************************************
If we are DMB then prefer us as LMB
************************************************************/
-BOOL lp_preferred_master(void)
+bool lp_preferred_master(void)
{
- if (Globals.bPreferredMaster == Auto)
+ if (Globals.iPreferredMaster == Auto)
return (lp_local_master() && lp_domain_master());
- return Globals.bPreferredMaster;
+ return (bool)Globals.iPreferredMaster;
}
/*******************************************************************
int lp_major_announce_version(void)
{
- static BOOL got_major = False;
+ static bool got_major = False;
static int major_version = DEFAULT_MAJOR_VERSION;
char *vers;
char *p;
int lp_minor_announce_version(void)
{
- static BOOL got_minor = False;
+ static bool got_minor = False;
static int minor_version = DEFAULT_MINOR_VERSION;
char *vers;
char *p;
static uint32 spoolss_state;
-BOOL lp_disable_spoolss( void )
+bool lp_disable_spoolss( void )
{
if ( spoolss_state == SVCCTL_STATE_UNKNOWN )
spoolss_state = _lp_disable_spoolss() ? SVCCTL_STOPPED : SVCCTL_RUNNING;
Ensure we don't use sendfile if server smb signing is active.
********************************************************************/
-BOOL lp_use_sendfile(int snum)
+bool lp_use_sendfile(int snum)
{
/* Using sendfile blows the brains out of any DOS or Win9x TCP stack... JRA. */
if (Protocol < PROTOCOL_NT1) {
Turn off sendfile if we find the underlying OS doesn't support it.
********************************************************************/
-void set_use_sendfile(int snum, BOOL val)
+void set_use_sendfile(int snum, bool val)
{
if (LP_SNUM_OK(snum))
ServicePtrs[snum]->bUseSendfile = val;
Turn off storing DOS attributes if this share doesn't support it.
********************************************************************/
-void set_store_dos_attributes(int snum, BOOL val)
+void set_store_dos_attributes(int snum, bool val)
{
if (!LP_SNUM_OK(snum))
return;
Global state for POSIX pathname processing.
********************************************************************/
-static BOOL posix_pathnames;
+static bool posix_pathnames;
-BOOL lp_posix_pathnames(void)
+bool lp_posix_pathnames(void)
{
return posix_pathnames;
}
Global state for POSIX lock processing - CIFS unix extensions.
********************************************************************/
-BOOL posix_default_lock_was_set;
+bool posix_default_lock_was_set;
static enum brl_flavour posix_cifsx_locktype; /* By default 0 == WINDOWS_LOCK */
enum brl_flavour lp_posix_cifsu_locktype(files_struct *fsp)
#include "includes.h"
-extern BOOL in_client;
+extern bool in_client;
/* -------------------------------------------------------------------------- **
* Constants...
* ------------------------------------------------------------------------ **
*/
-static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *) )
+static bool Section( myFILE *InFile, bool (*sfunc)(const char *) )
{
int c;
int i;
* ------------------------------------------------------------------------ **
*/
-static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *), int c )
+static bool Parameter( myFILE *InFile, bool (*pfunc)(const char *, const char *), int c )
{
int i = 0; /* Position within bufr. */
int end = 0; /* bufr[end] is current end-of-string. */
* ------------------------------------------------------------------------ **
*/
-static BOOL Parse( myFILE *InFile,
- BOOL (*sfunc)(const char *),
- BOOL (*pfunc)(const char *, const char *) )
+static bool Parse( myFILE *InFile,
+ bool (*sfunc)(const char *),
+ bool (*pfunc)(const char *, const char *) )
{
int c;
* ------------------------------------------------------------------------ **
*/
-BOOL pm_process( const char *FileName,
- BOOL (*sfunc)(const char *),
- BOOL (*pfunc)(const char *, const char *) )
+bool pm_process( const char *FileName,
+ bool (*sfunc)(const char *),
+ bool (*pfunc)(const char *, const char *) )
{
int result;
myFILE *InFile;
static TDB_CONTEXT *cache;
-BOOL login_cache_init(void)
+bool login_cache_init(void)
{
char* cache_fname = NULL;
return (cache ? True : False);
}
-BOOL login_cache_shutdown(void)
+bool login_cache_shutdown(void)
{
/* tdb_close routine returns -1 on error */
if (!cache) return False;
return entry;
}
-BOOL login_cache_write(const struct samu *sampass, LOGIN_CACHE entry)
+bool login_cache_write(const struct samu *sampass, LOGIN_CACHE entry)
{
char *keystr;
TDB_DATA databuf;
- BOOL ret;
+ bool ret;
if (!login_cache_init())
return False;
return ret == 0;
}
-BOOL login_cache_delentry(const struct samu *sampass)
+bool login_cache_delentry(const struct samu *sampass)
{
int ret;
char *keystr;
to do guesswork.
*****************************************************************/
-BOOL lookup_name(TALLOC_CTX *mem_ctx,
+bool lookup_name(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
DOM_SID *ret_sid, enum lsa_SidType *ret_type)
and then "Unix Users"\foo (or "Unix Groups"\foo).
************************************************************************/
-BOOL lookup_name_smbconf(TALLOC_CTX *mem_ctx,
+bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
DOM_SID *ret_sid, enum lsa_SidType *ret_type)
ret_sid, ret_type);
}
-static BOOL wb_lookup_rids(TALLOC_CTX *mem_ctx,
+static bool wb_lookup_rids(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
return True;
}
-static BOOL lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
+static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
int num_rids, uint32_t *rids,
const char **domain_name,
const char ***names, enum lsa_SidType **types)
* Is the SID a domain as such? If yes, lookup its name.
*/
-static BOOL lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
+static bool lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
const char **name)
{
const char *tmp;
* Level 6: Like 4
*/
-static BOOL check_dom_sid_to_level(const DOM_SID *sid, int level)
+static bool check_dom_sid_to_level(const DOM_SID *sid, int level)
{
int ret = False;
*THE CANONICAL* convert SID to name function.
*****************************************************************/
-BOOL lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **ret_domain, const char **ret_name,
enum lsa_SidType *ret_type)
{
struct lsa_dom_info *domain;
struct lsa_name_info *name;
TALLOC_CTX *tmp_ctx;
- BOOL ret = False;
+ bool ret = False;
if (!(tmp_ctx = talloc_new(mem_ctx))) {
DEBUG(0, ("talloc_new failed\n"));
Find a SID given a uid.
*****************************************************************/
-static BOOL fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
+static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
{
struct uid_sid_cache *pc;
Find a uid given a SID.
*****************************************************************/
-static BOOL fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
+static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
{
struct uid_sid_cache *pc;
Find a SID given a gid.
*****************************************************************/
-static BOOL fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
+static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
{
struct gid_sid_cache *pc;
Find a gid given a SID.
*****************************************************************/
-static BOOL fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
+static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
{
struct gid_sid_cache *pc;
static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
{
uint32 rid;
- BOOL ret;
+ bool ret;
ZERO_STRUCTP(psid);
static void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
{
- BOOL ret;
+ bool ret;
ZERO_STRUCTP(psid);
*THE LEGACY* convert SID to uid function.
*****************************************************************/
-static BOOL legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
+static bool legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
{
enum lsa_SidType type;
uint32 rid;
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {
union unid_t id;
- BOOL ret;
+ bool ret;
become_root();
ret = pdb_sid_to_id(psid, &id, &type);
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-static BOOL legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
{
uint32 rid;
GROUP_MAP map;
if ((sid_check_is_in_builtin(psid) ||
sid_check_is_in_wellknown_domain(psid))) {
- BOOL ret;
+ bool ret;
become_root();
ret = pdb_getgrsid(&map, *psid);
}
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {
- BOOL ret;
+ bool ret;
become_root();
ret = pdb_sid_to_id(psid, &id, &type);
*THE CANONICAL* convert SID to uid function.
*****************************************************************/
-BOOL sid_to_uid(const DOM_SID *psid, uid_t *puid)
+bool sid_to_uid(const DOM_SID *psid, uid_t *puid)
{
uint32 rid;
gid_t gid;
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-BOOL sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+bool sid_to_gid(const DOM_SID *psid, gid_t *pgid)
{
uint32 rid;
uid_t uid;
style of SID storage
****************************************************************************/
-static BOOL read_sid_from_file(const char *fname, DOM_SID *sid)
+static bool read_sid_from_file(const char *fname, DOM_SID *sid)
{
char **lines;
int numlines;
- BOOL ret;
+ bool ret;
lines = file_lines_load(fname, &numlines,0);
Check if the SID is our domain SID (S-1-5-21-x-y-z).
*****************************************************************/
-BOOL sid_check_is_domain(const DOM_SID *sid)
+bool sid_check_is_domain(const DOM_SID *sid)
{
return sid_equal(sid, get_global_sam_sid());
}
Check if the SID is our domain SID (S-1-5-21-x-y-z).
*****************************************************************/
-BOOL sid_check_is_in_our_domain(const DOM_SID *sid)
+bool sid_check_is_in_our_domain(const DOM_SID *sid)
{
DOM_SID dom_sid;
uint32 rid;
attributes and a user SID.
*********************************************************************/
-static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *pwd, BOOL create)
+static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *pwd, bool create)
{
const char *guest_account = lp_guestaccount();
const char *domain = global_myname();
uint32 pdb_decode_acct_ctrl(const char *p)
{
uint32 acct_ctrl = 0;
- BOOL finished = False;
+ bool finished = False;
/*
* Check if the account type bits have been encoded after the
into a 16 byte array.
**************************************************************/
-BOOL pdb_gethexpwd(const char *p, unsigned char *pwd)
+bool pdb_gethexpwd(const char *p, unsigned char *pwd)
{
int i;
unsigned char lonybble, hinybble;
into a 21 byte array.
**************************************************************/
-BOOL pdb_gethexhours(const char *p, unsigned char *hours)
+bool pdb_gethexhours(const char *p, unsigned char *hours)
{
int i;
unsigned char lonybble, hinybble;
Decides if a RID is a well known RID.
********************************************************************/
-static BOOL rid_is_well_known(uint32 rid)
+static bool rid_is_well_known(uint32 rid)
{
/* Not using rid_offset here, because this is the actual
NT fixed value (1000) */
Decides if a RID is a user or group RID.
********************************************************************/
-BOOL algorithmic_pdb_rid_is_user(uint32 rid)
+bool algorithmic_pdb_rid_is_user(uint32 rid)
{
if ( rid_is_well_known(rid) ) {
/*
Convert a name into a SID. Used in the lookup name rpc.
********************************************************************/
-BOOL lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
+bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
enum lsa_SidType *type)
{
GROUP_MAP map;
- BOOL ret;
+ bool ret;
/* Windows treats "MACHINE\None" as a special name for
rid 513 on non-DCs. You cannot create a user or group
/*********************************************************************
*********************************************************************/
-BOOL init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen)
+bool init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen)
{
/* times are stored as 32bit integer
uint32 len = 0;
uint32 lm_pw_len, nt_pw_len, nt_pw_hist_len, hourslen;
uint32 pwHistLen = 0;
- BOOL ret = True;
+ bool ret = True;
fstring tmpstring;
- BOOL expand_explicit = lp_passdb_expand_explicit();
+ bool expand_explicit = lp_passdb_expand_explicit();
if(sampass == NULL || buf == NULL) {
DEBUG(0, ("init_sam_from_buffer_v3: NULL parameters found!\n"));
/*********************************************************************
*********************************************************************/
-uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, BOOL size_only)
+uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, bool size_only)
{
size_t len, buflen;
/*********************************************************************
*********************************************************************/
-BOOL pdb_copy_sam_account(struct samu *dst, struct samu *src )
+bool pdb_copy_sam_account(struct samu *dst, struct samu *src )
{
uint8 *buf = NULL;
int len;
Update the bad password count checking the AP_RESET_COUNT_TIME
*********************************************************************/
-BOOL pdb_update_bad_password_count(struct samu *sampass, BOOL *updated)
+bool pdb_update_bad_password_count(struct samu *sampass, bool *updated)
{
time_t LastBadPassword;
uint16 BadPasswordCount;
uint32 resettime;
- BOOL res;
+ bool res;
BadPasswordCount = pdb_get_bad_password_count(sampass);
if (!BadPasswordCount) {
Update the ACB_AUTOLOCK flag checking the AP_LOCK_ACCOUNT_DURATION
*********************************************************************/
-BOOL pdb_update_autolock_flag(struct samu *sampass, BOOL *updated)
+bool pdb_update_autolock_flag(struct samu *sampass, bool *updated)
{
uint32 duration;
time_t LastBadPassword;
- BOOL res;
+ bool res;
if (!(pdb_get_acct_ctrl(sampass) & ACB_AUTOLOCK)) {
DEBUG(9, ("pdb_update_autolock_flag: Account %s not autolocked, no check needed\n",
Increment the bad_password_count
*********************************************************************/
-BOOL pdb_increment_bad_password_count(struct samu *sampass)
+bool pdb_increment_bad_password_count(struct samu *sampass)
{
uint32 account_policy_lockout;
- BOOL autolock_updated = False, badpw_updated = False;
- BOOL ret;
+ bool autolock_updated = False, badpw_updated = False;
+ bool ret;
/* Retrieve the account lockout policy */
become_root();
Wrapper around retrieving the trust account password
*******************************************************************/
-BOOL get_trust_pw(const char *domain, uint8 ret_pwd[16], uint32 *channel)
+bool get_trust_pw(const char *domain, uint8 ret_pwd[16], uint32 *channel)
{
DOM_SID sid;
char *pwd;
return (0);
}
-BOOL pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag)
+bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag)
{
DOM_SID u_sid;
const DOM_SID *global_sam_sid;
return True;
}
-BOOL pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag)
+bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag)
{
DOM_SID g_sid;
const DOM_SID *global_sam_sid;
return sampass->pass_last_set_time + expire;
}
-BOOL pdb_get_pass_can_change(const struct samu *sampass)
+bool pdb_get_pass_can_change(const struct samu *sampass)
{
if (sampass->pass_can_change_time == get_time_t_max() &&
sampass->pass_last_set_time != 0)
if ( pdb_gid_to_sid(pwd->pw_gid, gsid) ) {
enum lsa_SidType type = SID_NAME_UNKNOWN;
TALLOC_CTX *mem_ctx = talloc_init("pdb_get_group_sid");
- BOOL lookup_ret;
+ bool lookup_ret;
if (!mem_ctx) {
return NULL;
Collection of set...() functions for struct samu.
********************************************************************/
-BOOL pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum pdb_value_state flag)
+bool pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum pdb_value_state flag)
{
sampass->acct_ctrl = acct_ctrl;
return pdb_set_init_flags(sampass, PDB_ACCTCTRL, flag);
}
-BOOL pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->logon_time = mytime;
return pdb_set_init_flags(sampass, PDB_LOGONTIME, flag);
}
-BOOL pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->logoff_time = mytime;
return pdb_set_init_flags(sampass, PDB_LOGOFFTIME, flag);
}
-BOOL pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->kickoff_time = mytime;
return pdb_set_init_flags(sampass, PDB_KICKOFFTIME, flag);
}
-BOOL pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->bad_password_time = mytime;
return pdb_set_init_flags(sampass, PDB_BAD_PASSWORD_TIME, flag);
}
-BOOL pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->pass_can_change_time = mytime;
return pdb_set_init_flags(sampass, PDB_CANCHANGETIME, flag);
}
-BOOL pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->pass_must_change_time = mytime;
return pdb_set_init_flags(sampass, PDB_MUSTCHANGETIME, flag);
}
-BOOL pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
+bool pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag)
{
sampass->pass_last_set_time = mytime;
return pdb_set_init_flags(sampass, PDB_PASSLASTSET, flag);
}
-BOOL pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state flag)
+bool pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state flag)
{
sampass->hours_len = len;
return pdb_set_init_flags(sampass, PDB_HOURSLEN, flag);
}
-BOOL pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum pdb_value_state flag)
+bool pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum pdb_value_state flag)
{
sampass->logon_divs = hours;
return pdb_set_init_flags(sampass, PDB_LOGONDIVS, flag);
* this flag is only added.
**/
-BOOL pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag)
+bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag)
{
if (!sampass->set_flags) {
if ((sampass->set_flags =
return True;
}
-BOOL pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value_state flag)
+bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value_state flag)
{
if (!u_sid)
return False;
return pdb_set_init_flags(sampass, PDB_USERSID, flag);
}
-BOOL pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag)
+bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag)
{
DOM_SID new_sid;
have to allow the explicitly setting of a group SID here.
********************************************************************/
-BOOL pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_value_state flag)
+bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_value_state flag)
{
gid_t gid;
Set the user's UNIX name.
********************************************************************/
-BOOL pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag)
+bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag)
{
if (username) {
DEBUG(10, ("pdb_set_username: setting username %s, was %s\n", username,
Set the domain name.
********************************************************************/
-BOOL pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag)
+bool pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag)
{
if (domain) {
DEBUG(10, ("pdb_set_domain: setting domain %s, was %s\n", domain,
Set the user's NT name.
********************************************************************/
-BOOL pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag)
+bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag)
{
if (nt_username) {
DEBUG(10, ("pdb_set_nt_username: setting nt username %s, was %s\n", nt_username,
Set the user's full name.
********************************************************************/
-BOOL pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag)
+bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag)
{
if (full_name) {
DEBUG(10, ("pdb_set_full_name: setting full name %s, was %s\n", full_name,
Set the user's logon script.
********************************************************************/
-BOOL pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag)
+bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag)
{
if (logon_script) {
DEBUG(10, ("pdb_set_logon_script: setting logon script %s, was %s\n", logon_script,
Set the user's profile path.
********************************************************************/
-BOOL pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag)
+bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag)
{
if (profile_path) {
DEBUG(10, ("pdb_set_profile_path: setting profile path %s, was %s\n", profile_path,
Set the user's directory drive.
********************************************************************/
-BOOL pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag)
+bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag)
{
if (dir_drive) {
DEBUG(10, ("pdb_set_dir_drive: setting dir drive %s, was %s\n", dir_drive,
Set the user's home directory.
********************************************************************/
-BOOL pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag)
+bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag)
{
if (home_dir) {
DEBUG(10, ("pdb_set_homedir: setting home dir %s, was %s\n", home_dir,
Set the user's account description.
********************************************************************/
-BOOL pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag)
+bool pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag)
{
if (acct_desc) {
sampass->acct_desc = talloc_strdup(sampass, acct_desc);
Set the user's workstation allowed list.
********************************************************************/
-BOOL pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag)
+bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag)
{
if (workstations) {
DEBUG(10, ("pdb_set_workstations: setting workstations %s, was %s\n", workstations,
/*********************************************************************
********************************************************************/
-BOOL pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag)
+bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag)
{
if (comment) {
sampass->comment = talloc_strdup(sampass, comment);
Set the user's dial string.
********************************************************************/
-BOOL pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag)
+bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag)
{
if (munged_dial) {
sampass->munged_dial = talloc_strdup(sampass, munged_dial);
Set the user's NT hash.
********************************************************************/
-BOOL pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag)
+bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag)
{
data_blob_clear_free(&sampass->nt_pw);
Set the user's LM hash.
********************************************************************/
-BOOL pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag)
+bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag)
{
data_blob_clear_free(&sampass->lm_pw);
in pwd.
********************************************************************/
-BOOL pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32 historyLen, enum pdb_value_state flag)
+bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32 historyLen, enum pdb_value_state flag)
{
if (historyLen && pwd){
sampass->nt_pw_his = data_blob_talloc(sampass,
below)
********************************************************************/
-BOOL pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag)
+bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag)
{
if (password) {
if (sampass->plaintext_pw!=NULL)
return pdb_set_init_flags(sampass, PDB_PLAINTEXT_PW, flag);
}
-BOOL pdb_set_bad_password_count(struct samu *sampass, uint16 bad_password_count, enum pdb_value_state flag)
+bool pdb_set_bad_password_count(struct samu *sampass, uint16 bad_password_count, enum pdb_value_state flag)
{
sampass->bad_password_count = bad_password_count;
return pdb_set_init_flags(sampass, PDB_BAD_PASSWORD_COUNT, flag);
}
-BOOL pdb_set_logon_count(struct samu *sampass, uint16 logon_count, enum pdb_value_state flag)
+bool pdb_set_logon_count(struct samu *sampass, uint16 logon_count, enum pdb_value_state flag)
{
sampass->logon_count = logon_count;
return pdb_set_init_flags(sampass, PDB_LOGON_COUNT, flag);
}
-BOOL pdb_set_unknown_6(struct samu *sampass, uint32 unkn, enum pdb_value_state flag)
+bool pdb_set_unknown_6(struct samu *sampass, uint32 unkn, enum pdb_value_state flag)
{
sampass->unknown_6 = unkn;
return pdb_set_init_flags(sampass, PDB_UNKNOWN6, flag);
}
-BOOL pdb_set_hours(struct samu *sampass, const uint8 *hours, enum pdb_value_state flag)
+bool pdb_set_hours(struct samu *sampass, const uint8 *hours, enum pdb_value_state flag)
{
if (!hours) {
memset ((char *)sampass->hours, 0, MAX_HOURS_LEN);
return pdb_set_init_flags(sampass, PDB_HOURS, flag);
}
-BOOL pdb_set_backend_private_data(struct samu *sampass, void *private_data,
+bool pdb_set_backend_private_data(struct samu *sampass, void *private_data,
void (*free_fn)(void **),
const struct pdb_methods *my_methods,
enum pdb_value_state flag)
/* Helpful interfaces to the above */
-BOOL pdb_set_pass_can_change(struct samu *sampass, BOOL canchange)
+bool pdb_set_pass_can_change(struct samu *sampass, bool canchange)
{
return pdb_set_pass_can_change_time(sampass,
canchange ? 0 : get_time_t_max(),
Also sets the last change time to NOW.
********************************************************************/
-BOOL pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext)
+bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext)
{
uchar new_lanman_p16[LM_HASH_LEN];
uchar new_nt_p16[NT_HASH_LEN];
static void lazy_initialize_passdb(void)
{
- static BOOL initialized = False;
+ static bool initialized = False;
if(initialized) {
return;
}
initialized = True;
}
-static BOOL lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
+static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
const char **name,
enum lsa_SidType *psid_name_use,
union unid_t *unix_id);
Return an already initialised pdn_methods structure
*******************************************************************/
-static struct pdb_methods *pdb_get_methods_reload( BOOL reload )
+static struct pdb_methods *pdb_get_methods_reload( bool reload )
{
static struct pdb_methods *pdb = NULL;
Backward compatibility functions for the original passdb interface
*******************************************************************/
-BOOL pdb_setsampwent(BOOL update, uint16 acb_mask)
+bool pdb_setsampwent(bool update, uint16 acb_mask)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb->setsampwent(pdb, update, acb_mask));
pdb->endsampwent(pdb);
}
-BOOL pdb_getsampwent(struct samu *user)
+bool pdb_getsampwent(struct samu *user)
{
struct pdb_methods *pdb = pdb_get_methods();
return True;
}
-BOOL pdb_getsampwnam(struct samu *sam_acct, const char *username)
+bool pdb_getsampwnam(struct samu *sam_acct, const char *username)
{
struct pdb_methods *pdb = pdb_get_methods();
/**********************************************************************
**********************************************************************/
-BOOL guest_user_info( struct samu *user )
+bool guest_user_info( struct samu *user )
{
struct passwd *pwd;
NTSTATUS result;
/**********************************************************************
**********************************************************************/
-BOOL pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid)
+bool pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
uint32 rid;
return status;
}
-NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, BOOL success)
+NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->update_login_attempts(pdb, sam_acct, success);
}
-BOOL pdb_getgrsid(GROUP_MAP *map, DOM_SID sid)
+bool pdb_getgrsid(GROUP_MAP *map, DOM_SID sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb->getgrsid(pdb, map, sid));
}
-BOOL pdb_getgrgid(GROUP_MAP *map, gid_t gid)
+bool pdb_getgrgid(GROUP_MAP *map, gid_t gid)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb->getgrgid(pdb, map, gid));
}
-BOOL pdb_getgrnam(GROUP_MAP *map, const char *name)
+bool pdb_getgrnam(GROUP_MAP *map, const char *name)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb->getgrnam(pdb, map, name));
return pdb->delete_group_mapping_entry(pdb, sid);
}
-BOOL pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
- size_t *p_num_entries, BOOL unix_only)
+bool pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
+ size_t *p_num_entries, bool unix_only)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb-> enum_group_mapping(pdb, sid, sid_name_use,
* fulfil.
*/
-static BOOL pdb_user_in_group(TALLOC_CTX *mem_ctx, struct samu *account,
+static bool pdb_user_in_group(TALLOC_CTX *mem_ctx, struct samu *account,
const DOM_SID *group_sid)
{
DOM_SID *sids;
}
#endif
-BOOL pdb_get_account_policy(int policy_index, uint32 *value)
+bool pdb_get_account_policy(int policy_index, uint32 *value)
{
struct pdb_methods *pdb = pdb_get_methods();
NTSTATUS status;
return NT_STATUS_IS_OK(status);
}
-BOOL pdb_set_account_policy(int policy_index, uint32 value)
+bool pdb_set_account_policy(int policy_index, uint32 value)
{
struct pdb_methods *pdb = pdb_get_methods();
NTSTATUS status;
return NT_STATUS_IS_OK(status);
}
-BOOL pdb_get_seq_num(time_t *seq_num)
+bool pdb_get_seq_num(time_t *seq_num)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb->get_seq_num(pdb, seq_num));
}
-BOOL pdb_uid_to_rid(uid_t uid, uint32 *rid)
+bool pdb_uid_to_rid(uid_t uid, uint32 *rid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->uid_to_rid(pdb, uid, rid);
}
-BOOL pdb_uid_to_sid(uid_t uid, DOM_SID *sid)
+bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->uid_to_sid(pdb, uid, sid);
}
-BOOL pdb_gid_to_sid(gid_t gid, DOM_SID *sid)
+bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->gid_to_sid(pdb, gid, sid);
}
-BOOL pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
+bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
enum lsa_SidType *type)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->sid_to_id(pdb, sid, id, type);
}
-BOOL pdb_rid_algorithm(void)
+bool pdb_rid_algorithm(void)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->rid_algorithm(pdb);
with add RIDs (assigned from previous algorithmic mappings)
********************************************************************/
-BOOL pdb_new_rid(uint32 *rid)
+bool pdb_new_rid(uint32 *rid)
{
struct pdb_methods *pdb = pdb_get_methods();
const char *name = NULL;
If uninitialised, context will auto-init on first use.
***************************************************************/
-BOOL initialize_password_db(BOOL reload, struct event_context *event_ctx)
+bool initialize_password_db(bool reload, struct event_context *event_ctx)
{
pdb_event_ctx = event_ctx;
return (pdb_get_methods_reload(reload) != NULL);
return NT_STATUS_NOT_IMPLEMENTED;
}
-static NTSTATUS pdb_default_update_login_attempts (struct pdb_methods *methods, struct samu *newpwd, BOOL success)
+static NTSTATUS pdb_default_update_login_attempts (struct pdb_methods *methods, struct samu *newpwd, bool success)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
-static NTSTATUS pdb_default_setsampwent(struct pdb_methods *methods, BOOL update, uint32 acb_mask)
+static NTSTATUS pdb_default_setsampwent(struct pdb_methods *methods, bool update, uint32 acb_mask)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
return NT_STATUS_OK;
}
-static BOOL pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid,
+static bool pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid,
DOM_SID *sid)
{
struct samu *sampw = NULL;
struct passwd *unix_pw;
- BOOL ret;
+ bool ret;
unix_pw = sys_getpwuid( uid );
return True;
}
-static BOOL pdb_default_uid_to_rid(struct pdb_methods *methods, uid_t uid,
+static bool pdb_default_uid_to_rid(struct pdb_methods *methods, uid_t uid,
uint32 *rid)
{
DOM_SID sid;
- BOOL ret;
+ bool ret;
ret = pdb_default_uid_to_sid(methods, uid, &sid);
if (!ret) {
return ret;
}
-static BOOL pdb_default_gid_to_sid(struct pdb_methods *methods, gid_t gid,
+static bool pdb_default_gid_to_sid(struct pdb_methods *methods, gid_t gid,
DOM_SID *sid)
{
GROUP_MAP map;
return True;
}
-static BOOL pdb_default_sid_to_id(struct pdb_methods *methods,
+static bool pdb_default_sid_to_id(struct pdb_methods *methods,
const DOM_SID *sid,
union unid_t *id, enum lsa_SidType *type)
{
TALLOC_CTX *mem_ctx;
- BOOL ret = False;
+ bool ret = False;
const char *name;
uint32 rid;
return ret;
}
-static BOOL add_uid_to_array_unique(TALLOC_CTX *mem_ctx,
+static bool add_uid_to_array_unique(TALLOC_CTX *mem_ctx,
uid_t uid, uid_t **pp_uids, size_t *p_num)
{
size_t i;
return True;
}
-static BOOL get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, size_t *p_num)
+static bool get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, size_t *p_num)
{
struct group *grp;
char **gr;
struct passwd *pwd;
- BOOL winbind_env;
- BOOL ret = False;
+ bool winbind_env;
+ bool ret = False;
*pp_uids = NULL;
*p_num = 0;
Look up a rid in the SAM we're responsible for (i.e. passdb)
********************************************************************/
-static BOOL lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
+static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
const char **name,
enum lsa_SidType *psid_name_use,
union unid_t *unix_id)
{
struct samu *sam_account = NULL;
GROUP_MAP map;
- BOOL ret;
+ bool ret;
DOM_SID sid;
*psid_name_use = SID_NAME_UNKNOWN;
{
int i;
NTSTATUS result;
- BOOL have_mapped = False;
- BOOL have_unmapped = False;
+ bool have_mapped = False;
+ bool have_unmapped = False;
if (sid_check_is_builtin(domain_sid)) {
{
int i;
NTSTATUS result;
- BOOL have_mapped = False;
- BOOL have_unmapped = False;
+ bool have_mapped = False;
+ bool have_unmapped = False;
if (sid_check_is_builtin(domain_sid)) {
entry->description = "";
}
-static BOOL user_search_in_progress = False;
+static bool user_search_in_progress = False;
struct user_search {
uint16 acct_flags;
};
-static BOOL next_entry_users(struct pdb_search *s,
+static bool next_entry_users(struct pdb_search *s,
struct samr_displayentry *entry)
{
struct user_search *state = (struct user_search *)s->private_data;
user_search_in_progress = False;
}
-static BOOL pdb_default_search_users(struct pdb_methods *methods,
+static bool pdb_default_search_users(struct pdb_methods *methods,
struct pdb_search *search,
uint32 acct_flags)
{
size_t num_groups, current_group;
};
-static BOOL next_entry_groups(struct pdb_search *s,
+static bool next_entry_groups(struct pdb_search *s,
struct samr_displayentry *entry)
{
struct group_search *state = (struct group_search *)s->private_data;
SAFE_FREE(state->groups);
}
-static BOOL pdb_search_grouptype(struct pdb_search *search,
+static bool pdb_search_grouptype(struct pdb_search *search,
const DOM_SID *sid, enum lsa_SidType type)
{
struct group_search *state;
return True;
}
-static BOOL pdb_default_search_groups(struct pdb_methods *methods,
+static bool pdb_default_search_groups(struct pdb_methods *methods,
struct pdb_search *search)
{
return pdb_search_grouptype(search, get_global_sam_sid(), SID_NAME_DOM_GRP);
}
-static BOOL pdb_default_search_aliases(struct pdb_methods *methods,
+static bool pdb_default_search_aliases(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid)
{
trustodm methods
*******************************************************************/
-BOOL pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid,
+bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid,
time_t *pass_last_set_time)
{
struct pdb_methods *pdb = pdb_get_methods();
pass_last_set_time);
}
-BOOL pdb_set_trusteddom_pw(const char* domain, const char* pwd,
+bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
const DOM_SID *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->set_trusteddom_pw(pdb, domain, pwd, sid);
}
-BOOL pdb_del_trusteddom_pw(const char *domain)
+bool pdb_del_trusteddom_pw(const char *domain)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->del_trusteddom_pw(pdb, domain);
to be replaced by pdb_ldap.
*******************************************************************/
-static BOOL pdb_default_get_trusteddom_pw(struct pdb_methods *methods,
+static bool pdb_default_get_trusteddom_pw(struct pdb_methods *methods,
const char *domain,
char** pwd,
DOM_SID *sid,
}
-static BOOL pdb_default_set_trusteddom_pw(struct pdb_methods *methods,
+static bool pdb_default_set_trusteddom_pw(struct pdb_methods *methods,
const char* domain,
const char* pwd,
const DOM_SID *sid)
return secrets_store_trusted_domain_password(domain, pwd, sid);
}
-static BOOL pdb_default_del_trusteddom_pw(struct pdb_methods *methods,
+static bool pdb_default_del_trusteddom_pw(struct pdb_methods *methods,
const char *domain)
{
return trusted_domain_password_delete(domain);
(Based on init_sam_from_buffer in pdb_tdb.c)
*********************************************************************/
-static BOOL init_sam_from_ldap(struct ldapsam_privates *ldap_state,
+static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
struct samu * sampass,
LDAPMessage * entry)
{
uint32 user_rid;
uint8 smblmpwd[LM_HASH_LEN],
smbntpwd[NT_HASH_LEN];
- BOOL use_samba_attrs = True;
+ bool use_samba_attrs = True;
uint32 acct_ctrl = 0;
uint16 logon_divs;
uint16 bad_password_count = 0,
LOGIN_CACHE *cache_entry = NULL;
uint32 pwHistLen;
pstring tmpstring;
- BOOL expand_explicit = lp_passdb_expand_explicit();
+ bool expand_explicit = lp_passdb_expand_explicit();
/*
* do a little initialization
history_string, sizeof(history_string))) {
/* leave as default - zeros */
} else {
- BOOL hex_failed = False;
+ bool hex_failed = False;
for (i = 0; i < pwHistLen; i++){
/* Get the 16 byte salt. */
if (!pdb_gethexpwd(&history_string[i*64], &pwhist[i*PW_HISTORY_ENTRY_LEN])) {
(Based on init_buffer_from_sam in pdb_tdb.c)
*********************************************************************/
-static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state,
+static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
LDAPMessage *existing,
LDAPMod *** mods, struct samu * sampass,
- BOOL (*need_update)(const struct samu *,
+ bool (*need_update)(const struct samu *,
enum pdb_elements))
{
pstring temp;
Connect to LDAP server for password enumeration.
*********************************************************************/
-static NTSTATUS ldapsam_setsampwent(struct pdb_methods *my_methods, BOOL update, uint32 acb_mask)
+static NTSTATUS ldapsam_setsampwent(struct pdb_methods *my_methods, bool update, uint32 acb_mask)
{
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
int rc;
pstring filter, suffix;
const char **attr_list;
- BOOL machine_mask = False, user_mask = False;
+ bool machine_mask = False, user_mask = False;
pstr_sprintf( filter, "(&%s%s)", "(uid=%u)",
get_objclass_filter(ldap_state->schema_ver));
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)my_methods->private_data;
- BOOL bret = False;
+ bool bret = False;
while (!bret) {
if (!ldap_state->entry)
static NTSTATUS ldapsam_modify_entry(struct pdb_methods *my_methods,
struct samu *newpwd, char *dn,
LDAPMod **mods, int ldap_op,
- BOOL (*need_update)(const struct samu *, enum pdb_elements))
+ bool (*need_update)(const struct samu *, enum pdb_elements))
{
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
int rc;
we need LDAP modification.
*********************************************************************/
-static BOOL element_is_changed(const struct samu *sampass,
+static bool element_is_changed(const struct samu *sampass,
enum pdb_elements element)
{
return IS_SAM_CHANGED(sampass, element);
we need LDAP modification.
*********************************************************************/
-static BOOL element_is_set_or_changed(const struct samu *sampass,
+static bool element_is_set_or_changed(const struct samu *sampass,
enum pdb_elements element)
{
return (IS_SAM_SET(sampass, element) ||
/**********************************************************************
*********************************************************************/
-static BOOL init_group_from_ldap(struct ldapsam_privates *ldap_state,
+static bool init_group_from_ldap(struct ldapsam_privates *ldap_state,
GROUP_MAP *map, LDAPMessage *entry)
{
pstring temp;
return ldapsam_getgroup(methods, filter, map);
}
-static BOOL ldapsam_extract_rid_from_entry(LDAP *ldap_struct,
+static bool ldapsam_extract_rid_from_entry(LDAP *ldap_struct,
LDAPMessage *entry,
const DOM_SID *domain_sid,
uint32 *rid)
*********************************************************************/
static NTSTATUS ldapsam_setsamgrent(struct pdb_methods *my_methods,
- BOOL update)
+ bool update)
{
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)my_methods->private_data;
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)my_methods->private_data;
- BOOL bret = False;
+ bool bret = False;
while (!bret) {
if (!ldap_state->entry)
const DOM_SID *domsid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap,
size_t *p_num_entries,
- BOOL unix_only)
+ bool unix_only)
{
GROUP_MAP map;
size_t entries = 0;
NTSTATUS result = NT_STATUS_NO_MEMORY;
TALLOC_CTX *mem_ctx;
LDAP *ld;
- BOOL is_builtin;
+ bool is_builtin;
mem_ctx = talloc_new(NULL);
if (mem_ctx == NULL) {
void *pagedresults_cookie;
LDAPMessage *entries, *current_entry;
- BOOL (*ldap2displayentry)(struct ldap_search_state *state,
+ bool (*ldap2displayentry)(struct ldap_search_state *state,
TALLOC_CTX *mem_ctx,
LDAP *ld, LDAPMessage *entry,
struct samr_displayentry *result);
};
-static BOOL ldapsam_search_firstpage(struct pdb_search *search)
+static bool ldapsam_search_firstpage(struct pdb_search *search)
{
struct ldap_search_state *state =
(struct ldap_search_state *)search->private_data;
return True;
}
-static BOOL ldapsam_search_nextpage(struct pdb_search *search)
+static bool ldapsam_search_nextpage(struct pdb_search *search)
{
struct ldap_search_state *state =
(struct ldap_search_state *)search->private_data;
return True;
}
-static BOOL ldapsam_search_next_entry(struct pdb_search *search,
+static bool ldapsam_search_next_entry(struct pdb_search *search,
struct samr_displayentry *entry)
{
struct ldap_search_state *state =
(struct ldap_search_state *)search->private_data;
- BOOL result;
+ bool result;
retry:
if ((state->entries == NULL) && (state->pagedresults_cookie == NULL))
return;
}
-static BOOL ldapuser2displayentry(struct ldap_search_state *state,
+static bool ldapuser2displayentry(struct ldap_search_state *state,
TALLOC_CTX *mem_ctx,
LDAP *ld, LDAPMessage *entry,
struct samr_displayentry *result)
}
-static BOOL ldapsam_search_users(struct pdb_methods *methods,
+static bool ldapsam_search_users(struct pdb_methods *methods,
struct pdb_search *search,
uint32 acct_flags)
{
return ldapsam_search_firstpage(search);
}
-static BOOL ldapgroup2displayentry(struct ldap_search_state *state,
+static bool ldapgroup2displayentry(struct ldap_search_state *state,
TALLOC_CTX *mem_ctx,
LDAP *ld, LDAPMessage *entry,
struct samr_displayentry *result)
return True;
}
-static BOOL ldapsam_search_grouptype(struct pdb_methods *methods,
+static bool ldapsam_search_grouptype(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid,
enum lsa_SidType type)
return ldapsam_search_firstpage(search);
}
-static BOOL ldapsam_search_groups(struct pdb_methods *methods,
+static bool ldapsam_search_groups(struct pdb_methods *methods,
struct pdb_search *search)
{
return ldapsam_search_grouptype(methods, search, get_global_sam_sid(), SID_NAME_DOM_GRP);
}
-static BOOL ldapsam_search_aliases(struct pdb_methods *methods,
+static bool ldapsam_search_aliases(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid)
{
return ldapsam_search_grouptype(methods, search, sid, SID_NAME_ALIAS);
}
-static BOOL ldapsam_rid_algorithm(struct pdb_methods *methods)
+static bool ldapsam_rid_algorithm(struct pdb_methods *methods)
{
return False;
}
return NT_STATUS_ACCESS_DENIED;
}
-static BOOL ldapsam_new_rid(struct pdb_methods *methods, uint32 *rid)
+static bool ldapsam_new_rid(struct pdb_methods *methods, uint32 *rid)
{
NTSTATUS result = ldapsam_new_rid_internal(methods, rid);
return NT_STATUS_IS_OK(result) ? True : False;
}
-static BOOL ldapsam_sid_to_id(struct pdb_methods *methods,
+static bool ldapsam_sid_to_id(struct pdb_methods *methods,
const DOM_SID *sid,
union unid_t *id, enum lsa_SidType *type)
{
NULL };
LDAPMessage *result = NULL;
LDAPMessage *entry = NULL;
- BOOL ret = False;
+ bool ret = False;
char *value;
int rc;
LDAPMessage *entry = NULL;
LDAPMessage *result = NULL;
uint32 num_result;
- BOOL is_machine = False;
- BOOL add_posix = False;
+ bool is_machine = False;
+ bool add_posix = False;
LDAPMod **mods = NULL;
struct samu *user;
char *filter;
LDAPMessage *entry = NULL;
LDAPMessage *result = NULL;
uint32 num_result;
- BOOL is_new_entry = False;
+ bool is_new_entry = False;
LDAPMod **mods = NULL;
char *filter;
char *groupsidstr;
ldap_state->domain_dn);
}
-static BOOL get_trusteddom_pw_int(struct ldapsam_privates *ldap_state,
+static bool get_trusteddom_pw_int(struct ldapsam_privates *ldap_state,
const char *domain, LDAPMessage **entry)
{
int rc;
return True;
}
-static BOOL ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
+static bool ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
const char *domain,
char** pwd,
DOM_SID *sid,
return True;
}
-static BOOL ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
+static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
const char* domain,
const char* pwd,
const DOM_SID *sid)
return True;
}
-static BOOL ldapsam_del_trusteddom_pw(struct pdb_methods *methods,
+static bool ldapsam_del_trusteddom_pw(struct pdb_methods *methods,
const char *domain)
{
int rc;
get_userattr_key2string(ldap_state->schema_ver,
LDAP_ATTR_USER_SID),
domain_sid_string)) {
- BOOL found_sid;
+ bool found_sid;
if (!string_to_sid(&ldap_domain_sid, domain_sid_string)) {
DEBUG(1, ("pdb_init_ldapsam: SID [%s] could not be "
"read as a valid SID\n", domain_sid_string));
*********************************************************************/
static NTSTATUS pdb_nds_update_login_attempts(struct pdb_methods *methods,
- struct samu *sam_acct, BOOL success)
+ struct samu *sam_acct, bool success)
{
struct ldapsam_privates *ldap_state;
char clear_text_pw[512];
LDAP *ld = NULL;
const char *username = pdb_get_username(sam_acct);
- BOOL got_clear_text_pw = False;
+ bool got_clear_text_pw = False;
DEBUG(5,("pdb_nds_update_login_attempts: %s login for %s\n",
success ? "Successful" : "Failed", username));
seconds.
****************************************************************/
-static BOOL do_file_lock(int fd, int waitsecs, int type)
+static bool do_file_lock(int fd, int waitsecs, int type)
{
SMB_STRUCT_FLOCK lock;
int ret;
Lock an fd. Abandon after waitsecs seconds.
****************************************************************/
-static BOOL pw_file_lock(int fd, int type, int secs, int *plock_depth)
+static bool pw_file_lock(int fd, int type, int secs, int *plock_depth)
{
if (fd < 0) {
return False;
Unlock an fd. Abandon after waitsecs seconds.
****************************************************************/
-static BOOL pw_file_unlock(int fd, int *plock_depth)
+static bool pw_file_unlock(int fd, int *plock_depth)
{
- BOOL ret=True;
+ bool ret=True;
if (fd == 0 || *plock_depth == 0) {
return True;
override = True, override XXXXXXXX'd out password or NO PASS
************************************************************************/
-static BOOL mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, const struct smb_passwd* pwd)
+static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, const struct smb_passwd* pwd)
{
/* Static buffers we will return. */
pstring user_name;
FILE *fp;
int lockfd;
const char *pfile = smbpasswd_state->smbpasswd_file;
- BOOL found_entry = False;
- BOOL got_pass_last_set_time = False;
+ bool found_entry = False;
+ bool got_pass_last_set_time = False;
SMB_OFF_T pwd_seekpos = 0;
Routine to delete an entry in the smbpasswd file by name.
*************************************************************************/
-static BOOL del_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, const char *name)
+static bool del_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, const char *name)
{
const char *pfile = smbpasswd_state->smbpasswd_file;
pstring pfile2;
should only stay around as long as the struct samu does.
********************************************************************/
-static BOOL build_smb_pass (struct smb_passwd *smb_pw, const struct samu *sampass)
+static bool build_smb_pass (struct smb_passwd *smb_pw, const struct samu *sampass)
{
uint32 rid;
Create a struct samu from a smb_passwd struct
********************************************************************/
-static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state,
+static bool build_sam_account(struct smbpasswd_privates *smbpasswd_state,
struct samu *sam_pass, const struct smb_passwd *pw_buf)
{
struct passwd *pwfile;
Functions to be implemented by the new passdb API
****************************************************************/
-static NTSTATUS smbpasswd_setsampwent (struct pdb_methods *my_methods, BOOL update, uint32 acb_mask)
+static NTSTATUS smbpasswd_setsampwent (struct pdb_methods *my_methods, bool update, uint32 acb_mask)
{
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
struct smb_passwd *pw_buf=NULL;
- BOOL done = False;
+ bool done = False;
DEBUG(5,("pdb_getsampwent\n"));
{
pstring rename_script;
struct samu *new_acct = NULL;
- BOOL interim_account = False;
+ bool interim_account = False;
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
if (!*(lp_renameuser_script()))
return (ret);
}
-static BOOL smbpasswd_rid_algorithm(struct pdb_methods *methods)
+static bool smbpasswd_rid_algorithm(struct pdb_methods *methods)
{
return True;
}
TDB_DATA key;
};
static struct pwent_list *tdbsam_pwent_list;
-static BOOL pwent_initialized;
+static bool pwent_initialized;
/* GLOBAL TDB SAM CONTEXT */
/*********************************************************************
*********************************************************************/
-static BOOL init_sam_from_buffer_v0(struct samu *sampass, uint8 *buf, uint32 buflen)
+static bool init_sam_from_buffer_v0(struct samu *sampass, uint8 *buf, uint32 buflen)
{
/* times are stored as 32bit integer
uint8 *lm_pw_ptr = NULL, *nt_pw_ptr = NULL;
uint32 len = 0;
uint32 lm_pw_len, nt_pw_len, hourslen;
- BOOL ret = True;
+ bool ret = True;
if(sampass == NULL || buf == NULL) {
DEBUG(0, ("init_sam_from_buffer_v0: NULL parameters found!\n"));
/*********************************************************************
*********************************************************************/
-static BOOL init_sam_from_buffer_v1(struct samu *sampass, uint8 *buf, uint32 buflen)
+static bool init_sam_from_buffer_v1(struct samu *sampass, uint8 *buf, uint32 buflen)
{
/* times are stored as 32bit integer
uint8 *lm_pw_ptr = NULL, *nt_pw_ptr = NULL;
uint32 len = 0;
uint32 lm_pw_len, nt_pw_len, hourslen;
- BOOL ret = True;
+ bool ret = True;
if(sampass == NULL || buf == NULL) {
DEBUG(0, ("init_sam_from_buffer_v1: NULL parameters found!\n"));
return ret;
}
-BOOL init_sam_from_buffer_v2(struct samu *sampass, uint8 *buf, uint32 buflen)
+bool init_sam_from_buffer_v2(struct samu *sampass, uint8 *buf, uint32 buflen)
{
/* times are stored as 32bit integer
uint32 len = 0;
uint32 lm_pw_len, nt_pw_len, nt_pw_hist_len, hourslen;
uint32 pwHistLen = 0;
- BOOL ret = True;
+ bool ret = True;
fstring tmpstring;
- BOOL expand_explicit = lp_passdb_expand_explicit();
+ bool expand_explicit = lp_passdb_expand_explicit();
if(sampass == NULL || buf == NULL) {
DEBUG(0, ("init_sam_from_buffer_v2: NULL parameters found!\n"));
Intialize a struct samu struct from a BYTE buffer of size len
*********************************************************************/
-static BOOL init_sam_from_buffer(struct samu *sampass, uint8 *buf, uint32 buflen)
+static bool init_sam_from_buffer(struct samu *sampass, uint8 *buf, uint32 buflen)
{
return init_sam_from_buffer_v3(sampass, buf, buflen);
}
Intialize a BYTE buffer from a struct samu struct
*********************************************************************/
-static uint32 init_buffer_from_sam (uint8 **buf, struct samu *sampass, BOOL size_only)
+static uint32 init_buffer_from_sam (uint8 **buf, struct samu *sampass, bool size_only)
{
return init_buffer_from_sam_v3(buf, sampass, size_only);
}
Intialize a BYTE buffer from a struct samu struct
*********************************************************************/
-static BOOL tdbsam_convert(int32 from)
+static bool tdbsam_convert(int32 from)
{
const char *vstring = TDBSAM_VERSION_STRING;
const char *prefix = USERPREFIX;
TDB_DATA data, key, old_key;
uint8 *buf = NULL;
- BOOL ret;
+ bool ret;
/* handle a Samba upgrade */
tdb_lock_bystring(tdbsam, vstring);
Uses a reference count to allow multiple open calls.
*********************************************************************/
-static BOOL tdbsam_open( const char *name )
+static bool tdbsam_open( const char *name )
{
int32 version;
Save a list of user keys for iteration.
****************************************************************/
-static NTSTATUS tdbsam_setsampwent(struct pdb_methods *my_methods, BOOL update, uint32 acb_mask)
+static NTSTATUS tdbsam_setsampwent(struct pdb_methods *my_methods, bool update, uint32 acb_mask)
{
if ( !tdbsam_open( tdbsam_filename ) ) {
DEBUG(0,("tdbsam_getsampwnam: failed to open %s!\n", tdbsam_filename));
return tdbsam_getsampwrid(my_methods, user, rid);
}
-static BOOL tdb_delete_samacct_only( struct samu *sam_pass )
+static bool tdb_delete_samacct_only( struct samu *sam_pass )
{
fstring keystr;
fstring name;
Update the TDB SAM account record only
Assumes that the tdbsam is already open
****************************************************************************/
-static BOOL tdb_update_samacct_only( struct samu* newpwd, int flag )
+static bool tdb_update_samacct_only( struct samu* newpwd, int flag )
{
TDB_DATA data;
uint8 *buf = NULL;
fstring keystr;
fstring name;
- BOOL ret = True;
+ bool ret = True;
/* copy the struct samu struct into a BYTE buffer for storage */
Update the TDB SAM RID record only
Assumes that the tdbsam is already open
****************************************************************************/
-static BOOL tdb_update_ridrec_only( struct samu* newpwd, int flag )
+static bool tdb_update_ridrec_only( struct samu* newpwd, int flag )
{
TDB_DATA data;
fstring keystr;
Update the TDB SAM
****************************************************************************/
-static BOOL tdb_update_sam(struct pdb_methods *my_methods, struct samu* newpwd, int flag)
+static bool tdb_update_sam(struct pdb_methods *my_methods, struct samu* newpwd, int flag)
{
- BOOL result = True;
+ bool result = True;
/* invalidate the existing TDB iterator if it is open */
{
struct samu *new_acct = NULL;
pstring rename_script;
- BOOL interim_account = False;
+ bool interim_account = False;
int rename_ret;
fstring oldname_lower;
fstring newname_lower;
return NT_STATUS_ACCESS_DENIED;
}
-static BOOL tdbsam_rid_algorithm(struct pdb_methods *methods)
+static bool tdbsam_rid_algorithm(struct pdb_methods *methods)
{
return False;
}
interested in the RID counter.
*****************************************************************************/
-static BOOL init_idmap_tdb(TDB_CONTEXT *tdb)
+static bool init_idmap_tdb(TDB_CONTEXT *tdb)
{
int32 version;
return True;
}
-static BOOL tdbsam_new_rid(struct pdb_methods *methods, uint32 *prid)
+static bool tdbsam_new_rid(struct pdb_methods *methods, uint32 *prid)
{
TDB_CONTEXT *tdb;
uint32 rid;
- BOOL ret = False;
+ bool ret = False;
tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0,
TDB_DEFAULT, O_RDWR | O_CREAT, 0644);
static TDB_CONTEXT *tdb;
/* Urrrg. global.... */
-BOOL global_machine_password_needs_changing;
+bool global_machine_password_needs_changing;
/**
* Use a TDB to store an incrementing random seed.
}
/* open up the secrets database */
-BOOL secrets_init(void)
+bool secrets_init(void)
{
pstring fname;
unsigned char dummy;
/* store a secrets entry
*/
-BOOL secrets_store(const char *key, const void *data, size_t size)
+bool secrets_store(const char *key, const void *data, size_t size)
{
secrets_init();
if (!tdb)
/* delete a secets database entry
*/
-BOOL secrets_delete(const char *key)
+bool secrets_delete(const char *key)
{
secrets_init();
if (!tdb)
return tdb_trans_delete(tdb, string_tdb_data(key)) == 0;
}
-BOOL secrets_store_domain_sid(const char *domain, const DOM_SID *sid)
+bool secrets_store_domain_sid(const char *domain, const DOM_SID *sid)
{
fstring key;
- BOOL ret;
+ bool ret;
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
strupper_m(key);
return ret;
}
-BOOL secrets_fetch_domain_sid(const char *domain, DOM_SID *sid)
+bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid)
{
DOM_SID *dyn_sid;
fstring key;
return True;
}
-BOOL secrets_store_domain_guid(const char *domain, struct GUID *guid)
+bool secrets_store_domain_guid(const char *domain, struct GUID *guid)
{
fstring key;
return secrets_store(key, guid, sizeof(struct GUID));
}
-BOOL secrets_fetch_domain_guid(const char *domain, struct GUID *guid)
+bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid)
{
struct GUID *dyn_guid;
fstring key;
Lock the trust password entry.
************************************************************************/
-BOOL secrets_lock_trust_account_password(const char *domain, BOOL dolock)
+bool secrets_lock_trust_account_password(const char *domain, bool dolock)
{
if (!tdb)
return False;
the above secrets_lock_trust_account_password().
************************************************************************/
-BOOL secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
+bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
time_t *pass_last_set_time,
uint32 *channel)
{
Routine to get account password to trusted domain
************************************************************************/
-BOOL secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
+bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
DOM_SID *sid, time_t *pass_last_set_time)
{
struct trusted_dom_pass pass;
Routine to set the trust account password for a domain.
************************************************************************/
-BOOL secrets_store_trust_account_password(const char *domain, uint8 new_pwd[16])
+bool secrets_store_trust_account_password(const char *domain, uint8 new_pwd[16])
{
struct machine_acct_pass pass;
* @return true if succeeded
**/
-BOOL secrets_store_trusted_domain_password(const char* domain, const char* pwd,
+bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
const DOM_SID *sid)
{
smb_ucs2_t *uni_dom_name;
the password is assumed to be a null terminated ascii string
************************************************************************/
-BOOL secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel)
+bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel)
{
char *key = NULL;
- BOOL ret;
+ bool ret;
uint32 last_change_time;
uint32 sec_channel_type;
Routine to delete the machine trust account password file for a domain.
************************************************************************/
-BOOL trust_password_delete(const char *domain)
+bool trust_password_delete(const char *domain)
{
return secrets_delete(trust_keystr(domain));
}
Routine to delete the password for trusted domain
************************************************************************/
-BOOL trusted_domain_password_delete(const char *domain)
+bool trusted_domain_password_delete(const char *domain)
{
return secrets_delete(trustdom_keystr(domain));
}
-BOOL secrets_store_ldap_pw(const char* dn, char* pw)
+bool secrets_store_ldap_pw(const char* dn, char* pw)
{
char *key = NULL;
- BOOL ret;
+ bool ret;
if (asprintf(&key, "%s/%s", SECRETS_LDAP_BIND_PW, dn) < 0) {
DEBUG(0, ("secrets_store_ldap_pw: asprintf failed!\n"));
Find the ldap password.
******************************************************************/
-BOOL fetch_ldap_pw(char **dn, char** pw)
+bool fetch_ldap_pw(char **dn, char** pw)
{
char *key = NULL;
size_t size = 0;
between smbd instances.
*******************************************************************************/
-BOOL secrets_named_mutex(const char *name, unsigned int timeout)
+bool secrets_named_mutex(const char *name, unsigned int timeout)
{
int ret = 0;
Store a complete AFS keyfile into secrets.tdb.
*******************************************************************************/
-BOOL secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile)
+bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile)
{
fstring key;
/*******************************************************************************
Fetch the current (highest) AFS key from secrets.tdb
*******************************************************************************/
-BOOL secrets_fetch_afs_key(const char *cell, struct afs_key *result)
+bool secrets_fetch_afs_key(const char *cell, struct afs_key *result)
{
fstring key;
struct afs_keyfile *keyfile;
Note we must be root here.
*******************************************************************************/
-BOOL secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
+bool secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
const char *remote_machine,
const struct dcinfo *pdc)
{
TDB_CONTEXT *tdb_sc = NULL;
TDB_DATA value;
- BOOL ret;
+ bool ret;
char *keystr = talloc_asprintf(mem_ctx, "%s/%s", SECRETS_SCHANNEL_STATE,
remote_machine);
if (!keystr) {
Note we must be root here.
*******************************************************************************/
-BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
+bool secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
const char *remote_machine,
struct dcinfo **ppdc)
{
return True;
}
-BOOL secrets_store_generic(const char *owner, const char *key, const char *secret)
+bool secrets_store_generic(const char *owner, const char *key, const char *secret)
{
char *tdbkey = NULL;
- BOOL ret;
+ bool ret;
if (asprintf(&tdbkey, "SECRETS/GENERIC/%s/%s", owner, key) < 0) {
DEBUG(0, ("asprintf failed!\n"));
/*******************************************************************
Look up a rid in the BUILTIN domain
********************************************************************/
-BOOL lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name)
+bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name)
{
const struct rid_name_map *aliases = builtin_aliases;
/*******************************************************************
Look up a name in the BUILTIN domain
********************************************************************/
-BOOL lookup_builtin_name(const char *name, uint32 *rid)
+bool lookup_builtin_name(const char *name, uint32 *rid)
{
const struct rid_name_map *aliases = builtin_aliases;
Check if the SID is the builtin SID (S-1-5-32).
*****************************************************************/
-BOOL sid_check_is_builtin(const DOM_SID *sid)
+bool sid_check_is_builtin(const DOM_SID *sid)
{
return sid_equal(sid, &global_sid_Builtin);
}
Check if the SID is one of the builtin SIDs (S-1-5-32-a).
*****************************************************************/
-BOOL sid_check_is_in_builtin(const DOM_SID *sid)
+bool sid_check_is_in_builtin(const DOM_SID *sid)
{
DOM_SID dom_sid;
uint32 rid;
#include "includes.h"
-BOOL sid_check_is_unix_users(const DOM_SID *sid)
+bool sid_check_is_unix_users(const DOM_SID *sid)
{
return sid_equal(sid, &global_sid_Unix_Users);
}
-BOOL sid_check_is_in_unix_users(const DOM_SID *sid)
+bool sid_check_is_in_unix_users(const DOM_SID *sid)
{
DOM_SID dom_sid;
uint32 rid;
return sid_check_is_unix_users(&dom_sid);
}
-BOOL uid_to_unix_users_sid(uid_t uid, DOM_SID *sid)
+bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid)
{
sid_copy(sid, &global_sid_Unix_Users);
return sid_append_rid(sid, uid);
}
-BOOL gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid)
+bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid)
{
sid_copy(sid, &global_sid_Unix_Groups);
return sid_append_rid(sid, gid);
return "Unix User";
}
-BOOL lookup_unix_user_name(const char *name, DOM_SID *sid)
+bool lookup_unix_user_name(const char *name, DOM_SID *sid)
{
struct passwd *pwd;
return True;
}
-BOOL sid_check_is_unix_groups(const DOM_SID *sid)
+bool sid_check_is_unix_groups(const DOM_SID *sid)
{
return sid_equal(sid, &global_sid_Unix_Groups);
}
-BOOL sid_check_is_in_unix_groups(const DOM_SID *sid)
+bool sid_check_is_in_unix_groups(const DOM_SID *sid)
{
DOM_SID dom_sid;
uint32 rid;
return "Unix Group";
}
-BOOL lookup_unix_group_name(const char *name, DOM_SID *sid)
+bool lookup_unix_group_name(const char *name, DOM_SID *sid)
{
struct group *grp;
{ &global_sid_NT_Authority, "NT Authority", nt_authority_users },
{ NULL, NULL, NULL }};
-BOOL sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name)
+bool sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name)
{
int i;
return False;
}
-BOOL sid_check_is_in_wellknown_domain(const DOM_SID *sid)
+bool sid_check_is_in_wellknown_domain(const DOM_SID *sid)
{
DOM_SID dom_sid;
uint32 rid;
Looks up a known username from one of the known domains.
***************************************************************************/
-BOOL lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **domain, const char **name)
{
int i;
Try and map a name to one of the well known SIDs.
***************************************************************************/
-BOOL lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
+bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
DOM_SID *sid, const char **domain)
{
int i, j;
further below.
****************************************************************************/
-static BOOL parse_lpq_bsd(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_bsd(char *line,print_queue_struct *buf,bool first)
{
#ifdef OSF1
#define RANKTOK 0
****************************************************************************/
-static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_lprng(char *line,print_queue_struct *buf,bool first)
{
#define LPRNG_RANKTOK 0
#define LPRNG_USERTOK 1
QUEUED 541 P.ps root@IEDVB 22 1 5
********************************************************************/
-static BOOL parse_lpq_aix(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_aix(char *line,print_queue_struct *buf,bool first)
{
fstring tok[11];
int count=0;
(standard input) 7551 bytes
****************************************************************************/
-static BOOL parse_lpq_hpux(char *line, print_queue_struct *buf, BOOL first)
+static bool parse_lpq_hpux(char *line, print_queue_struct *buf, bool first)
{
/* must read two lines to process, therefore keep some values static */
- static BOOL header_line_ok=False, base_prio_reset=False;
+ static bool header_line_ok=False, base_prio_reset=False;
static fstring jobuser;
static int jobid;
static int jobprio;
****************************************************************************/
-static BOOL parse_lpq_sysv(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_sysv(char *line,print_queue_struct *buf,bool first)
{
fstring tok[9];
int count=0;
0002: root [job #3 ] ready 1146 bytes -- standard input --
****************************************************************************/
-static BOOL parse_lpq_qnx(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_qnx(char *line,print_queue_struct *buf,bool first)
{
fstring tok[7];
int count=0;
****************************************************************************/
-static BOOL parse_lpq_plp(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_plp(char *line,print_queue_struct *buf,bool first)
{
fstring tok[11];
int count=0;
********************************************************************/
-static BOOL parse_lpq_nt(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_nt(char *line,print_queue_struct *buf,bool first)
{
#define LPRNT_OWNSIZ 11
#define LPRNT_STATSIZ 9
********************************************************************/
-static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_os2(char *line,print_queue_struct *buf,bool first)
{
#define LPROS2_IDSIZ 5
#define LPROS2_JOBSIZ 15
parse a vlp line
****************************************************************************/
-static BOOL parse_lpq_vlp(char *line,print_queue_struct *buf,BOOL first)
+static bool parse_lpq_vlp(char *line,print_queue_struct *buf,bool first)
{
int toknum = 0;
fstring tok;
parse a lpq line. Choose printing style
****************************************************************************/
-BOOL parse_lpq_entry(enum printing_types printing_type,char *line,
+bool parse_lpq_entry(enum printing_types printing_type,char *line,
print_queue_struct *buf,
- print_status_struct *status,BOOL first)
+ print_status_struct *status,bool first)
{
- BOOL ret;
+ bool ret;
switch (printing_type) {
case PRINT_SYSV:
} *notify_queue_head = NULL;
-static BOOL create_send_ctx(void)
+static bool create_send_ctx(void)
{
if (!send_ctx)
send_ctx = talloc_init("print notify queue");
Used to decide if we need a short select timeout.
*******************************************************************/
-BOOL print_notify_messages_pending(void)
+bool print_notify_messages_pending(void)
{
return (notify_queue_head != NULL);
}
Flatten data into a message.
*******************************************************************/
-static BOOL flatten_message(struct notify_queue *q)
+static bool flatten_message(struct notify_queue *q)
{
struct spoolss_notify_msg *msg = q->msg;
uint8 *buf = NULL;
deep copy a SPOOLSS_NOTIFY_MSG structure using a TALLOC_CTX
*********************************************************************/
-static BOOL copy_notify2_msg( SPOOLSS_NOTIFY_MSG *to, SPOOLSS_NOTIFY_MSG *from )
+static bool copy_notify2_msg( SPOOLSS_NOTIFY_MSG *to, SPOOLSS_NOTIFY_MSG *from )
{
if ( !to || !from )
messages on this print queue. Used in printing/notify to send the messages.
****************************************************************************/
-BOOL print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t *p_num_pids, pid_t **pp_pid_list)
+bool print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t *p_num_pids, pid_t **pp_pid_list)
{
struct tdb_print_db *pdb = NULL;
TDB_CONTEXT *tdb = NULL;
TDB_DATA data;
- BOOL ret = True;
+ bool ret = True;
size_t i, num_pids, offset;
pid_t *pid_list;
/****************************************************************************
****************************************************************************/
-static BOOL upgrade_to_version_3(void)
+static bool upgrade_to_version_3(void)
{
TDB_DATA kbuf, newkey, dbuf;
/*******************************************************************
*******************************************************************/
-static BOOL upgrade_to_version_4(void)
+static bool upgrade_to_version_4(void)
{
TALLOC_CTX *ctx;
int result;
/*******************************************************************
*******************************************************************/
-static BOOL upgrade_to_version_5(void)
+static bool upgrade_to_version_5(void)
{
TALLOC_CTX *ctx;
int result;
Open the NT printing tdbs. Done once before fork().
****************************************************************************/
-BOOL nt_printing_init(struct messaging_context *msg_ctx)
+bool nt_printing_init(struct messaging_context *msg_ctx)
{
const char *vstring = "INFO/version";
WERROR win_rc;
each add or delete printer RPC. Only Microsoft knows why... JRR020119
********************************************************************/
-uint32 update_c_setprinter(BOOL initialize)
+uint32 update_c_setprinter(bool initialize)
{
int32 c_setprinter;
int32 printer_count = 0;
get a builtin form struct
****************************************************************************/
-BOOL get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form)
+bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form)
{
int i,count;
fstring form_name;
/****************************************************************************
add a form struct at the end of the list
****************************************************************************/
-BOOL add_a_form(nt_forms_struct **list, const FORM *form, int *count)
+bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
{
int n=0;
- BOOL update;
+ bool update;
fstring form_name;
/*
Delete a named form struct.
****************************************************************************/
-BOOL delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret)
+bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret)
{
pstring key;
int n=0;
static int file_version_is_newer(connection_struct *conn, fstring new_file, fstring old_file)
{
- BOOL use_version = True;
+ bool use_version = True;
pstring filepath;
uint32 new_major;
}
static void map_bool_into_ctr(REGVAL_CTR *ctr, const char *val_name,
- BOOL b)
+ bool b)
{
uint8 bin_bool = (b ? 1 : 0);
regval_ctr_delvalue(ctr, val_name);
* Map the NT_PRINTER_INFO_LEVEL_2 data into DsSpooler keys for publishing.
*
* @param info2 NT_PRINTER_INFO_LEVEL_2 describing printer - gets modified
- * @return BOOL indicating success or failure
+ * @return bool indicating success or failure
***************************************************************************/
-static BOOL map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
+static bool map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
{
REGVAL_CTR *ctr = NULL;
fstring longname;
return WERR_OK;
}
-BOOL is_printer_published(Printer_entry *print_hnd, int snum,
+bool is_printer_published(Printer_entry *print_hnd, int snum,
struct GUID *guid)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
REGISTRY_VALUE *guid_val;
WERROR win_rc;
int i;
- BOOL ret = False;
+ bool ret = False;
win_rc = get_a_printer(print_hnd, &printer, 2, lp_servicename(snum));
return WERR_OK;
}
-BOOL is_printer_published(Printer_entry *print_hnd, int snum,
+bool is_printer_published(Printer_entry *print_hnd, int snum,
struct GUID *guid)
{
return False;
static void map_to_os2_driver(fstring drivername)
{
- static BOOL initialised=False;
+ static bool initialised=False;
static fstring last_from,last_to;
char *mapfile = lp_os2_driver_map();
char **lines = NULL;
Initialize printer devmode & data with previously saved driver init values.
****************************************************************************/
-static BOOL set_driver_init_2( NT_PRINTER_INFO_LEVEL_2 *info_ptr )
+static bool set_driver_init_2( NT_PRINTER_INFO_LEVEL_2 *info_ptr )
{
int len = 0;
pstring key;
is bound to the new printer.
****************************************************************************/
-BOOL set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
+bool set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
- BOOL result = False;
+ bool result = False;
switch (level) {
case 2:
Delete driver init data stored for a specified driver
****************************************************************************/
-BOOL del_driver_init(char *drivername)
+bool del_driver_init(char *drivername)
{
pstring key;
got to keep the endians happy :).
****************************************************************************/
-static BOOL convert_driver_init( TALLOC_CTX *ctx, NT_DEVICEMODE *nt_devmode, uint8 *data, uint32 data_len )
+static bool convert_driver_init( TALLOC_CTX *ctx, NT_DEVICEMODE *nt_devmode, uint8 *data, uint32 data_len )
{
- BOOL result = False;
+ bool result = False;
prs_struct ps;
DEVICEMODE devmode;
to a printer
****************************************************************************/
-BOOL printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 )
+bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 )
{
int snum;
int n_services = lp_numservices();
NT_PRINTER_INFO_LEVEL *printer = NULL;
- BOOL in_use = False;
+ bool in_use = False;
if ( !info_3 )
return False;
Check to see if a ogiven file is in use by *info
*********************************************************************/
-static BOOL drv_file_in_use( char* file, NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
+static bool drv_file_in_use( char* file, NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
{
int i = 0;
Check if any of the files used by src are also used by drv
*********************************************************************/
-static BOOL trim_overlap_drv_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *src,
+static bool trim_overlap_drv_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *src,
NT_PRINTER_DRIVER_INFO_LEVEL_3 *drv )
{
- BOOL in_use = False;
+ bool in_use = False;
int i = 0;
if ( !src || !drv )
which are not in use
****************************************************************************/
-BOOL printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
+bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
{
int i;
int ndrivers;
this.
****************************************************************************/
-static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user )
+static bool delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user )
{
int i = 0;
char *s;
***************************************************************************/
WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user,
- uint32 version, BOOL delete_files )
+ uint32 version, bool delete_files )
{
pstring key;
const char *arch;
Get a security desc for a printer.
****************************************************************************/
-BOOL nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr)
+bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr)
{
prs_struct ps;
TDB_DATA kbuf;
3) "printer admins" (may result in numerous calls to winbind)
****************************************************************************/
-BOOL print_access_check(struct current_user *user, int snum, int access_type)
+bool print_access_check(struct current_user *user, int snum, int access_type)
{
SEC_DESC_BUF *secdesc = NULL;
uint32 access_granted;
NTSTATUS status;
- BOOL result;
+ bool result;
const char *pname;
TALLOC_CTX *mem_ctx = NULL;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
Check the time parameters allow a print operation.
*****************************************************************************/
-BOOL print_time_access_check(const char *servicename)
+bool print_time_access_check(const char *servicename)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
- BOOL ok = False;
+ bool ok = False;
time_t now = time(NULL);
struct tm *t;
uint32 mins;
static pcap_cache_t *pcap_cache = NULL;
-BOOL pcap_cache_add(const char *name, const char *comment)
+bool pcap_cache_add(const char *name, const char *comment)
{
pcap_cache_t *p;
}
}
-BOOL pcap_cache_loaded(void)
+bool pcap_cache_loaded(void)
{
return (pcap_cache != NULL);
}
void pcap_cache_reload(void)
{
const char *pcap_name = lp_printcapname();
- BOOL pcap_reloaded = False;
+ bool pcap_reloaded = False;
pcap_cache_t *tmp_cache = NULL;
XFILE *pcap_file;
char *pcap_line;
* this is pure guesswork, but it's better than nothing
*/
for (*name = *comment = 0, p = pcap_line; p != NULL; p = q) {
- BOOL has_punctuation;
+ bool has_punctuation;
if ((q = strchr_m(p, '|')) != NULL)
*q++ = 0;
}
-BOOL pcap_printername_ok(const char *printername)
+bool pcap_printername_ok(const char *printername)
{
pcap_cache_t *p;
#include "includes.h"
#ifdef AIX
-BOOL aix_cache_reload(void)
+bool aix_cache_reload(void)
{
int iEtat;
XFILE *pfile;
return http;
}
-BOOL cups_cache_reload(void)
+bool cups_cache_reload(void)
{
http_t *http = NULL; /* HTTP connection to server */
ipp_t *request = NULL, /* IPP Request */
"printer-name",
"printer-info"
};
- BOOL ret = False;
+ bool ret = False;
DEBUG(5, ("reloading cups printcap cache\n"));
cups_job_submit,
};
-BOOL cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer)
+bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer)
{
http_t *http = NULL; /* HTTP connection to server */
ipp_t *request = NULL, /* IPP Request */
"printer-info",
"printer-location"
};
- BOOL ret = False;
+ bool ret = False;
DEBUG(5, ("pulling %s location\n", printer->sharename));
a null terminated list of value/substitute pairs is provided
for local substitution strings
****************************************************************************/
-static int print_run_command(int snum, const char* printername, BOOL do_sub,
+static int print_run_command(int snum, const char* printername, bool do_sub,
const char *command, int *outfd, ...)
{
pstring syscmd;
return(0);
}
-BOOL iprint_cache_reload(void)
+bool iprint_cache_reload(void)
{
http_t *http = NULL; /* HTTP connection to server */
ipp_t *request = NULL, /* IPP Request */
ipp_attribute_t *attr; /* Current attribute */
cups_lang_t *language = NULL; /* Default language */
int i;
- BOOL ret = False;
+ bool ret = False;
DEBUG(5, ("reloading iprint printcap cache\n"));
#include "includes.h"
#if defined(SYSV) || defined(HPUX)
-BOOL sysv_cache_reload(void)
+bool sysv_cache_reload(void)
{
char **lines;
int i;
extern userdom_struct current_user_info;
/* Current printer interface */
-static BOOL remove_from_jobs_changed(const char* sharename, uint32 jobid);
+static bool remove_from_jobs_changed(const char* sharename, uint32 jobid);
/*
the printing backend revolves around a tdb database that stores the
return rap_jobid;
}
-BOOL rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid)
+bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid)
{
TDB_DATA data, key;
uint8 buf[2];
Initialise the printing backend. Called once at startup before the fork().
****************************************************************************/
-BOOL print_backend_init(struct messaging_context *msg_ctx)
+bool print_backend_init(struct messaging_context *msg_ctx)
{
const char *sversion = "INFO/version";
pstring printing_path;
static void pjob_store_notify(const char* sharename, uint32 jobid, struct printjob *old_data,
struct printjob *new_data)
{
- BOOL new_job = False;
+ bool new_job = False;
if (!old_data)
new_job = True;
Store a job structure back to the database.
****************************************************************************/
-static BOOL pjob_store(const char* sharename, uint32 jobid, struct printjob *pjob)
+static bool pjob_store(const char* sharename, uint32 jobid, struct printjob *pjob)
{
TDB_DATA old_data, new_data;
- BOOL ret = False;
+ bool ret = False;
struct tdb_print_db *pdb = get_print_db_byname(sharename);
uint8 *buf = NULL;
int len, newlen, buflen;
in the tdb.
****************************************************************************/
-static void set_updating_pid(const fstring sharename, BOOL updating)
+static void set_updating_pid(const fstring sharename, bool updating)
{
fstring keystr;
TDB_DATA key;
Check if the print queue has been updated recently enough.
****************************************************************************/
-static BOOL print_cache_expired(const char *sharename, BOOL check_pending)
+static bool print_cache_expired(const char *sharename, bool check_pending)
{
fstring key;
time_t last_qscan_time, time_now = time(NULL);
struct tdb_print_db *pdb = get_print_db_byname(sharename);
- BOOL result = False;
+ bool result = False;
if (!pdb)
return False;
update the internal database from the system print queue for a queue
****************************************************************************/
-static void print_queue_update(int snum, BOOL force)
+static void print_queue_update(int snum, bool force)
{
fstring key;
fstring sharename;
updates only to interested smbd's.
****************************************************************************/
-BOOL print_notify_register_pid(int snum)
+bool print_notify_register_pid(int snum)
{
TDB_DATA data;
struct tdb_print_db *pdb = NULL;
TDB_CONTEXT *tdb = NULL;
const char *printername;
uint32 mypid = (uint32)sys_getpid();
- BOOL ret = False;
+ bool ret = False;
size_t i;
/* if (snum == -1), then the change notify request was
updates only to interested smbd's.
****************************************************************************/
-BOOL print_notify_deregister_pid(int snum)
+bool print_notify_deregister_pid(int snum)
{
TDB_DATA data;
struct tdb_print_db *pdb = NULL;
const char *printername;
uint32 mypid = (uint32)sys_getpid();
size_t i;
- BOOL ret = False;
+ bool ret = False;
/* if ( snum == -1 ), we are deregister a print server handle
which means to deregister on all print queues */
Check if a jobid is valid. It is valid if it exists in the database.
****************************************************************************/
-BOOL print_job_exists(const char* sharename, uint32 jobid)
+bool print_job_exists(const char* sharename, uint32 jobid)
{
struct tdb_print_db *pdb = get_print_db_byname(sharename);
- BOOL ret;
+ bool ret;
if (!pdb)
return False;
Set the place in the queue for a job.
****************************************************************************/
-BOOL print_job_set_place(const char *sharename, uint32 jobid, int place)
+bool print_job_set_place(const char *sharename, uint32 jobid, int place)
{
DEBUG(2,("print_job_set_place not implemented yet\n"));
return False;
Set the name of a job. Only possible for owner.
****************************************************************************/
-BOOL print_job_set_name(const char *sharename, uint32 jobid, char *name)
+bool print_job_set_name(const char *sharename, uint32 jobid, char *name)
{
struct printjob *pjob;
Remove a jobid from the 'jobs changed' list.
***************************************************************************/
-static BOOL remove_from_jobs_changed(const char* sharename, uint32 jobid)
+static bool remove_from_jobs_changed(const char* sharename, uint32 jobid)
{
struct tdb_print_db *pdb = get_print_db_byname(sharename);
TDB_DATA data, key;
size_t job_count, i;
- BOOL ret = False;
- BOOL gotlock = False;
+ bool ret = False;
+ bool gotlock = False;
if (!pdb) {
return False;
Delete a print job - don't update queue.
****************************************************************************/
-static BOOL print_job_delete1(int snum, uint32 jobid)
+static bool print_job_delete1(int snum, uint32 jobid)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob = print_job_find(sharename, jobid);
Return true if the current user owns the print job.
****************************************************************************/
-static BOOL is_owner(struct current_user *user, const char *servicename,
+static bool is_owner(struct current_user *user, const char *servicename,
uint32 jobid)
{
struct printjob *pjob = print_job_find(servicename, jobid);
Delete a print job.
****************************************************************************/
-BOOL print_job_delete(struct current_user *user, int snum, uint32 jobid, WERROR *errcode)
+bool print_job_delete(struct current_user *user, int snum, uint32 jobid, WERROR *errcode)
{
const char* sharename = lp_const_servicename( snum );
struct printjob *pjob;
- BOOL owner;
+ bool owner;
char *fname;
*errcode = WERR_OK;
Pause a job.
****************************************************************************/
-BOOL print_job_pause(struct current_user *user, int snum, uint32 jobid, WERROR *errcode)
+bool print_job_pause(struct current_user *user, int snum, uint32 jobid, WERROR *errcode)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
Resume a job.
****************************************************************************/
-BOOL print_job_resume(struct current_user *user, int snum, uint32 jobid, WERROR *errcode)
+bool print_job_resume(struct current_user *user, int snum, uint32 jobid, WERROR *errcode)
{
const char *sharename = lp_const_servicename(snum);
struct printjob *pjob;
Allocate a jobid. Hold the lock for as short a time as possible.
***************************************************************************/
-static BOOL allocate_print_jobid(struct tdb_print_db *pdb, int snum, const char *sharename, uint32 *pjobid)
+static bool allocate_print_jobid(struct tdb_print_db *pdb, int snum, const char *sharename, uint32 *pjobid)
{
int i;
uint32 jobid;
Append a jobid to the 'jobs changed' list.
***************************************************************************/
-static BOOL add_to_jobs_changed(struct tdb_print_db *pdb, uint32 jobid)
+static bool add_to_jobs_changed(struct tdb_print_db *pdb, uint32 jobid)
{
TDB_DATA data;
uint32 store_jobid;
error.
****************************************************************************/
-BOOL print_job_end(int snum, uint32 jobid, enum file_close_type close_type)
+bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
Get a snapshot of jobs in the system without traversing.
****************************************************************************/
-static BOOL get_stored_queue_info(struct tdb_print_db *pdb, int snum, int *pcount, print_queue_struct **ppqueue)
+static bool get_stored_queue_info(struct tdb_print_db *pdb, int snum, int *pcount, print_queue_struct **ppqueue)
{
TDB_DATA data, cgdata;
print_queue_struct *queue = NULL;
size_t len = 0;
uint32 i;
int max_reported_jobs = lp_max_reported_jobs(snum);
- BOOL ret = False;
+ bool ret = False;
const char* sharename = lp_servicename(snum);
/* make sure the database is up to date */
Pause a queue.
****************************************************************************/
-BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode)
+bool print_queue_pause(struct current_user *user, int snum, WERROR *errcode)
{
int ret;
struct printif *current_printif = get_printer_fns( snum );
Resume a queue.
****************************************************************************/
-BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode)
+bool print_queue_resume(struct current_user *user, int snum, WERROR *errcode)
{
int ret;
struct printif *current_printif = get_printer_fns( snum );
Purge a queue - implemented by deleting all jobs that we can delete.
****************************************************************************/
-BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode)
+bool print_queue_purge(struct current_user *user, int snum, WERROR *errcode)
{
print_queue_struct *queue;
print_status_struct status;
int njobs, i;
- BOOL can_job_admin;
+ bool can_job_admin;
/* Force and update so the count is accurate (i.e. not a cached count) */
print_queue_update(snum, True);
become_root();
for (i=0;i<njobs;i++) {
- BOOL owner = is_owner(user, lp_const_servicename(snum), queue[i].job);
+ bool owner = is_owner(user, lp_const_servicename(snum), queue[i].job);
if (owner || can_job_admin) {
print_job_delete1(snum, queue[i].job);
struct tdb_print_db *p = NULL, *last_entry = NULL;
int num_open = 0;
pstring printdb_path;
- BOOL done_become_root = False;
+ bool done_become_root = False;
SMB_ASSERT(printername != NULL);
messages. data needs freeing on exit.
****************************************************************************/
-TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, BOOL cleanlist)
+TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist)
{
TDB_DATA data;
size_t i;
#ifdef WITH_PROFILE
static int shm_id;
-static BOOL read_only;
+static bool read_only;
#if defined(HAVE_CLOCK_GETTIME)
clockid_t __profile_clock;
-BOOL have_profiling_clock = False;
+bool have_profiling_clock = False;
#endif
#endif
struct profile_header *profile_h;
struct profile_stats *profile_p;
-BOOL do_profile_flag = False;
-BOOL do_profile_times = False;
+bool do_profile_flag = False;
+bool do_profile_times = False;
/****************************************************************************
Set a profiling level.
}
#endif
-BOOL profile_setup(struct messaging_context *msg_ctx, BOOL rdonly)
+bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
{
struct shmid_ds shm_ds;
WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx,
struct registry_key *parent,
const char *path,
- BOOL del_key)
+ bool del_key)
{
TALLOC_CTX *mem_ctx = NULL;
WERROR werr = WERR_OK;
Initialize the cache tree
*********************************************************************/
-BOOL reghook_cache_init( void )
+bool reghook_cache_init( void )
{
cache_tree = pathtree_init( &default_hook, NULL );
is not in the exact format that a SORTED_TREE expects.
*********************************************************************/
-BOOL reghook_cache_add( REGISTRY_HOOK *hook )
+bool reghook_cache_add( REGISTRY_HOOK *hook )
{
pstring key;
Open the registry data in the tdb
***********************************************************************/
-static BOOL init_registry_data( void )
+static bool init_registry_data( void )
{
pstring path, base, remaining;
fstring keyname, subkeyname;
Open the registry database
***********************************************************************/
-BOOL regdb_init( void )
+bool regdb_init( void )
{
const char *vstring = "INFO/version";
uint32 vers_id;
fstrings
***********************************************************************/
-static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
+static bool regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
{
TDB_DATA dbuf;
uint8 *buffer;
int i = 0;
uint32 len, buflen;
- BOOL ret = True;
+ bool ret = True;
uint32 num_subkeys = regsubkey_ctr_numkeys( ctr );
pstring keyname;
do not currently exist
***********************************************************************/
-BOOL regdb_store_keys( const char *key, REGSUBKEY_CTR *ctr )
+bool regdb_store_keys( const char *key, REGSUBKEY_CTR *ctr )
{
int num_subkeys, i;
pstring path;
return regval_ctr_numvals(values);
}
-BOOL regdb_store_values( const char *key, REGVAL_CTR *values )
+bool regdb_store_values( const char *key, REGVAL_CTR *values )
{
TDB_DATA old_data, data;
pstring keystr;
/***********************************************************************
***********************************************************************/
-BOOL check_dynamic_reg_values( REGISTRY_KEY *key )
+bool check_dynamic_reg_values( REGISTRY_KEY *key )
{
int i;
pstring path;
for an eventlog, add in the default values
*********************************************************************/
-BOOL eventlog_init_keys( void )
+bool eventlog_init_keys( void )
{
/* Find all of the eventlogs, add keys for each of them */
const char **elogs = lp_eventlog_list( );
already exists, change the information (remove, replace)
*********************************************************************/
-BOOL eventlog_add_source( const char *eventlog, const char *sourcename,
+bool eventlog_add_source( const char *eventlog, const char *sourcename,
const char *messagefile )
{
/* Find all of the eventlogs, add keys for each of them */
UNISTR2 data;
uint16 *msz_wp;
int mbytes, ii;
- BOOL already_in;
+ bool already_in;
int i;
int numsources;
Open the registry database and initialize the REGISTRY_HOOK cache
***********************************************************************/
-BOOL init_registry( void )
+bool init_registry( void )
{
int i;
High level wrapper function for storing registry subkeys
***********************************************************************/
-BOOL store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys )
+bool store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys )
{
if ( key->hook && key->hook->ops && key->hook->ops->store_subkeys )
return key->hook->ops->store_subkeys( key->name, subkeys );
High level wrapper function for storing registry values
***********************************************************************/
-BOOL store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val )
+bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val )
{
if ( check_dynamic_reg_values( key ) )
return False;
underlying registry backend
***********************************************************************/
-BOOL regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted,
+bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted,
const struct nt_user_token *token )
{
SEC_DESC *sec_desc;
Check for the existance of a key
**********************************************************************/
-BOOL regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname )
+bool regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname )
{
int i;
Check for the existance of a value
**********************************************************************/
-BOOL regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value )
+bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value )
{
int i;
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_isparent(TDB_DATA data)
+static bool _reg_perfcount_isparent(TDB_DATA data)
{
if(data.dsize > 0)
{
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_ischild(TDB_DATA data)
+static bool _reg_perfcount_ischild(TDB_DATA data)
{
if(data.dsize > 0)
{
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_add_object(PERF_DATA_BLOCK *block,
+static bool _reg_perfcount_add_object(PERF_DATA_BLOCK *block,
prs_struct *ps,
int num,
TDB_DATA data,
TDB_CONTEXT *names)
{
int i;
- BOOL success = True;
+ bool success = True;
PERF_OBJECT_TYPE *obj;
block->objects = (PERF_OBJECT_TYPE *)TALLOC_REALLOC_ARRAY(ps->mem_ctx,
/*********************************************************************
*********************************************************************/
-BOOL _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data)
+bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data)
{
TDB_CONTEXT *counters;
const char *fname = counters_directory( DATA_DB );
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_get_counter_info(PERF_DATA_BLOCK *block,
+static bool _reg_perfcount_get_counter_info(PERF_DATA_BLOCK *block,
prs_struct *ps,
int CounterIndex,
PERF_OBJECT_TYPE *obj,
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_add_counter(PERF_DATA_BLOCK *block,
+static bool _reg_perfcount_add_counter(PERF_DATA_BLOCK *block,
prs_struct *ps,
int num,
TDB_DATA data,
char *begin, *end, *start, *stop;
int parent;
PERF_OBJECT_TYPE *obj;
- BOOL success = True;
+ bool success = True;
char buf[PERFCOUNT_MAX_LEN];
obj = NULL;
/*********************************************************************
*********************************************************************/
-BOOL _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
+bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
prs_struct *ps,
int instId,
PERF_OBJECT_TYPE *obj,
/*********************************************************************
*********************************************************************/
-BOOL _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj,
+bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj,
prs_struct *ps,
int instInd,
TDB_CONTEXT *names)
int base_index,
TDB_CONTEXT *names)
{
- BOOL success;
+ bool success;
int i, j, retval = 0;
char keybuf[PERFCOUNT_MAX_LEN];
TDB_DATA key, data;
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_get_64(SMB_BIG_UINT *retval,
+static bool _reg_perfcount_get_64(SMB_BIG_UINT *retval,
TDB_CONTEXT *tdb,
int key_part1,
const char *key_part2)
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_init_data_block_perf(PERF_DATA_BLOCK *block,
+static bool _reg_perfcount_init_data_block_perf(PERF_DATA_BLOCK *block,
TDB_CONTEXT *names)
{
SMB_BIG_UINT PerfFreq, PerfTime, PerfTime100nSec;
TDB_CONTEXT *counters;
- BOOL status = False;
+ bool status = False;
const char *fname = counters_directory( DATA_DB );
counters = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDONLY, 0444);
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_init_data_block(PERF_DATA_BLOCK *block,
+static bool _reg_perfcount_init_data_block(PERF_DATA_BLOCK *block,
prs_struct *ps, TDB_CONTEXT *names)
{
wpstring temp;
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_marshall_perf_data_block(prs_struct *ps, PERF_DATA_BLOCK block, int depth)
+static bool _reg_perfcount_marshall_perf_data_block(prs_struct *ps, PERF_DATA_BLOCK block, int depth)
{
int i;
prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_data_block");
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_marshall_perf_counters(prs_struct *ps,
+static bool _reg_perfcount_marshall_perf_counters(prs_struct *ps,
PERF_OBJECT_TYPE object,
int depth)
{
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_marshall_perf_counter_data(prs_struct *ps,
+static bool _reg_perfcount_marshall_perf_counter_data(prs_struct *ps,
PERF_COUNTER_BLOCK counter_data,
int depth)
{
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_marshall_perf_instances(prs_struct *ps,
+static bool _reg_perfcount_marshall_perf_instances(prs_struct *ps,
PERF_OBJECT_TYPE object,
int depth)
{
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_marshall_perf_objects(prs_struct *ps, PERF_DATA_BLOCK block, int depth)
+static bool _reg_perfcount_marshall_perf_objects(prs_struct *ps, PERF_DATA_BLOCK block, int depth)
{
int obj;
/*********************************************************************
*********************************************************************/
-static BOOL _reg_perfcount_marshall_hkpd(prs_struct *ps, PERF_DATA_BLOCK block)
+static bool _reg_perfcount_marshall_hkpd(prs_struct *ps, PERF_DATA_BLOCK block)
{
int depth = 0;
if(_reg_perfcount_marshall_perf_data_block(ps, block, depth) == True)
/* callbscks for fetch/store operations */
int ( *fetch_subkeys) ( const char *path, REGSUBKEY_CTR *subkeys );
- BOOL (*store_subkeys) ( const char *path, REGSUBKEY_CTR *subkeys );
+ bool (*store_subkeys) ( const char *path, REGSUBKEY_CTR *subkeys );
int (*fetch_values) ( const char *path, REGVAL_CTR *values );
- BOOL (*store_values) ( const char *path, REGVAL_CTR *values );
+ bool (*store_values) ( const char *path, REGVAL_CTR *values );
};
/*********************************************************************
keyname is the sharename and not the printer name.
*********************************************************************/
-static BOOL add_printers_by_registry( REGSUBKEY_CTR *subkeys )
+static bool add_printers_by_registry( REGSUBKEY_CTR *subkeys )
{
int i, num_keys, snum;
char *printername;
/**********************************************************************
*********************************************************************/
-static BOOL key_printers_store_keys( const char *key, REGSUBKEY_CTR *subkeys )
+static bool key_printers_store_keys( const char *key, REGSUBKEY_CTR *subkeys )
{
char *printers_key;
char *printername, *printerdatakey;
/**********************************************************************
*********************************************************************/
-static BOOL key_printers_store_values( const char *key, REGVAL_CTR *values )
+static bool key_printers_store_values( const char *key, REGVAL_CTR *values )
{
char *printers_key;
char *printername, *keyname;
/**********************************************************************
*********************************************************************/
-static BOOL regprint_store_reg_keys( const char *key, REGSUBKEY_CTR *subkeys )
+static bool regprint_store_reg_keys( const char *key, REGSUBKEY_CTR *subkeys )
{
int i = match_registry_path( key );
/**********************************************************************
*********************************************************************/
-static BOOL regprint_store_reg_values( const char *key, REGVAL_CTR *values )
+static bool regprint_store_reg_values( const char *key, REGVAL_CTR *values )
{
int i = match_registry_path( key );
static int shares_subkey_info( const char *key, REGSUBKEY_CTR *subkey_ctr )
{
char *path;
- BOOL top_level = False;
+ bool top_level = False;
int num_subkeys = 0;
DEBUG(10,("printing_subkey_info: key=>[%s]\n", key));
static int shares_value_info( const char *key, REGVAL_CTR *val )
{
char *path;
- BOOL top_level = False;
+ bool top_level = False;
int num_values = 0;
DEBUG(10,("printing_value_info: key=>[%s]\n", key));
(for now at least)
*********************************************************************/
-static BOOL shares_store_subkey( const char *key, REGSUBKEY_CTR *subkeys )
+static bool shares_store_subkey( const char *key, REGSUBKEY_CTR *subkeys )
{
return False;
}
(for now at least)
*********************************************************************/
-static BOOL shares_store_value( const char *key, REGVAL_CTR *val )
+static bool shares_store_value( const char *key, REGVAL_CTR *val )
{
return False;
}
return regdb_ops.fetch_subkeys(key, subkey_ctr);
}
-static BOOL smbconf_store_keys( const char *key, REGSUBKEY_CTR *subkeys )
+static bool smbconf_store_keys( const char *key, REGSUBKEY_CTR *subkeys )
{
return regdb_ops.store_subkeys(key, subkeys);
}
size_t len;
const char *canon_valname;
const char *canon_valstr;
- BOOL inverse;
+ bool inverse;
struct registry_value *value;
WERROR err;
TALLOC_CTX *tmp_ctx;
return newval;
}
-static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val )
+static bool smbconf_store_values( const char *key, REGVAL_CTR *val )
{
int i;
int num_values = regval_ctr_numvals(val);
return regdb_ops.store_values(key, new_val_ctr);
}
-static BOOL smbconf_reg_access_check(const char *keyname, uint32 requested,
+static bool smbconf_reg_access_check(const char *keyname, uint32 requested,
uint32 *granted,
const struct nt_user_token *token)
{
WARNING!! Does modify the original string!
***********************************************************************/
-BOOL reg_split_path( char *path, char **base, char **new_path )
+bool reg_split_path( char *path, char **base, char **new_path )
{
char *p;
WARNING!! Does modify the original string!
***********************************************************************/
-BOOL reg_split_key( char *path, char **base, char **key )
+bool reg_split_key( char *path, char **base, char **key )
{
char *p;
/*******************************************************************
*******************************************************************/
-static BOOL write_hbin_block( REGF_FILE *file, REGF_HBIN *hbin )
+static bool write_hbin_block( REGF_FILE *file, REGF_HBIN *hbin )
{
if ( !hbin->dirty )
return True;
/*******************************************************************
*******************************************************************/
-static BOOL hbin_block_close( REGF_FILE *file, REGF_HBIN *hbin )
+static bool hbin_block_close( REGF_FILE *file, REGF_HBIN *hbin )
{
REGF_HBIN *p;
/*******************************************************************
*******************************************************************/
-static BOOL prs_regf_block( const char *desc, prs_struct *ps, int depth, REGF_FILE *file )
+static bool prs_regf_block( const char *desc, prs_struct *ps, int depth, REGF_FILE *file )
{
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
/*******************************************************************
*******************************************************************/
-static BOOL prs_hbin_block( const char *desc, prs_struct *ps, int depth, REGF_HBIN *hbin )
+static bool prs_hbin_block( const char *desc, prs_struct *ps, int depth, REGF_HBIN *hbin )
{
uint32 block_size2;
/*******************************************************************
*******************************************************************/
-static BOOL prs_nk_rec( const char *desc, prs_struct *ps, int depth, REGF_NK_REC *nk )
+static bool prs_nk_rec( const char *desc, prs_struct *ps, int depth, REGF_NK_REC *nk )
{
uint16 class_length, name_length;
uint32 start;
/*******************************************************************
*******************************************************************/
-static BOOL read_regf_block( REGF_FILE *file )
+static bool read_regf_block( REGF_FILE *file )
{
prs_struct ps;
uint32 checksum;
block for it
*******************************************************************/
-static BOOL hbin_contains_offset( REGF_HBIN *hbin, uint32 offset )
+static bool hbin_contains_offset( REGF_HBIN *hbin, uint32 offset )
{
if ( !hbin )
return False;
/*******************************************************************
*******************************************************************/
-static BOOL prs_hash_rec( const char *desc, prs_struct *ps, int depth, REGF_HASH_REC *hash )
+static bool prs_hash_rec( const char *desc, prs_struct *ps, int depth, REGF_HASH_REC *hash )
{
prs_debug(ps, depth, desc, "prs_hash_rec");
depth++;
/*******************************************************************
*******************************************************************/
-static BOOL hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk )
+static bool hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk )
{
int i;
REGF_LF_REC *lf = &nk->subkeys;
/*******************************************************************
*******************************************************************/
-static BOOL hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_SK_REC *sk )
+static bool hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_SK_REC *sk )
{
prs_struct *ps = &hbin->ps;
uint16 tag = 0xFFFF;
/*******************************************************************
*******************************************************************/
-static BOOL hbin_prs_vk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_VK_REC *vk, REGF_FILE *file )
+static bool hbin_prs_vk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_VK_REC *vk, REGF_FILE *file )
{
uint32 offset;
uint16 name_length;
/* get the data if necessary */
if ( vk->data_size != 0 ) {
- BOOL charmode = False;
+ bool charmode = False;
if ( (vk->type == REG_SZ) || (vk->type == REG_MULTI_SZ) )
charmode = True;
in the prs_struct *ps.
*******************************************************************/
-static BOOL hbin_prs_vk_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk, REGF_FILE *file )
+static bool hbin_prs_vk_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk, REGF_FILE *file )
{
int i;
uint32 record_size;
/*******************************************************************
*******************************************************************/
-static BOOL hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk )
+static bool hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk )
{
int depth = 0;
REGF_HBIN *sub_hbin;
/*******************************************************************
*******************************************************************/
-static BOOL next_record( REGF_HBIN *hbin, const char *hdr, BOOL *eob )
+static bool next_record( REGF_HBIN *hbin, const char *hdr, bool *eob )
{
uint8 header[REC_HDR_SIZE];
uint32 record_size;
uint32 curr_off, block_size;
- BOOL found = False;
+ bool found = False;
prs_struct *ps = &hbin->ps;
curr_off = prs_offset( ps );
/*******************************************************************
*******************************************************************/
-static BOOL next_nk_record( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk, BOOL *eob )
+static bool next_nk_record( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk, bool *eob )
{
if ( next_record( hbin, "nk", eob ) && hbin_prs_key( file, hbin, nk ) )
return True;
block header to disk
*******************************************************************/
-static BOOL init_regf_block( REGF_FILE *file )
+static bool init_regf_block( REGF_FILE *file )
{
prs_struct ps;
- BOOL result = True;
+ bool result = True;
if ( !prs_init( &ps, REGF_BLOCKSIZE, file->mem_ctx, MARSHALL ) )
return False;
REGF_NK_REC *nk;
REGF_HBIN *hbin;
uint32 offset = REGF_BLOCKSIZE;
- BOOL found = False;
- BOOL eob;
+ bool found = False;
+ bool eob;
if ( !file )
return NULL;
{
REGF_HBIN *hbin, *p_hbin;
uint32 block_off;
- BOOL cached;
+ bool cached;
/* check open block list */
/*******************************************************************
*******************************************************************/
-static BOOL create_vk_record( REGF_FILE *file, REGF_VK_REC *vk, REGISTRY_VALUE *value )
+static bool create_vk_record( REGF_FILE *file, REGF_VK_REC *vk, REGISTRY_VALUE *value )
{
char *name = regval_name(value);
REGF_HBIN *data_hbin;
NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- BOOL sec_qos, uint32 des_access,
+ bool sec_qos, uint32 des_access,
POLICY_HND *pol)
{
prs_struct qbuf, rbuf;
*/
NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, BOOL sec_qos,
+ TALLOC_CTX *mem_ctx, bool sec_qos,
uint32 des_access, POLICY_HND *pol)
{
prs_struct qbuf, rbuf;
/* remove account rights for an account. */
NTSTATUS rpccli_lsa_remove_account_rights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, DOM_SID sid, BOOL removeall,
+ POLICY_HND *pol, DOM_SID sid, bool removeall,
uint32 count, const char **privs_name)
{
prs_struct qbuf, rbuf;
/** An example of how to use the routines in this file. Fetch a DOMAIN
sid. Does complete cli setup / teardown anonymously. */
-BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid)
+bool fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid)
{
extern pstring global_myname;
struct cli_state cli;
NTSTATUS result;
POLICY_HND lsa_pol;
- BOOL ret = False;
+ bool ret = False;
ZERO_STRUCT(cli);
if(cli_initialise(&cli) == False) {
Set the handle state.
****************************************************************************/
-static BOOL rpc_pipe_set_hnd_state(struct rpc_pipe_client *cli,
+static bool rpc_pipe_set_hnd_state(struct rpc_pipe_client *cli,
const char *pipe_name, uint16 device_state)
{
- BOOL state_set = False;
+ bool state_set = False;
char param[2];
uint16 setup[2]; /* only need 2 uint16 setup parameters */
char *rparam = NULL;
Check the rpc bind acknowledge response.
****************************************************************************/
-static BOOL valid_pipe_name(const int pipe_idx, RPC_IFACE *abstract, RPC_IFACE *transfer)
+static bool valid_pipe_name(const int pipe_idx, RPC_IFACE *abstract, RPC_IFACE *transfer)
{
if ( pipe_idx >= PI_MAX_PIPES ) {
DEBUG(0,("valid_pipe_name: Programmer error! Invalid pipe index [%d]\n",
Check the rpc bind acknowledge response.
****************************************************************************/
-static BOOL check_bind_response(RPC_HDR_BA *hdr_ba, const int pipe_idx, RPC_IFACE *transfer)
+static bool check_bind_response(RPC_HDR_BA *hdr_ba, const int pipe_idx, RPC_IFACE *transfer)
{
if ( hdr_ba->addr.len == 0) {
DEBUG(4,("Ignoring length check -- ASU bug (server didn't fill in the pipe name correctly)"));
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_info_0(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_info_0(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PRINTER_INFO_0 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_info_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_info_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PRINTER_INFO_1 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_info_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_info_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PRINTER_INFO_2 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_info_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_info_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PRINTER_INFO_3 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_info_7(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_info_7(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PRINTER_INFO_7 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_port_info_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_port_info_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PORT_INFO_1 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_port_info_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_port_info_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, PORT_INFO_2 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_driver_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_driver_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, DRIVER_INFO_1 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_driver_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_driver_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, DRIVER_INFO_2 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printer_driver_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printer_driver_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, DRIVER_INFO_3 **info)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 returned, DRIVER_DIRECTORY_1 **info
)
{
/**********************************************************************
**********************************************************************/
-static BOOL decode_jobs_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_jobs_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 num_jobs, JOB_INFO_1 **jobs)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_jobs_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_jobs_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 num_jobs, JOB_INFO_2 **jobs)
{
uint32 i;
/**********************************************************************
**********************************************************************/
-static BOOL decode_forms_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
+static bool decode_forms_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
uint32 num_forms, FORM_1 **forms)
{
int i;
Read/write a RPC_BUFFER struct.
********************************************************************/
-BOOL prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer)
+bool prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer)
{
prs_debug(ps, depth, desc, "prs_rpcbuffer");
depth++;
return True;
}
else {
- BOOL ret = False;
+ bool ret = False;
if (!prs_uint32("size", ps, depth, &buffer->size))
goto out;
Read/write an RPC_BUFFER* struct.(allocate memory if unmarshalling)
********************************************************************/
-BOOL prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer)
+bool prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer)
{
uint32 data_p;
Allocate more memory for a RPC_BUFFER.
****************************************************************************/
-BOOL rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size)
+bool rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size)
{
prs_struct *ps;
uint32 extra_space;
*
********************************************************************/
-BOOL smb_io_relstr(const char *desc, RPC_BUFFER *buffer, int depth, UNISTR *string)
+bool smb_io_relstr(const char *desc, RPC_BUFFER *buffer, int depth, UNISTR *string)
{
prs_struct *ps=&buffer->prs;
* used by 2 RPC structs
********************************************************************/
-BOOL smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 **string)
+bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 **string)
{
UNISTR chaine;
Parse a DEVMODE structure and its relative pointer.
********************************************************************/
-BOOL smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc)
+bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc)
{
prs_struct *ps= &buffer->prs;
/************************************************************************
************************************************************************/
-static BOOL ds_io_dominfobasic(const char *desc, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic, prs_struct *ps, int depth)
+static bool ds_io_dominfobasic(const char *desc, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic, prs_struct *ps, int depth)
{
DSROLE_PRIMARY_DOMAIN_INFO_BASIC *p = *basic;
/************************************************************************
************************************************************************/
-BOOL ds_io_q_getprimdominfo( const char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth)
+bool ds_io_q_getprimdominfo( const char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_q_getprimdominfo");
depth++;
/************************************************************************
************************************************************************/
-BOOL ds_io_r_getprimdominfo( const char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth)
+bool ds_io_r_getprimdominfo( const char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_r_getprimdominfo");
depth++;
initialize a DS_ENUM_DOM_TRUSTS structure
************************************************************************/
-BOOL init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server, uint32 flags )
+bool init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server, uint32 flags )
{
q->flags = flags;
/************************************************************************
************************************************************************/
-static BOOL ds_io_domain_trusts( const char *desc, DS_DOMAIN_TRUSTS *trust, prs_struct *ps, int depth)
+static bool ds_io_domain_trusts( const char *desc, DS_DOMAIN_TRUSTS *trust, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_dom_trusts_ctr");
depth++;
/************************************************************************
************************************************************************/
-static BOOL ds_io_dom_trusts_ctr( const char *desc, DS_DOMAIN_TRUSTS_CTR *ctr, prs_struct *ps, int depth)
+static bool ds_io_dom_trusts_ctr( const char *desc, DS_DOMAIN_TRUSTS_CTR *ctr, prs_struct *ps, int depth)
{
int i;
initialize a DS_ENUM_DOM_TRUSTS request
************************************************************************/
-BOOL ds_io_q_enum_domain_trusts( const char *desc, DS_Q_ENUM_DOM_TRUSTS *q_u, prs_struct *ps, int depth)
+bool ds_io_q_enum_domain_trusts( const char *desc, DS_Q_ENUM_DOM_TRUSTS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_q_enum_domain_trusts");
depth++;
/************************************************************************
************************************************************************/
-BOOL ds_io_r_enum_domain_trusts( const char *desc, DS_R_ENUM_DOM_TRUSTS *r_u, prs_struct *ps, int depth)
+bool ds_io_r_enum_domain_trusts( const char *desc, DS_R_ENUM_DOM_TRUSTS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_r_enum_domain_trusts");
depth++;
/********************************************************************
********************************************************************/
-BOOL prs_ev_open_unknown0( const char *desc, prs_struct *ps, int depth, EVENTLOG_OPEN_UNKNOWN0 *u )
+bool prs_ev_open_unknown0( const char *desc, prs_struct *ps, int depth, EVENTLOG_OPEN_UNKNOWN0 *u )
{
if ( !u )
return False;
/********************************************************************
********************************************************************/
-BOOL eventlog_io_q_open_eventlog(const char *desc, EVENTLOG_Q_OPEN_EVENTLOG *q_u,
+bool eventlog_io_q_open_eventlog(const char *desc, EVENTLOG_Q_OPEN_EVENTLOG *q_u,
prs_struct *ps, int depth)
{
if(q_u == NULL)
return True;
}
-BOOL eventlog_io_r_open_eventlog(const char *desc, EVENTLOG_R_OPEN_EVENTLOG *r_u,
+bool eventlog_io_r_open_eventlog(const char *desc, EVENTLOG_R_OPEN_EVENTLOG *r_u,
prs_struct *ps, int depth)
{
if(r_u == NULL)
return True;
}
-BOOL eventlog_io_q_get_num_records(const char *desc, EVENTLOG_Q_GET_NUM_RECORDS *q_u,
+bool eventlog_io_q_get_num_records(const char *desc, EVENTLOG_Q_GET_NUM_RECORDS *q_u,
prs_struct *ps, int depth)
{
if(q_u == NULL)
return True;
}
-BOOL eventlog_io_r_get_num_records(const char *desc, EVENTLOG_R_GET_NUM_RECORDS *r_u,
+bool eventlog_io_r_get_num_records(const char *desc, EVENTLOG_R_GET_NUM_RECORDS *r_u,
prs_struct *ps, int depth)
{
if(r_u == NULL)
return True;
}
-BOOL eventlog_io_q_get_oldest_entry(const char *desc, EVENTLOG_Q_GET_OLDEST_ENTRY *q_u,
+bool eventlog_io_q_get_oldest_entry(const char *desc, EVENTLOG_Q_GET_OLDEST_ENTRY *q_u,
prs_struct *ps, int depth)
{
if(q_u == NULL)
return True;
}
-BOOL eventlog_io_r_get_oldest_entry(const char *desc, EVENTLOG_R_GET_OLDEST_ENTRY *r_u,
+bool eventlog_io_r_get_oldest_entry(const char *desc, EVENTLOG_R_GET_OLDEST_ENTRY *r_u,
prs_struct *ps, int depth)
{
if(r_u == NULL)
return True;
}
-BOOL eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
+bool eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
prs_struct *ps, int depth)
{
if(q_u == NULL)
DWORD sent_size -- sum of EVENTLOGRECORD lengths if records returned, 0 otherwise
DWORD real_size -- 0 if records returned, otherwise length of next record to be returned
WERROR status */
-BOOL eventlog_io_r_read_eventlog(const char *desc,
+bool eventlog_io_r_read_eventlog(const char *desc,
EVENTLOG_Q_READ_EVENTLOG *q_u,
EVENTLOG_R_READ_EVENTLOG *r_u,
prs_struct *ps,
I'm not sure where the \?? is coming from, or why the ${CWD} of the client process
would be added in given that the backup file gets written on the server side. */
-BOOL eventlog_io_q_clear_eventlog(const char *desc, EVENTLOG_Q_CLEAR_EVENTLOG *q_u,
+bool eventlog_io_q_clear_eventlog(const char *desc, EVENTLOG_Q_CLEAR_EVENTLOG *q_u,
prs_struct *ps, int depth)
{
if(q_u == NULL)
}
-BOOL eventlog_io_r_clear_eventlog(const char *desc, EVENTLOG_R_CLEAR_EVENTLOG *r_u,
+bool eventlog_io_r_clear_eventlog(const char *desc, EVENTLOG_R_CLEAR_EVENTLOG *r_u,
prs_struct *ps, int depth)
{
if(r_u == NULL)
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_PARSE
-static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth);
-static BOOL lsa_io_trans_names2(const char *desc, LSA_TRANS_NAME_ENUM2 *trn, prs_struct *ps, int depth);
+static bool lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth);
+static bool lsa_io_trans_names2(const char *desc, LSA_TRANS_NAME_ENUM2 *trn, prs_struct *ps, int depth);
/*******************************************************************
Inits a LSA_TRANS_NAME structure.
Reads or writes a LSA_TRANS_NAME structure.
********************************************************************/
-static BOOL lsa_io_trans_name(const char *desc, LSA_TRANS_NAME *trn, prs_struct *ps,
+static bool lsa_io_trans_name(const char *desc, LSA_TRANS_NAME *trn, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_trans_name");
Reads or writes a LSA_TRANS_NAME2 structure.
********************************************************************/
-static BOOL lsa_io_trans_name2(const char *desc, LSA_TRANS_NAME2 *trn, prs_struct *ps,
+static bool lsa_io_trans_name2(const char *desc, LSA_TRANS_NAME2 *trn, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_trans_name2");
Reads or writes a DOM_R_REF structure.
********************************************************************/
-static BOOL lsa_io_dom_r_ref(const char *desc, DOM_R_REF *dom, prs_struct *ps, int depth)
+static bool lsa_io_dom_r_ref(const char *desc, DOM_R_REF *dom, prs_struct *ps, int depth)
{
unsigned int i;
Reads or writes an LSA_SEC_QOS structure.
********************************************************************/
-static BOOL lsa_io_sec_qos(const char *desc, LSA_SEC_QOS *qos, prs_struct *ps,
+static bool lsa_io_sec_qos(const char *desc, LSA_SEC_QOS *qos, prs_struct *ps,
int depth)
{
uint32 start;
Reads or writes an LSA_OBJ_ATTR structure.
********************************************************************/
-static BOOL lsa_io_obj_attr(const char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps,
+static bool lsa_io_obj_attr(const char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_obj_attr");
Reads or writes an LSA_Q_OPEN_POL structure.
********************************************************************/
-BOOL lsa_io_q_open_pol(const char *desc, LSA_Q_OPEN_POL *in, prs_struct *ps,
+bool lsa_io_q_open_pol(const char *desc, LSA_Q_OPEN_POL *in, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_pol");
Reads or writes an LSA_R_OPEN_POL structure.
********************************************************************/
-BOOL lsa_io_r_open_pol(const char *desc, LSA_R_OPEN_POL *out, prs_struct *ps,
+bool lsa_io_r_open_pol(const char *desc, LSA_R_OPEN_POL *out, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_pol");
Reads or writes an LSA_Q_OPEN_POL2 structure.
********************************************************************/
-BOOL lsa_io_q_open_pol2(const char *desc, LSA_Q_OPEN_POL2 *in, prs_struct *ps,
+bool lsa_io_q_open_pol2(const char *desc, LSA_Q_OPEN_POL2 *in, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_pol2");
Reads or writes an LSA_R_OPEN_POL2 structure.
********************************************************************/
-BOOL lsa_io_r_open_pol2(const char *desc, LSA_R_OPEN_POL2 *out, prs_struct *ps,
+bool lsa_io_r_open_pol2(const char *desc, LSA_R_OPEN_POL2 *out, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_pol2");
Reads or writes an LSA_Q_QUERY_SEC_OBJ structure.
********************************************************************/
-BOOL lsa_io_q_query_sec_obj(const char *desc, LSA_Q_QUERY_SEC_OBJ *in,
+bool lsa_io_q_query_sec_obj(const char *desc, LSA_Q_QUERY_SEC_OBJ *in,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query_sec_obj");
Reads or writes a LSA_R_QUERY_SEC_OBJ structure.
********************************************************************/
-BOOL lsa_io_r_query_sec_obj(const char *desc, LSA_R_QUERY_SEC_OBJ *out, prs_struct *ps, int depth)
+bool lsa_io_r_query_sec_obj(const char *desc, LSA_R_QUERY_SEC_OBJ *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query_sec_obj");
depth++;
Reads or writes an LSA_Q_QUERY_INFO structure.
********************************************************************/
-BOOL lsa_io_q_query(const char *desc, LSA_Q_QUERY_INFO *in, prs_struct *ps,
+bool lsa_io_q_query(const char *desc, LSA_Q_QUERY_INFO *in, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query");
/*******************************************************************
makes an LSA_Q_ENUM_TRUST_DOM structure.
********************************************************************/
-BOOL init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM * q_e, POLICY_HND *pol,
+bool init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM * q_e, POLICY_HND *pol,
uint32 enum_context, uint32 preferred_len)
{
DEBUG(5, ("init_q_enum_trust_dom\n"));
Reads or writes an LSA_Q_ENUM_TRUST_DOM structure.
********************************************************************/
-BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
+bool lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_enum_trust_dom");
/*******************************************************************
********************************************************************/
-BOOL lsa_io_domain_list( const char *desc, prs_struct *ps, int depth, DOMAIN_LIST *domlist )
+bool lsa_io_domain_list( const char *desc, prs_struct *ps, int depth, DOMAIN_LIST *domlist )
{
int i;
Reads or writes an LSA_R_ENUM_TRUST_DOM structure.
********************************************************************/
-BOOL lsa_io_r_enum_trust_dom(const char *desc, LSA_R_ENUM_TRUST_DOM *out,
+bool lsa_io_r_enum_trust_dom(const char *desc, LSA_R_ENUM_TRUST_DOM *out,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_enum_trust_dom");
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_dom_query_1(const char *desc, DOM_QUERY_1 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_1(const char *desc, DOM_QUERY_1 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_dom_query_2(const char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_2(const char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_3(const char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_3(const char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_5(const char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_5(const char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth)
{
return lsa_io_dom_query_3("", d_q, ps, depth);
}
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_6(const char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_6(const char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_10(const char *desc, DOM_QUERY_10 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_10(const char *desc, DOM_QUERY_10 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_11(const char *desc, DOM_QUERY_11 *d_q, prs_struct *ps, int depth)
+static bool lsa_io_dom_query_11(const char *desc, DOM_QUERY_11 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
Reads or writes an LSA_DNS_DOM_INFO structure.
********************************************************************/
-BOOL lsa_io_dom_query_12(const char *desc, DOM_QUERY_12 *info, prs_struct *ps, int depth)
+bool lsa_io_dom_query_12(const char *desc, DOM_QUERY_12 *info, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_dom_query_12");
depth++;
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_query_info_ctr2(const char *desc, prs_struct *ps, int depth, LSA_INFO_CTR2 *ctr)
+static bool lsa_io_query_info_ctr2(const char *desc, prs_struct *ps, int depth, LSA_INFO_CTR2 *ctr)
{
prs_debug(ps, depth, desc, "lsa_io_query_info_ctr2");
depth++;
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_query_info_ctr(const char *desc, prs_struct *ps, int depth, LSA_INFO_CTR *ctr)
+static bool lsa_io_query_info_ctr(const char *desc, prs_struct *ps, int depth, LSA_INFO_CTR *ctr)
{
prs_debug(ps, depth, desc, "lsa_io_query_info_ctr");
depth++;
Reads or writes an LSA_R_QUERY_INFO structure.
********************************************************************/
-BOOL lsa_io_r_query(const char *desc, LSA_R_QUERY_INFO *out, prs_struct *ps, int depth)
+bool lsa_io_r_query(const char *desc, LSA_R_QUERY_INFO *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query");
Reads or writes an LSA_Q_SET_INFO structure.
********************************************************************/
-BOOL lsa_io_q_set(const char *desc, LSA_Q_SET_INFO *in, prs_struct *ps,
+bool lsa_io_q_set(const char *desc, LSA_Q_SET_INFO *in, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_set");
Reads or writes an LSA_R_SET_INFO structure.
********************************************************************/
-BOOL lsa_io_r_set(const char *desc, LSA_R_SET_INFO *out, prs_struct *ps, int depth)
+bool lsa_io_r_set(const char *desc, LSA_R_SET_INFO *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_set");
depth++;
Reads or writes a LSA_SID_ENUM structure.
********************************************************************/
-static BOOL lsa_io_sid_enum(const char *desc, LSA_SID_ENUM *sen, prs_struct *ps,
+static bool lsa_io_sid_enum(const char *desc, LSA_SID_ENUM *sen, prs_struct *ps,
int depth)
{
unsigned int i;
Reads or writes a LSA_Q_LOOKUP_SIDS structure.
********************************************************************/
-BOOL lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps,
+bool lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_lookup_sids");
Reads or writes a LSA_Q_LOOKUP_SIDS2 structure.
********************************************************************/
-BOOL lsa_io_q_lookup_sids2(const char *desc, LSA_Q_LOOKUP_SIDS2 *q_s, prs_struct *ps,
+bool lsa_io_q_lookup_sids2(const char *desc, LSA_Q_LOOKUP_SIDS2 *q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_lookup_sids2");
Reads or writes a LSA_Q_LOOKUP_SIDS3 structure.
********************************************************************/
-BOOL lsa_io_q_lookup_sids3(const char *desc, LSA_Q_LOOKUP_SIDS3 *q_s, prs_struct *ps,
+bool lsa_io_q_lookup_sids3(const char *desc, LSA_Q_LOOKUP_SIDS3 *q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_lookup_sids3");
Reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn,
+static bool lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn,
prs_struct *ps, int depth)
{
unsigned int i;
Reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_trans_names2(const char *desc, LSA_TRANS_NAME_ENUM2 *trn,
+static bool lsa_io_trans_names2(const char *desc, LSA_TRANS_NAME_ENUM2 *trn,
prs_struct *ps, int depth)
{
unsigned int i;
Reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_sids(const char *desc, LSA_R_LOOKUP_SIDS *r_s,
+bool lsa_io_r_lookup_sids(const char *desc, LSA_R_LOOKUP_SIDS *r_s,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_lookup_sids");
Reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_sids2(const char *desc, LSA_R_LOOKUP_SIDS2 *r_s,
+bool lsa_io_r_lookup_sids2(const char *desc, LSA_R_LOOKUP_SIDS2 *r_s,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_lookup_sids2");
Reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_sids3(const char *desc, LSA_R_LOOKUP_SIDS3 *r_s,
+bool lsa_io_r_lookup_sids3(const char *desc, LSA_R_LOOKUP_SIDS3 *r_s,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_lookup_sids3");
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r,
+bool lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r,
prs_struct *ps, int depth)
{
unsigned int i;
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *out, prs_struct *ps, int depth)
+bool lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *out, prs_struct *ps, int depth)
{
unsigned int i;
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_lookup_names2(const char *desc, LSA_Q_LOOKUP_NAMES2 *q_r,
+bool lsa_io_q_lookup_names2(const char *desc, LSA_Q_LOOKUP_NAMES2 *q_r,
prs_struct *ps, int depth)
{
unsigned int i;
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_names2(const char *desc, LSA_R_LOOKUP_NAMES2 *out, prs_struct *ps, int depth)
+bool lsa_io_r_lookup_names2(const char *desc, LSA_R_LOOKUP_NAMES2 *out, prs_struct *ps, int depth)
{
unsigned int i;
Following pass must read DOM_SID2 types.
********************************************************************/
-BOOL smb_io_lsa_translated_sids3(const char *desc, LSA_TRANSLATED_SID3 *q_r,
+bool smb_io_lsa_translated_sids3(const char *desc, LSA_TRANSLATED_SID3 *q_r,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_lsa_translated_sids3");
Identical to lsa_io_q_lookup_names2.
********************************************************************/
-BOOL lsa_io_q_lookup_names3(const char *desc, LSA_Q_LOOKUP_NAMES3 *q_r,
+bool lsa_io_q_lookup_names3(const char *desc, LSA_Q_LOOKUP_NAMES3 *q_r,
prs_struct *ps, int depth)
{
unsigned int i;
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_names3(const char *desc, LSA_R_LOOKUP_NAMES3 *out, prs_struct *ps, int depth)
+bool lsa_io_r_lookup_names3(const char *desc, LSA_R_LOOKUP_NAMES3 *out, prs_struct *ps, int depth)
{
unsigned int i;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_q_lookup_names4(const char *desc, LSA_Q_LOOKUP_NAMES4 *q_r,
+bool lsa_io_q_lookup_names4(const char *desc, LSA_Q_LOOKUP_NAMES4 *q_r,
prs_struct *ps, int depth)
{
unsigned int i;
Identical to lsa_io_r_lookup_names3.
********************************************************************/
-BOOL lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_struct *ps, int depth)
+bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_struct *ps, int depth)
{
unsigned int i;
Reads or writes an LSA_Q_OPEN_SECRET structure.
********************************************************************/
-BOOL lsa_io_q_open_secret(const char *desc, LSA_Q_OPEN_SECRET *in, prs_struct *ps, int depth)
+bool lsa_io_q_open_secret(const char *desc, LSA_Q_OPEN_SECRET *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_secret");
depth++;
Reads or writes an LSA_R_OPEN_SECRET structure.
********************************************************************/
-BOOL lsa_io_r_open_secret(const char *desc, LSA_R_OPEN_SECRET *out, prs_struct *ps, int depth)
+bool lsa_io_r_open_secret(const char *desc, LSA_R_OPEN_SECRET *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_secret");
depth++;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_enum_privs(const char *desc, LSA_Q_ENUM_PRIVS *in, prs_struct *ps, int depth)
+bool lsa_io_q_enum_privs(const char *desc, LSA_Q_ENUM_PRIVS *in, prs_struct *ps, int depth)
{
if (in == NULL)
return False;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_priv_entries(const char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth)
+static bool lsa_io_priv_entries(const char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth)
{
uint32 i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_enum_privs(const char *desc, LSA_R_ENUM_PRIVS *out, prs_struct *ps, int depth)
+bool lsa_io_r_enum_privs(const char *desc, LSA_R_ENUM_PRIVS *out, prs_struct *ps, int depth)
{
if (out == NULL)
return False;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_priv_get_dispname(const char *desc, LSA_Q_PRIV_GET_DISPNAME *in, prs_struct *ps, int depth)
+bool lsa_io_q_priv_get_dispname(const char *desc, LSA_Q_PRIV_GET_DISPNAME *in, prs_struct *ps, int depth)
{
if (in == NULL)
return False;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_priv_get_dispname(const char *desc, LSA_R_PRIV_GET_DISPNAME *out, prs_struct *ps, int depth)
+bool lsa_io_r_priv_get_dispname(const char *desc, LSA_R_PRIV_GET_DISPNAME *out, prs_struct *ps, int depth)
{
if (out == NULL)
return False;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_enum_accounts(const char *desc, LSA_Q_ENUM_ACCOUNTS *in, prs_struct *ps, int depth)
+bool lsa_io_q_enum_accounts(const char *desc, LSA_Q_ENUM_ACCOUNTS *in, prs_struct *ps, int depth)
{
if (in == NULL)
return False;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_enum_accounts(const char *desc, LSA_R_ENUM_ACCOUNTS *out, prs_struct *ps, int depth)
+bool lsa_io_r_enum_accounts(const char *desc, LSA_R_ENUM_ACCOUNTS *out, prs_struct *ps, int depth)
{
if (out == NULL)
return False;
Reads or writes an LSA_Q_UNK_GET_CONNUSER structure.
********************************************************************/
-BOOL lsa_io_q_unk_get_connuser(const char *desc, LSA_Q_UNK_GET_CONNUSER *in, prs_struct *ps, int depth)
+bool lsa_io_q_unk_get_connuser(const char *desc, LSA_Q_UNK_GET_CONNUSER *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_unk_get_connuser");
depth++;
Reads or writes an LSA_R_UNK_GET_CONNUSER structure.
********************************************************************/
-BOOL lsa_io_r_unk_get_connuser(const char *desc, LSA_R_UNK_GET_CONNUSER *out, prs_struct *ps, int depth)
+bool lsa_io_r_unk_get_connuser(const char *desc, LSA_R_UNK_GET_CONNUSER *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_unk_get_connuser");
depth++;
Reads or writes an LSA_Q_CREATEACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_create_account(const char *desc, LSA_Q_CREATEACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_q_create_account(const char *desc, LSA_Q_CREATEACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_create_account");
depth++;
Reads or writes an LSA_R_CREATEACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_create_account(const char *desc, LSA_R_CREATEACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_r_create_account(const char *desc, LSA_R_CREATEACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_account");
depth++;
Reads or writes an LSA_Q_OPENACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_open_account(const char *desc, LSA_Q_OPENACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_q_open_account(const char *desc, LSA_Q_OPENACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_account");
depth++;
Reads or writes an LSA_R_OPENACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_open_account(const char *desc, LSA_R_OPENACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_r_open_account(const char *desc, LSA_R_OPENACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_account");
depth++;
Reads or writes an LSA_Q_ENUMPRIVSACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_enum_privsaccount(const char *desc, LSA_Q_ENUMPRIVSACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_q_enum_privsaccount(const char *desc, LSA_Q_ENUMPRIVSACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_enum_privsaccount");
depth++;
Reads or writes an LUID structure.
********************************************************************/
-static BOOL lsa_io_luid(const char *desc, LUID *out, prs_struct *ps, int depth)
+static bool lsa_io_luid(const char *desc, LUID *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_luid");
depth++;
Reads or writes an LUID_ATTR structure.
********************************************************************/
-static BOOL lsa_io_luid_attr(const char *desc, LUID_ATTR *out, prs_struct *ps, int depth)
+static bool lsa_io_luid_attr(const char *desc, LUID_ATTR *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_luid_attr");
depth++;
Reads or writes an PRIVILEGE_SET structure.
********************************************************************/
-static BOOL lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struct *ps, int depth)
+static bool lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struct *ps, int depth)
{
uint32 i, dummy;
Reads or writes an LSA_R_ENUMPRIVSACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_enum_privsaccount(const char *desc, LSA_R_ENUMPRIVSACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_r_enum_privsaccount(const char *desc, LSA_R_ENUMPRIVSACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_enum_privsaccount");
depth++;
Reads or writes an LSA_Q_GETSYSTEMACCOUNTstructure.
********************************************************************/
-BOOL lsa_io_q_getsystemaccount(const char *desc, LSA_Q_GETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_q_getsystemaccount(const char *desc, LSA_Q_GETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_getsystemaccount");
depth++;
Reads or writes an LSA_R_GETSYSTEMACCOUNTstructure.
********************************************************************/
-BOOL lsa_io_r_getsystemaccount(const char *desc, LSA_R_GETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_r_getsystemaccount(const char *desc, LSA_R_GETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_getsystemaccount");
depth++;
Reads or writes an LSA_Q_SETSYSTEMACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_setsystemaccount(const char *desc, LSA_Q_SETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_q_setsystemaccount(const char *desc, LSA_Q_SETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_setsystemaccount");
depth++;
Reads or writes an LSA_R_SETSYSTEMACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_setsystemaccount(const char *desc, LSA_R_SETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
+bool lsa_io_r_setsystemaccount(const char *desc, LSA_R_SETSYSTEMACCOUNT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_setsystemaccount");
depth++;
init_lsa_string( &q_u->privname, name );
}
-BOOL smb_io_lsa_string( const char *desc, LSA_STRING *string, prs_struct *ps, int depth )
+bool smb_io_lsa_string( const char *desc, LSA_STRING *string, prs_struct *ps, int depth )
{
prs_debug(ps, depth, desc, "smb_io_lsa_string");
depth++;
Reads or writes an LSA_Q_LOOKUP_PRIV_VALUE structure.
********************************************************************/
-BOOL lsa_io_q_lookup_priv_value(const char *desc, LSA_Q_LOOKUP_PRIV_VALUE *out, prs_struct *ps, int depth)
+bool lsa_io_q_lookup_priv_value(const char *desc, LSA_Q_LOOKUP_PRIV_VALUE *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_lookup_priv_value");
depth++;
Reads or writes an LSA_R_LOOKUP_PRIV_VALUE structure.
********************************************************************/
-BOOL lsa_io_r_lookup_priv_value(const char *desc, LSA_R_LOOKUP_PRIV_VALUE *out, prs_struct *ps, int depth)
+bool lsa_io_r_lookup_priv_value(const char *desc, LSA_R_LOOKUP_PRIV_VALUE *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_lookup_priv_value");
depth++;
Reads or writes an LSA_Q_ADDPRIVS structure.
********************************************************************/
-BOOL lsa_io_q_addprivs(const char *desc, LSA_Q_ADDPRIVS *out, prs_struct *ps, int depth)
+bool lsa_io_q_addprivs(const char *desc, LSA_Q_ADDPRIVS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_addprivs");
depth++;
Reads or writes an LSA_R_ADDPRIVS structure.
********************************************************************/
-BOOL lsa_io_r_addprivs(const char *desc, LSA_R_ADDPRIVS *out, prs_struct *ps, int depth)
+bool lsa_io_r_addprivs(const char *desc, LSA_R_ADDPRIVS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_addprivs");
depth++;
Reads or writes an LSA_Q_REMOVEPRIVS structure.
********************************************************************/
-BOOL lsa_io_q_removeprivs(const char *desc, LSA_Q_REMOVEPRIVS *out, prs_struct *ps, int depth)
+bool lsa_io_q_removeprivs(const char *desc, LSA_Q_REMOVEPRIVS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_removeprivs");
depth++;
Reads or writes an LSA_R_REMOVEPRIVS structure.
********************************************************************/
-BOOL lsa_io_r_removeprivs(const char *desc, LSA_R_REMOVEPRIVS *out, prs_struct *ps, int depth)
+bool lsa_io_r_removeprivs(const char *desc, LSA_R_REMOVEPRIVS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_removeprivs");
depth++;
return True;
}
-BOOL policy_handle_is_valid(const POLICY_HND *hnd)
+bool policy_handle_is_valid(const POLICY_HND *hnd)
{
POLICY_HND zero_pol;
Reads or writes an LSA_Q_QUERY_DNSDOMINFO structure.
********************************************************************/
-BOOL lsa_io_q_query_info2(const char *desc, LSA_Q_QUERY_INFO2 *in, prs_struct *ps, int depth)
+bool lsa_io_q_query_info2(const char *desc, LSA_Q_QUERY_INFO2 *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query_info2");
depth++;
Reads or writes an LSA_R_QUERY_DNSDOMINFO structure.
********************************************************************/
-BOOL lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *out,
+bool lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *out,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query_info2");
/*******************************************************************
reads or writes a LSA_Q_ENUM_ACCT_RIGHTS structure.
********************************************************************/
-BOOL lsa_io_q_enum_acct_rights(const char *desc, LSA_Q_ENUM_ACCT_RIGHTS *in, prs_struct *ps, int depth)
+bool lsa_io_q_enum_acct_rights(const char *desc, LSA_Q_ENUM_ACCT_RIGHTS *in, prs_struct *ps, int depth)
{
if (in == NULL)
/*******************************************************************
reads or writes a LSA_R_ENUM_ACCT_RIGHTS structure.
********************************************************************/
-BOOL lsa_io_r_enum_acct_rights(const char *desc, LSA_R_ENUM_ACCT_RIGHTS *out, prs_struct *ps, int depth)
+bool lsa_io_r_enum_acct_rights(const char *desc, LSA_R_ENUM_ACCT_RIGHTS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_enum_acct_rights");
depth++;
/*******************************************************************
reads or writes a LSA_Q_ADD_ACCT_RIGHTS structure.
********************************************************************/
-BOOL lsa_io_q_add_acct_rights(const char *desc, LSA_Q_ADD_ACCT_RIGHTS *in, prs_struct *ps, int depth)
+bool lsa_io_q_add_acct_rights(const char *desc, LSA_Q_ADD_ACCT_RIGHTS *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_add_acct_rights");
depth++;
/*******************************************************************
reads or writes a LSA_R_ENUM_ACCT_RIGHTS structure.
********************************************************************/
-BOOL lsa_io_r_add_acct_rights(const char *desc, LSA_R_ADD_ACCT_RIGHTS *out, prs_struct *ps, int depth)
+bool lsa_io_r_add_acct_rights(const char *desc, LSA_R_ADD_ACCT_RIGHTS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_add_acct_rights");
depth++;
reads or writes a LSA_Q_REMOVE_ACCT_RIGHTS structure.
********************************************************************/
-BOOL lsa_io_q_remove_acct_rights(const char *desc, LSA_Q_REMOVE_ACCT_RIGHTS *in, prs_struct *ps, int depth)
+bool lsa_io_q_remove_acct_rights(const char *desc, LSA_Q_REMOVE_ACCT_RIGHTS *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_remove_acct_rights");
depth++;
/*******************************************************************
reads or writes a LSA_R_ENUM_ACCT_RIGHTS structure.
********************************************************************/
-BOOL lsa_io_r_remove_acct_rights(const char *desc, LSA_R_REMOVE_ACCT_RIGHTS *out, prs_struct *ps, int depth)
+bool lsa_io_r_remove_acct_rights(const char *desc, LSA_R_REMOVE_ACCT_RIGHTS *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_remove_acct_rights");
depth++;
********************************************************************/
#if 0 /* jerry, I think this not correct - gd */
-BOOL lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *in, prs_struct *ps, int depth)
+bool lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain");
depth++;
Reads or writes an LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
********************************************************************/
-BOOL lsa_io_q_open_trusted_domain_by_name(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME *q_o, prs_struct *ps, int depth)
+bool lsa_io_q_open_trusted_domain_by_name(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME *q_o, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain_by_name");
depth++;
Reads or writes an LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
********************************************************************/
-BOOL lsa_io_r_open_trusted_domain_by_name(const char *desc, LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME *out, prs_struct *ps, int depth)
+bool lsa_io_r_open_trusted_domain_by_name(const char *desc, LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_trusted_domain_by_name");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *q_o, prs_struct *ps, int depth)
+bool lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *q_o, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain");
depth++;
Reads or writes an LSA_R_OPEN_TRUSTED_DOMAIN structure.
********************************************************************/
-BOOL lsa_io_r_open_trusted_domain(const char *desc, LSA_R_OPEN_TRUSTED_DOMAIN *out, prs_struct *ps, int depth)
+bool lsa_io_r_open_trusted_domain(const char *desc, LSA_R_OPEN_TRUSTED_DOMAIN *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_trusted_domain");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_q_create_trusted_domain(const char *desc, LSA_Q_CREATE_TRUSTED_DOMAIN *in, prs_struct *ps, int depth)
+bool lsa_io_q_create_trusted_domain(const char *desc, LSA_Q_CREATE_TRUSTED_DOMAIN *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_create_trusted_domain");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_r_create_trusted_domain(const char *desc, LSA_R_CREATE_TRUSTED_DOMAIN *out, prs_struct *ps, int depth)
+bool lsa_io_r_create_trusted_domain(const char *desc, LSA_R_CREATE_TRUSTED_DOMAIN *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_create_trusted_domain");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_q_create_secret(const char *desc, LSA_Q_CREATE_SECRET *in, prs_struct *ps, int depth)
+bool lsa_io_q_create_secret(const char *desc, LSA_Q_CREATE_SECRET *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_create_secret");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_r_create_secret(const char *desc, LSA_R_CREATE_SECRET *out, prs_struct *ps, int depth)
+bool lsa_io_r_create_secret(const char *desc, LSA_R_CREATE_SECRET *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_create_secret");
depth++;
/*******************************************************************
********************************************************************/
-static BOOL lsa_io_data_blob( const char *desc, prs_struct *ps, int depth, LSA_DATA_BLOB *blob )
+static bool lsa_io_data_blob( const char *desc, prs_struct *ps, int depth, LSA_DATA_BLOB *blob )
{
prs_debug(ps, depth, desc, "lsa_io_data_blob");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_q_set_secret(const char *desc, LSA_Q_SET_SECRET *in, prs_struct *ps, int depth)
+bool lsa_io_q_set_secret(const char *desc, LSA_Q_SET_SECRET *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_set_secret");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_r_set_secret(const char *desc, LSA_R_SET_SECRET *out, prs_struct *ps, int depth)
+bool lsa_io_r_set_secret(const char *desc, LSA_R_SET_SECRET *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_set_secret");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_q_delete_object(const char *desc, LSA_Q_DELETE_OBJECT *in, prs_struct *ps, int depth)
+bool lsa_io_q_delete_object(const char *desc, LSA_Q_DELETE_OBJECT *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_delete_object");
depth++;
/*******************************************************************
********************************************************************/
-BOOL lsa_io_r_delete_object(const char *desc, LSA_R_DELETE_OBJECT *out, prs_struct *ps, int depth)
+bool lsa_io_r_delete_object(const char *desc, LSA_R_DELETE_OBJECT *out, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_delete_object");
depth++;
Reads or writes an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO structure.
********************************************************************/
-BOOL lsa_io_q_query_trusted_domain_info(const char *desc,
+bool lsa_io_q_query_trusted_domain_info(const char *desc,
LSA_Q_QUERY_TRUSTED_DOMAIN_INFO *q_q,
prs_struct *ps, int depth)
{
Reads or writes an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID structure.
********************************************************************/
-BOOL lsa_io_q_query_trusted_domain_info_by_sid(const char *desc,
+bool lsa_io_q_query_trusted_domain_info_by_sid(const char *desc,
LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID *q_q,
prs_struct *ps, int depth)
{
Reads or writes an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME structure.
********************************************************************/
-BOOL lsa_io_q_query_trusted_domain_info_by_name(const char *desc,
+bool lsa_io_q_query_trusted_domain_info_by_name(const char *desc,
LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME *q_q,
prs_struct *ps, int depth)
{
/*******************************************************************
********************************************************************/
-static BOOL smb_io_lsa_data_buf_hdr(const char *desc, LSA_DATA_BUF_HDR *buf_hdr,
+static bool smb_io_lsa_data_buf_hdr(const char *desc, LSA_DATA_BUF_HDR *buf_hdr,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_lsa_data_buf_hdr");
/*******************************************************************
********************************************************************/
-static BOOL smb_io_lsa_data_buf(const char *desc, LSA_DATA_BUF *buf,
+static bool smb_io_lsa_data_buf(const char *desc, LSA_DATA_BUF *buf,
prs_struct *ps, int depth, int length, int size)
{
prs_debug(ps, depth, desc, "smb_io_lsa_data_buf");
/*******************************************************************
********************************************************************/
-static BOOL lsa_io_trustdom_query_1(const char *desc, TRUSTED_DOMAIN_INFO_NAME *name,
+static bool lsa_io_trustdom_query_1(const char *desc, TRUSTED_DOMAIN_INFO_NAME *name,
prs_struct *ps, int depth)
{
if (!smb_io_lsa_string("netbios_name", &name->netbios_name, ps, depth))
/*******************************************************************
********************************************************************/
-static BOOL lsa_io_trustdom_query_3(const char *desc, TRUSTED_DOMAIN_INFO_POSIX_OFFSET *posix,
+static bool lsa_io_trustdom_query_3(const char *desc, TRUSTED_DOMAIN_INFO_POSIX_OFFSET *posix,
prs_struct *ps, int depth)
{
if(!prs_uint32("posix_offset", ps, depth, &posix->posix_offset))
/*******************************************************************
********************************************************************/
-static BOOL lsa_io_trustdom_query_4(const char *desc, TRUSTED_DOMAIN_INFO_PASSWORD *password,
+static bool lsa_io_trustdom_query_4(const char *desc, TRUSTED_DOMAIN_INFO_PASSWORD *password,
prs_struct *ps, int depth)
{
if(!prs_align(ps))
/*******************************************************************
********************************************************************/
-static BOOL lsa_io_trustdom_query_6(const char *desc, TRUSTED_DOMAIN_INFO_EX *info_ex,
+static bool lsa_io_trustdom_query_6(const char *desc, TRUSTED_DOMAIN_INFO_EX *info_ex,
prs_struct *ps, int depth)
{
uint32 dom_sid_ptr;
/*******************************************************************
********************************************************************/
-static BOOL lsa_io_trustdom_query(const char *desc, prs_struct *ps, int depth, LSA_TRUSTED_DOMAIN_INFO *info)
+static bool lsa_io_trustdom_query(const char *desc, prs_struct *ps, int depth, LSA_TRUSTED_DOMAIN_INFO *info)
{
prs_debug(ps, depth, desc, "lsa_io_trustdom_query");
depth++;
Reads or writes an LSA_R_QUERY_TRUSTED_DOMAIN_INFO structure.
********************************************************************/
-BOOL lsa_io_r_query_trusted_domain_info(const char *desc,
+bool lsa_io_r_query_trusted_domain_info(const char *desc,
LSA_R_QUERY_TRUSTED_DOMAIN_INFO *r_q,
prs_struct *ps, int depth)
{
Reads or writes an LSA_Q_QUERY_DOM_INFO_POLICY structure.
********************************************************************/
-BOOL lsa_io_q_query_dom_info(const char *desc, LSA_Q_QUERY_DOM_INFO_POLICY *in, prs_struct *ps, int depth)
+bool lsa_io_q_query_dom_info(const char *desc, LSA_Q_QUERY_DOM_INFO_POLICY *in, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query_dom_info");
depth++;
Reads or writes an LSA_R_QUERY_DOM_INFO_POLICY structure.
********************************************************************/
-static BOOL lsa_io_dominfo_query_3(const char *desc, LSA_DOM_INFO_POLICY_KERBEROS *krb_policy,
+static bool lsa_io_dominfo_query_3(const char *desc, LSA_DOM_INFO_POLICY_KERBEROS *krb_policy,
prs_struct *ps, int depth)
{
if (!prs_align_uint64(ps))
return True;
}
-static BOOL lsa_io_dom_info_query(const char *desc, prs_struct *ps, int depth, LSA_DOM_INFO_UNION *info)
+static bool lsa_io_dom_info_query(const char *desc, prs_struct *ps, int depth, LSA_DOM_INFO_UNION *info)
{
prs_debug(ps, depth, desc, "lsa_io_dom_info_query");
depth++;
}
-BOOL lsa_io_r_query_dom_info(const char *desc, LSA_R_QUERY_DOM_INFO_POLICY *out,
+bool lsa_io_r_query_dom_info(const char *desc, LSA_R_QUERY_DOM_INFO_POLICY *out,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query_dom_info");
Reads or writes a UTIME type.
********************************************************************/
-static BOOL smb_io_utime(const char *desc, UTIME *t, prs_struct *ps, int depth)
+static bool smb_io_utime(const char *desc, UTIME *t, prs_struct *ps, int depth)
{
if (t == NULL)
return False;
Reads or writes an NTTIME structure.
********************************************************************/
-BOOL smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth)
+bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth)
{
uint32 low, high;
if (nttime == NULL)
Reads or writes an NTTIME structure.
********************************************************************/
-BOOL smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime)
+bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime)
{
return smb_io_time( desc, nttime, ps, depth );
}
Reads or writes an ENUM_HND structure.
********************************************************************/
-BOOL smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth)
+bool smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth)
{
if (hnd == NULL)
return False;
Reads or writes a DOM_SID structure.
********************************************************************/
-BOOL smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth)
+bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth)
{
int i;
Reads or writes a DOM_SID2 structure.
********************************************************************/
-BOOL smb_io_dom_sid2_p(const char *desc, prs_struct *ps, int depth, DOM_SID2 **sid2)
+bool smb_io_dom_sid2_p(const char *desc, prs_struct *ps, int depth, DOM_SID2 **sid2)
{
uint32 data_p;
Reads or writes a DOM_SID2 structure.
********************************************************************/
-BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
+bool smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
{
if (sid == NULL)
return False;
Reads or writes a struct GUID
********************************************************************/
-BOOL smb_io_uuid(const char *desc, struct GUID *uuid,
+bool smb_io_uuid(const char *desc, struct GUID *uuid,
prs_struct *ps, int depth)
{
if (uuid == NULL)
Reads or writes a STRHDR structure.
********************************************************************/
-BOOL smb_io_strhdr(const char *desc, STRHDR *hdr, prs_struct *ps, int depth)
+bool smb_io_strhdr(const char *desc, STRHDR *hdr, prs_struct *ps, int depth)
{
if (hdr == NULL)
return False;
Reads or writes a UNIHDR structure.
********************************************************************/
-BOOL smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth)
+bool smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth)
{
if (hdr == NULL)
return False;
uint16 should be stored, or gets the size if reading.
********************************************************************/
-BOOL smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset)
+bool smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset)
{
(*offset) = prs_offset(ps);
if (ps->io) {
Does nothing on reading, as that is already handled by ...._pre()
********************************************************************/
-BOOL smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth,
+bool smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth,
uint32 ptr_hdrbuf, uint32 max_len, uint32 len)
{
if (!ps->io) {
Reads or writes a BUFHDR structure.
********************************************************************/
-BOOL smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth)
+bool smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth)
{
if (hdr == NULL)
return False;
XXXX NOTE: UNISTR structures NEED to be null-terminated.
********************************************************************/
-BOOL smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth)
+bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth)
{
if (uni == NULL)
return False;
reads or writes a BUFFER5 structure.
the buf_len member tells you how large the buffer is.
********************************************************************/
-BOOL smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
+bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_buffer5");
depth++;
the uni_str_len member tells you how much of the buffer is really used.
********************************************************************/
-BOOL smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2)
+bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2)
{
prs_debug(ps, depth, desc, "smb_io_regval_buffer");
the str_max_len member tells you how large the buffer is.
********************************************************************/
-BOOL smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth)
+bool smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth)
{
if (str2 == NULL)
return False;
See SPOOL_USER_1 in include/rpc_spoolss.h for an example.
********************************************************************/
-BOOL prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 **uni2)
+bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 **uni2)
{
uint32 data_p;
not UNISTR2.buffer) has been allocated previously by prs_unistr2_p()
********************************************************************/
-BOOL prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 )
+bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 )
{
/* just return true if there is no pointer to deal with.
the memory must have been previously allocated on unmarshalling
the uni_max_len member tells you how large the buffer is.
********************************************************************/
-BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth)
+bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth)
{
if (uni2 == NULL)
return False;
now read/write UNISTR4
********************************************************************/
-BOOL prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
+bool prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
{
void *ptr;
prs_debug(ps, depth, desc, "prs_unistr4");
now read/write UNISTR4 header
********************************************************************/
-BOOL prs_unistr4_hdr(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
+bool prs_unistr4_hdr(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
{
prs_debug(ps, depth, desc, "prs_unistr4_hdr");
depth++;
now read/write UNISTR4 string
********************************************************************/
-BOOL prs_unistr4_str(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
+bool prs_unistr4_str(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
{
prs_debug(ps, depth, desc, "prs_unistr4_str");
depth++;
Reads or writes a UNISTR4_ARRAY structure.
********************************************************************/
-BOOL prs_unistr4_array(const char *desc, prs_struct *ps, int depth, UNISTR4_ARRAY *array )
+bool prs_unistr4_array(const char *desc, prs_struct *ps, int depth, UNISTR4_ARRAY *array )
{
unsigned int i;
initialise a UNISTR_ARRAY from a char**
********************************************************************/
-BOOL init_unistr4_array( UNISTR4_ARRAY *array, uint32 count, const char **strings )
+bool init_unistr4_array( UNISTR4_ARRAY *array, uint32 count, const char **strings )
{
unsigned int i;
return True;
}
-BOOL smb_io_lockout_string_hdr(const char *desc, HDR_LOCKOUT_STRING *hdr_account_lockout, prs_struct *ps, int depth)
+bool smb_io_lockout_string_hdr(const char *desc, HDR_LOCKOUT_STRING *hdr_account_lockout, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_lockout_string_hdr");
depth++;
return True;
}
-BOOL smb_io_account_lockout_str(const char *desc, LOCKOUT_STRING *account_lockout, uint32 buffer, prs_struct *ps, int depth)
+bool smb_io_account_lockout_str(const char *desc, LOCKOUT_STRING *account_lockout, uint32 buffer, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_account_lockout_string");
depth++;
Reads or writes a DOM_RID structure.
********************************************************************/
-BOOL smb_io_dom_rid(const char *desc, DOM_RID *rid, prs_struct *ps, int depth)
+bool smb_io_dom_rid(const char *desc, DOM_RID *rid, prs_struct *ps, int depth)
{
if (rid == NULL)
return False;
Reads or writes a DOM_RID2 structure.
********************************************************************/
-BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid, prs_struct *ps, int depth)
+bool smb_io_dom_rid2(const char *desc, DOM_RID2 *rid, prs_struct *ps, int depth)
{
if (rid == NULL)
return False;
reads or writes a DOM_RID3 structure.
********************************************************************/
-BOOL smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth)
+bool smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth)
{
if (rid3 == NULL)
return False;
Inits or writes a DOM_CLNT_SRV structure.
********************************************************************/
-BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth)
+bool smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth)
{
if (logcln == NULL)
return False;
Reads or writes a DOM_LOG_INFO structure.
********************************************************************/
-BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *loginfo, prs_struct *ps, int depth)
+bool smb_io_log_info(const char *desc, DOM_LOG_INFO *loginfo, prs_struct *ps, int depth)
{
if (loginfo == NULL)
return False;
Reads or writes a DOM_CHAL structure.
********************************************************************/
-BOOL smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth)
+bool smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth)
{
if (chal == NULL)
return False;
Reads or writes a DOM_CRED structure.
********************************************************************/
-BOOL smb_io_cred(const char *desc, DOM_CRED *cred, prs_struct *ps, int depth)
+bool smb_io_cred(const char *desc, DOM_CRED *cred, prs_struct *ps, int depth)
{
if (cred == NULL)
return False;
Reads or writes a DOM_CLNT_INFO2 structure.
********************************************************************/
-BOOL smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth)
+bool smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth)
{
if (clnt == NULL)
return False;
Reads or writes a DOM_CLNT_INFO structure.
********************************************************************/
-BOOL smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth)
+bool smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth)
{
if (clnt == NULL)
return False;
Reads or writes a DOM_LOGON_ID structure.
********************************************************************/
-BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *logonid, prs_struct *ps, int depth)
+bool smb_io_logon_id(const char *desc, DOM_LOGON_ID *logonid, prs_struct *ps, int depth)
{
if (logonid == NULL)
return False;
Reads or writes an OWF_INFO structure.
********************************************************************/
-BOOL smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth)
+bool smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth)
{
if (hash == NULL)
return False;
Reads or writes a DOM_GID structure.
********************************************************************/
-BOOL smb_io_gid(const char *desc, DOM_GID *gid, prs_struct *ps, int depth)
+bool smb_io_gid(const char *desc, DOM_GID *gid, prs_struct *ps, int depth)
{
if (gid == NULL)
return False;
Reads or writes an POLICY_HND structure.
********************************************************************/
-BOOL smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth)
+bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth)
{
if (pol == NULL)
return False;
Reads or writes a UNISTR3 structure.
********************************************************************/
-BOOL smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth)
+bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth)
{
if (name == NULL)
return False;
/*******************************************************************
Stream a uint64_struct
********************************************************************/
-BOOL prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
{
if (UNMARSHALLING(ps)) {
uint32 high, low;
/*******************************************************************
reads or writes a BUFHDR2 structure.
********************************************************************/
-BOOL smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth)
+bool smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_bufhdr2");
depth++;
/*******************************************************************
reads or writes a BUFHDR4 structure.
********************************************************************/
-BOOL smb_io_bufhdr4(const char *desc, BUFHDR4 *hdr, prs_struct *ps, int depth)
+bool smb_io_bufhdr4(const char *desc, BUFHDR4 *hdr, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_bufhdr4");
depth++;
reads or writes a RPC_DATA_BLOB structure.
********************************************************************/
-BOOL smb_io_rpc_blob(const char *desc, RPC_DATA_BLOB *blob, prs_struct *ps, int depth)
+bool smb_io_rpc_blob(const char *desc, RPC_DATA_BLOB *blob, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_rpc_blob");
depth++;
creates a UNIHDR structure.
********************************************************************/
-BOOL make_uni_hdr(UNIHDR *hdr, int len)
+bool make_uni_hdr(UNIHDR *hdr, int len)
{
if (hdr == NULL)
{
/*******************************************************************
creates a BUFHDR2 structure.
********************************************************************/
-BOOL make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer)
+bool make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer)
{
hdr->info_level = info_level;
hdr->length = length;
Reads or writes a structure.
********************************************************************/
-static BOOL net_io_neg_flags(const char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
+static bool net_io_neg_flags(const char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
{
if (neg == NULL)
return False;
Reads or writes a NETLOGON_INFO_3 structure.
********************************************************************/
-static BOOL net_io_netinfo_3(const char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
+static bool net_io_netinfo_3(const char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
Reads or writes a NETLOGON_INFO_1 structure.
********************************************************************/
-static BOOL net_io_netinfo_1(const char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
+static bool net_io_netinfo_1(const char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
Reads or writes a NETLOGON_INFO_2 structure.
********************************************************************/
-static BOOL net_io_netinfo_2(const char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
+static bool net_io_netinfo_2(const char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
return True;
}
-static BOOL net_io_ctrl_data_info_5(const char *desc, CTRL_DATA_INFO_5 *info, prs_struct *ps, int depth)
+static bool net_io_ctrl_data_info_5(const char *desc, CTRL_DATA_INFO_5 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
return True;
}
-static BOOL net_io_ctrl_data_info_6(const char *desc, CTRL_DATA_INFO_6 *info, prs_struct *ps, int depth)
+static bool net_io_ctrl_data_info_6(const char *desc, CTRL_DATA_INFO_6 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
Reads or writes an NET_Q_LOGON_CTRL2 structure.
********************************************************************/
-BOOL net_io_q_logon_ctrl2(const char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
+bool net_io_q_logon_ctrl2(const char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
Reads or writes an NET_R_LOGON_CTRL2 structure.
********************************************************************/
-BOOL net_io_r_logon_ctrl2(const char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth)
+bool net_io_r_logon_ctrl2(const char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
Reads or writes an NET_Q_LOGON_CTRL structure.
********************************************************************/
-BOOL net_io_q_logon_ctrl(const char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps,
+bool net_io_q_logon_ctrl(const char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_q_logon_ctrl");
Reads or writes an NET_R_LOGON_CTRL structure.
********************************************************************/
-BOOL net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps,
+bool net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_r_logon_ctrl");
Reads or writes an NET_Q_GETANYDCNAME structure.
********************************************************************/
-BOOL net_io_q_getanydcname(const char *desc, NET_Q_GETANYDCNAME *r_t, prs_struct *ps,
+bool net_io_q_getanydcname(const char *desc, NET_Q_GETANYDCNAME *r_t, prs_struct *ps,
int depth)
{
if (r_t == NULL)
Reads or writes an NET_R_GETANYDCNAME structure.
********************************************************************/
-BOOL net_io_r_getanydcname(const char *desc, NET_R_GETANYDCNAME *r_t, prs_struct *ps,
+bool net_io_r_getanydcname(const char *desc, NET_R_GETANYDCNAME *r_t, prs_struct *ps,
int depth)
{
if (r_t == NULL)
Reads or writes an NET_Q_GETDCNAME structure.
********************************************************************/
-BOOL net_io_q_getdcname(const char *desc, NET_Q_GETDCNAME *r_t, prs_struct *ps,
+bool net_io_q_getdcname(const char *desc, NET_Q_GETDCNAME *r_t, prs_struct *ps,
int depth)
{
if (r_t == NULL)
Reads or writes an NET_R_GETDCNAME structure.
********************************************************************/
-BOOL net_io_r_getdcname(const char *desc, NET_R_GETDCNAME *r_t, prs_struct *ps,
+bool net_io_r_getdcname(const char *desc, NET_R_GETDCNAME *r_t, prs_struct *ps,
int depth)
{
if (r_t == NULL)
Reads or writes an NET_R_TRUST_DOM_LIST structure.
********************************************************************/
-BOOL net_io_r_trust_dom(const char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth)
+bool net_io_r_trust_dom(const char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth)
{
uint32 value;
Reads or writes an NET_Q_TRUST_DOM_LIST structure.
********************************************************************/
-BOOL net_io_q_trust_dom(const char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth)
+bool net_io_q_trust_dom(const char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
Reads or writes an NET_Q_REQ_CHAL structure.
********************************************************************/
-BOOL net_io_q_req_chal(const char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth)
+bool net_io_q_req_chal(const char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth)
{
if (q_c == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_req_chal(const char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth)
+bool net_io_r_req_chal(const char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth)
{
if (r_c == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_auth(const char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
+bool net_io_q_auth(const char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
{
if (q_a == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_auth(const char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth)
+bool net_io_r_auth(const char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth)
{
if (r_a == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_auth_2(const char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
+bool net_io_q_auth_2(const char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
{
if (q_a == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_auth_2(const char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth)
+bool net_io_r_auth_2(const char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth)
{
if (r_a == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_auth_3(const char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
+bool net_io_q_auth_3(const char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
{
if (q_a == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_auth_3(const char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth)
+bool net_io_r_auth_3(const char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth)
{
if (r_a == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_srv_pwset(const char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth)
+bool net_io_q_srv_pwset(const char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth)
{
if (q_s == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_srv_pwset(const char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth)
+bool net_io_r_srv_pwset(const char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth)
{
if (r_s == NULL)
return False;
Reads or writes an NET_ID_INFO_1 structure.
********************************************************************/
-static BOOL net_io_id_info1(const char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth)
+static bool net_io_id_info1(const char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth)
{
if (id == NULL)
return False;
Reads or writes an NET_ID_INFO_2 structure.
********************************************************************/
-static BOOL net_io_id_info2(const char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth)
+static bool net_io_id_info2(const char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth)
{
if (id == NULL)
return False;
Reads or writes a DOM_SAM_INFO structure.
********************************************************************/
-static BOOL net_io_id_info_ctr(const char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
+static bool net_io_id_info_ctr(const char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
{
NET_ID_INFO_CTR *ctr = *pp_ctr;
Reads or writes a DOM_SAM_INFO structure.
********************************************************************/
-static BOOL smb_io_sam_info(const char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth)
+static bool smb_io_sam_info(const char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth)
{
if (sam == NULL)
return False;
Reads or writes a DOM_SAM_INFO_EX structure.
********************************************************************/
-static BOOL smb_io_sam_info_ex(const char *desc, DOM_SAM_INFO_EX *sam, prs_struct *ps, int depth)
+static bool smb_io_sam_info_ex(const char *desc, DOM_SAM_INFO_EX *sam, prs_struct *ps, int depth)
{
if (sam == NULL)
return False;
Jacobsen at HP. JRA.
********************************************************************/
-BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
- int depth, uint16 validation_level, BOOL kerb_validation_level)
+bool net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
+ int depth, uint16 validation_level, bool kerb_validation_level)
{
unsigned int i;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_logon(const char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth)
+bool net_io_q_sam_logon(const char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_logon(const char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth)
+bool net_io_r_sam_logon(const char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_logon_ex(const char *desc, NET_Q_SAM_LOGON_EX *q_l, prs_struct *ps, int depth)
+bool net_io_q_sam_logon_ex(const char *desc, NET_Q_SAM_LOGON_EX *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_logon_ex(const char *desc, NET_R_SAM_LOGON_EX *r_l, prs_struct *ps, int depth)
+bool net_io_r_sam_logon_ex(const char *desc, NET_R_SAM_LOGON_EX *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_logoff(const char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth)
+bool net_io_q_sam_logoff(const char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_logoff(const char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth)
+bool net_io_r_sam_logoff(const char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
/*******************************************************************
makes a NET_Q_SAM_SYNC structure.
********************************************************************/
-BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name,
+bool init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name,
const char *cli_name, DOM_CRED *cli_creds,
DOM_CRED *ret_creds, uint32 database_id,
uint32 next_rid)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_sync(const char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps,
+bool net_io_q_sam_sync(const char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_q_sam_sync");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_hdr(const char *desc, SAM_DELTA_HDR * delta,
+static bool net_io_sam_delta_hdr(const char *desc, SAM_DELTA_HDR * delta,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_delta_hdr");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_mod_count(const char *desc, SAM_DELTA_MOD_COUNT *info,
+static bool net_io_sam_delta_mod_count(const char *desc, SAM_DELTA_MOD_COUNT *info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_delta_stamp");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info,
+static bool net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_domain_info");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_group_info(const char *desc, SAM_GROUP_INFO * info,
+static bool net_io_sam_group_info(const char *desc, SAM_GROUP_INFO * info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_group_info");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_passwd_info(const char *desc, SAM_PWD * pwd,
+static bool net_io_sam_passwd_info(const char *desc, SAM_PWD * pwd,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_passwd_info");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_account_info(const char *desc, SAM_ACCOUNT_INFO *info,
+static bool net_io_sam_account_info(const char *desc, SAM_ACCOUNT_INFO *info,
prs_struct *ps, int depth)
{
BUFHDR2 hdr_priv_data;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_group_mem_info(const char *desc, SAM_GROUP_MEM_INFO * info,
+static bool net_io_sam_group_mem_info(const char *desc, SAM_GROUP_MEM_INFO * info,
prs_struct *ps, int depth)
{
uint32 i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_alias_info(const char *desc, SAM_ALIAS_INFO * info,
+static bool net_io_sam_alias_info(const char *desc, SAM_ALIAS_INFO * info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_alias_info");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_alias_mem_info(const char *desc, SAM_ALIAS_MEM_INFO * info,
+static bool net_io_sam_alias_mem_info(const char *desc, SAM_ALIAS_MEM_INFO * info,
prs_struct *ps, int depth)
{
uint32 i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info,
+static bool net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info,
prs_struct *ps, int depth)
{
unsigned int i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_trustdoms_info(const char *desc, SAM_DELTA_TRUSTDOMS *info,
+static bool net_io_sam_trustdoms_info(const char *desc, SAM_DELTA_TRUSTDOMS *info,
prs_struct *ps, int depth)
{
int i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_secret_info(const char *desc, SAM_DELTA_SECRET *info,
+static bool net_io_sam_secret_info(const char *desc, SAM_DELTA_SECRET *info,
prs_struct *ps, int depth)
{
int i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_privs_info(const char *desc, SAM_DELTA_PRIVS *info,
+static bool net_io_sam_privs_info(const char *desc, SAM_DELTA_PRIVS *info,
prs_struct *ps, int depth)
{
unsigned int i;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_ctr(const char *desc,
+static bool net_io_sam_delta_ctr(const char *desc,
SAM_DELTA_CTR * delta, uint16 type,
prs_struct *ps, int depth)
{
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_sync(const char *desc,
+bool net_io_r_sam_sync(const char *desc,
NET_R_SAM_SYNC * r_s, prs_struct *ps, int depth)
{
uint32 i;
/*******************************************************************
makes a NET_Q_SAM_DELTAS structure.
********************************************************************/
-BOOL init_net_q_sam_deltas(NET_Q_SAM_DELTAS *q_s, const char *srv_name,
+bool init_net_q_sam_deltas(NET_Q_SAM_DELTAS *q_s, const char *srv_name,
const char *cli_name, DOM_CRED *cli_creds,
uint32 database_id, uint64 dom_mod_count)
{
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_deltas(const char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps,
+bool net_io_q_sam_deltas(const char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_q_sam_deltas");
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_deltas(const char *desc,
+bool net_io_r_sam_deltas(const char *desc,
NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth)
{
unsigned int i;
Reads or writes an NET_Q_DSR_GETDCNAME structure.
********************************************************************/
-BOOL net_io_q_dsr_getdcname(const char *desc, NET_Q_DSR_GETDCNAME *r_t,
+bool net_io_q_dsr_getdcname(const char *desc, NET_Q_DSR_GETDCNAME *r_t,
prs_struct *ps, int depth)
{
if (r_t == NULL)
Reads or writes an NET_Q_DSR_GETDCNAMEEX structure.
********************************************************************/
-BOOL net_io_q_dsr_getdcnameex(const char *desc, NET_Q_DSR_GETDCNAMEEX *r_t,
+bool net_io_q_dsr_getdcnameex(const char *desc, NET_Q_DSR_GETDCNAMEEX *r_t,
prs_struct *ps, int depth)
{
if (r_t == NULL)
Reads or writes an NET_Q_DSR_GETDCNAMEEX2 structure.
********************************************************************/
-BOOL net_io_q_dsr_getdcnameex2(const char *desc, NET_Q_DSR_GETDCNAMEEX2 *r_t,
+bool net_io_q_dsr_getdcnameex2(const char *desc, NET_Q_DSR_GETDCNAMEEX2 *r_t,
prs_struct *ps, int depth)
{
if (r_t == NULL)
Reads or writes an NET_R_DSR_GETDCNAME structure.
********************************************************************/
-BOOL net_io_r_dsr_getdcname(const char *desc, NET_R_DSR_GETDCNAME *r_t,
+bool net_io_r_dsr_getdcname(const char *desc, NET_R_DSR_GETDCNAME *r_t,
prs_struct *ps, int depth)
{
uint32 info_ptr = 1;
Reads or writes an NET_Q_DSR_GETSITENAME structure.
********************************************************************/
-BOOL net_io_q_dsr_getsitename(const char *desc, NET_Q_DSR_GETSITENAME *r_t,
+bool net_io_q_dsr_getsitename(const char *desc, NET_Q_DSR_GETSITENAME *r_t,
prs_struct *ps, int depth)
{
if (r_t == NULL)
Reads or writes an NET_R_DSR_GETSITENAME structure.
********************************************************************/
-BOOL net_io_r_dsr_getsitename(const char *desc, NET_R_DSR_GETSITENAME *r_t,
+bool net_io_r_dsr_getsitename(const char *desc, NET_R_DSR_GETSITENAME *r_t,
prs_struct *ps, int depth)
{
if (r_t == NULL)
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_get_version(const char *desc, NTSVCS_Q_GET_VERSION *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_get_version(const char *desc, NTSVCS_Q_GET_VERSION *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_get_version(const char *desc, NTSVCS_R_GET_VERSION *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_get_version(const char *desc, NTSVCS_R_GET_VERSION *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_get_device_list_size(const char *desc, NTSVCS_Q_GET_DEVICE_LIST_SIZE *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_get_device_list_size(const char *desc, NTSVCS_Q_GET_DEVICE_LIST_SIZE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_get_device_list_size(const char *desc, NTSVCS_R_GET_DEVICE_LIST_SIZE *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_get_device_list_size(const char *desc, NTSVCS_R_GET_DEVICE_LIST_SIZE *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_validate_device_instance(const char *desc, NTSVCS_Q_VALIDATE_DEVICE_INSTANCE *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_validate_device_instance(const char *desc, NTSVCS_Q_VALIDATE_DEVICE_INSTANCE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_validate_device_instance(const char *desc, NTSVCS_R_VALIDATE_DEVICE_INSTANCE *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_validate_device_instance(const char *desc, NTSVCS_R_VALIDATE_DEVICE_INSTANCE *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_get_hw_profile_info(const char *desc, NTSVCS_Q_GET_HW_PROFILE_INFO *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_get_hw_profile_info(const char *desc, NTSVCS_Q_GET_HW_PROFILE_INFO *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_get_hw_profile_info(const char *desc, NTSVCS_R_GET_HW_PROFILE_INFO *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_get_hw_profile_info(const char *desc, NTSVCS_R_GET_HW_PROFILE_INFO *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_q_hw_profile_flags(const char *desc, NTSVCS_Q_HW_PROFILE_FLAGS *q_u, prs_struct *ps, int depth)
+bool ntsvcs_io_q_hw_profile_flags(const char *desc, NTSVCS_Q_HW_PROFILE_FLAGS *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL ntsvcs_io_r_hw_profile_flags(const char *desc, NTSVCS_R_HW_PROFILE_FLAGS *r_u, prs_struct *ps, int depth)
+bool ntsvcs_io_r_hw_profile_flags(const char *desc, NTSVCS_R_HW_PROFILE_FLAGS *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
* @return False if allocation fails, otherwise True.
**/
-BOOL prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, BOOL io)
+bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io)
{
ZERO_STRUCTP(ps);
ps->io = io;
Hand some already allocated memory to a prs_struct.
********************************************************************/
-void prs_give_memory(prs_struct *ps, char *buf, uint32 size, BOOL is_dynamic)
+void prs_give_memory(prs_struct *ps, char *buf, uint32 size, bool is_dynamic)
{
ps->is_dynamic = is_dynamic;
ps->data_p = buf;
Set a prs_struct to exactly a given size. Will grow or tuncate if neccessary.
********************************************************************/
-BOOL prs_set_buffer_size(prs_struct *ps, uint32 newsize)
+bool prs_set_buffer_size(prs_struct *ps, uint32 newsize)
{
if (newsize > ps->buffer_size)
return prs_force_grow(ps, newsize - ps->buffer_size);
Also depends on the data stream mode (io).
********************************************************************/
-BOOL prs_grow(prs_struct *ps, uint32 extra_space)
+bool prs_grow(prs_struct *ps, uint32 extra_space)
{
uint32 new_size;
when reading an rpc reply, before unmarshalling it.
********************************************************************/
-BOOL prs_force_grow(prs_struct *ps, uint32 extra_space)
+bool prs_force_grow(prs_struct *ps, uint32 extra_space)
{
uint32 new_size = ps->buffer_size + extra_space;
Set the current offset (external interface).
********************************************************************/
-BOOL prs_set_offset(prs_struct *ps, uint32 offset)
+bool prs_set_offset(prs_struct *ps, uint32 offset)
{
if(offset <= ps->data_offset) {
ps->data_offset = offset;
Append the data from one parse_struct into another.
********************************************************************/
-BOOL prs_append_prs_data(prs_struct *dst, prs_struct *src)
+bool prs_append_prs_data(prs_struct *dst, prs_struct *src)
{
if (prs_offset(src) == 0)
return True;
Append some data from one parse_struct into another.
********************************************************************/
-BOOL prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len)
+bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len)
{
if (len == 0)
return True;
Append the data from a buffer into a parse_struct.
********************************************************************/
-BOOL prs_copy_data_in(prs_struct *dst, const char *src, uint32 len)
+bool prs_copy_data_in(prs_struct *dst, const char *src, uint32 len)
{
if (len == 0)
return True;
Copy some data from a parse_struct into a buffer.
********************************************************************/
-BOOL prs_copy_data_out(char *dst, prs_struct *src, uint32 len)
+bool prs_copy_data_out(char *dst, prs_struct *src, uint32 len)
{
if (len == 0)
return True;
Copy all the data from a parse_struct into a buffer.
********************************************************************/
-BOOL prs_copy_all_data_out(char *dst, prs_struct *src)
+bool prs_copy_all_data_out(char *dst, prs_struct *src)
{
uint32 len = prs_offset(src);
Set the data as X-endian (external interface).
********************************************************************/
-void prs_set_endian_data(prs_struct *ps, BOOL endian)
+void prs_set_endian_data(prs_struct *ps, bool endian)
{
ps->bigendian_data = endian;
}
zeros.
********************************************************************/
-BOOL prs_align(prs_struct *ps)
+bool prs_align(prs_struct *ps)
{
uint32 mod = ps->data_offset & (ps->align-1);
Align on a 2 byte boundary
*****************************************************************/
-BOOL prs_align_uint16(prs_struct *ps)
+bool prs_align_uint16(prs_struct *ps)
{
- BOOL ret;
+ bool ret;
uint8 old_align = ps->align;
ps->align = 2;
Align on a 8 byte boundary
*****************************************************************/
-BOOL prs_align_uint64(prs_struct *ps)
+bool prs_align_uint64(prs_struct *ps)
{
- BOOL ret;
+ bool ret;
uint8 old_align = ps->align;
ps->align = 8;
Align on a specific byte boundary
*****************************************************************/
-BOOL prs_align_custom(prs_struct *ps, uint8 boundary)
+bool prs_align_custom(prs_struct *ps, uint8 boundary)
{
- BOOL ret;
+ bool ret;
uint8 old_align = ps->align;
ps->align = boundary;
Align only if required (for the unistr2 string mainly)
********************************************************************/
-BOOL prs_align_needed(prs_struct *ps, uint32 needed)
+bool prs_align_needed(prs_struct *ps, uint32 needed)
{
if (needed==0)
return True;
Change the struct type.
********************************************************************/
-void prs_switch_type(prs_struct *ps, BOOL io)
+void prs_switch_type(prs_struct *ps, bool io)
{
if ((ps->io ^ io) == True)
ps->io=io;
Stream a uint8.
********************************************************************/
-BOOL prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8)
+bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8)
{
char *q = prs_mem_get(ps, 1);
if (q == NULL)
Stream a uint16* (allocate memory if unmarshalling)
********************************************************************/
-BOOL prs_pointer( const char *name, prs_struct *ps, int depth,
+bool prs_pointer( const char *name, prs_struct *ps, int depth,
void *dta, size_t data_size,
- BOOL(*prs_fn)(const char*, prs_struct*, int, void*) )
+ bool (*prs_fn)(const char*, prs_struct*, int, void*) )
{
void ** data = (void **)dta;
uint32 data_p;
Stream a uint16.
********************************************************************/
-BOOL prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16)
+bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16)
{
char *q = prs_mem_get(ps, sizeof(uint16));
if (q == NULL)
Stream a uint32.
********************************************************************/
-BOOL prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32)
+bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
Stream an int32.
********************************************************************/
-BOOL prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32)
+bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32)
{
char *q = prs_mem_get(ps, sizeof(int32));
if (q == NULL)
Stream a NTSTATUS
********************************************************************/
-BOOL prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status)
+bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
Stream a DCE error code
********************************************************************/
-BOOL prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status)
+bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
Stream a WERROR
********************************************************************/
-BOOL prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status)
+bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
Stream an array of uint8s. Length is number of uint8s.
********************************************************************/
-BOOL prs_uint8s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len)
+bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len)
{
int i;
char *q = prs_mem_get(ps, len);
Stream an array of uint16s. Length is number of uint16s.
********************************************************************/
-BOOL prs_uint16s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
+bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
{
int i;
char *q = prs_mem_get(ps, len * sizeof(uint16));
output must be little-endian, if marshalling, input must be little-endian.
********************************************************************/
-static void dbg_rw_punival(BOOL charmode, const char *name, int depth, prs_struct *ps,
+static void dbg_rw_punival(bool charmode, const char *name, int depth, prs_struct *ps,
char *in_buf, char *out_buf, int len)
{
int i;
Stream a unistr. Always little endian.
********************************************************************/
-BOOL prs_uint16uni(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
+bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
{
char *q = prs_mem_get(ps, len * sizeof(uint16));
if (q == NULL)
Stream an array of uint32s. Length is number of uint32s.
********************************************************************/
-BOOL prs_uint32s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len)
+bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len)
{
int i;
char *q = prs_mem_get(ps, len * sizeof(uint32));
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
-BOOL prs_buffer5(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str)
+bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str)
{
char *p;
char *q = prs_mem_get(ps, str->buf_len * sizeof(uint16));
in byte chars. String is in little-endian format.
********************************************************************/
-BOOL prs_regval_buffer(BOOL charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf)
+bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf)
{
char *p;
char *q = prs_mem_get(ps, buf->buf_len);
in uint8 chars.
********************************************************************/
-BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str)
+bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STRING2 *str)
{
unsigned int i;
char *q = prs_mem_get(ps, str->str_str_len);
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
-BOOL prs_unistr2(BOOL charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str)
+bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str)
{
char *p;
char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16));
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
-BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth)
+bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth)
{
char *p;
char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16));
in little-endian format then do it as a stream of bytes.
********************************************************************/
-BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str)
+bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str)
{
unsigned int len = 0;
unsigned char *p = (unsigned char *)str->buffer;
not include the null-termination character.
********************************************************************/
-BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size)
+bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size)
{
char *q;
int i;
return True;
}
-BOOL prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str)
+bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str)
{
size_t len;
char *tmp_str;
uint16 should be stored, or gets the size if reading.
********************************************************************/
-BOOL prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset)
+bool prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset)
{
*offset = ps->data_offset;
if (UNMARSHALLING(ps)) {
does nothing on reading, as that is already handled by ...._pre()
********************************************************************/
-BOOL prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16,
+bool prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16,
uint32 ptr_uint16, uint32 start_offset)
{
if (MARSHALLING(ps)) {
uint32 should be stored, or gets the size if reading.
********************************************************************/
-BOOL prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset)
+bool prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset)
{
*offset = ps->data_offset;
if (UNMARSHALLING(ps) && (data32 != NULL)) {
does nothing on reading, as that is already handled by ...._pre()
********************************************************************/
-BOOL prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32,
+bool prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32,
uint32 ptr_uint32, uint32 data_size)
{
if (MARSHALLING(ps)) {
hash a stream.
********************************************************************/
-BOOL prs_hash1(prs_struct *ps, uint32 offset, int len)
+bool prs_hash1(prs_struct *ps, uint32 offset, int len)
{
char *q;
creates an RPC_AUTH_SCHANNEL_CHK structure.
********************************************************************/
-static BOOL init_rpc_auth_schannel_chk(RPC_AUTH_SCHANNEL_CHK * chk,
+static bool init_rpc_auth_schannel_chk(RPC_AUTH_SCHANNEL_CHK * chk,
const uchar sig[8],
const uchar packet_digest[8],
const uchar seq_num[8], const uchar confounder[8])
as well as decode sealed messages
********************************************************************/
-BOOL schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
+bool schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
enum schannel_direction direction,
RPC_AUTH_SCHANNEL_CHK * verf, char *data, size_t data_len)
{
/*******************************************************************
creates a new prs_struct containing a DATA_BLOB
********************************************************************/
-BOOL prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
+bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
if (!prs_init( prs, RPC_MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL ))
return False;
/*******************************************************************
return the contents of a prs_struct in a DATA_BLOB
********************************************************************/
-BOOL prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
+bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
blob->length = prs_data_size(prs);
blob->data = (uint8 *)TALLOC_ZERO_SIZE(mem_ctx, blob->length);
Reads or writes an RPC_HDR structure.
********************************************************************/
-BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
Reads or writes an RPC_IFACE structure.
********************************************************************/
-static BOOL smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
+static bool smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
{
if (ifc == NULL)
return False;
Reads or writes an RPC_ADDR_STR structure.
********************************************************************/
-static BOOL smb_io_rpc_addr_str(const char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
+static bool smb_io_rpc_addr_str(const char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
{
if (str == NULL)
return False;
Reads or writes an RPC_HDR_BBA structure.
********************************************************************/
-static BOOL smb_io_rpc_hdr_bba(const char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
+static bool smb_io_rpc_hdr_bba(const char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
Reads or writes an RPC_CONTEXT structure.
********************************************************************/
-BOOL smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps, int depth)
+bool smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps, int depth)
{
int i;
Reads or writes an RPC_HDR_RB structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth)
{
int i;
lkclXXXX only one reason at the moment!
********************************************************************/
-static BOOL smb_io_rpc_results(const char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
+static bool smb_io_rpc_results(const char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
{
if (res == NULL)
return False;
Reads or writes an RPC_HDR_BA structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
Reads or writes an RPC_HDR_REQ structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
Reads or writes an RPC_HDR_RESP structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
Reads or writes an RPC_HDR_FAULT structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
Reads or writes an RPC_HDR_AUTH structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth)
+bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth)
{
if (rai == NULL)
return False;
Checks an RPC_AUTH_VERIFIER structure.
********************************************************************/
-BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
+bool rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
const char *signature, uint32 msg_type)
{
return (strequal(rav->signature, signature) && rav->msg_type == msg_type);
Reads or writes an RPC_AUTH_VERIFIER structure.
********************************************************************/
-BOOL smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth)
+bool smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth)
{
if (rav == NULL)
return False;
This parses an RPC_AUTH_VERIFIER for schannel. I think
********************************************************************/
-BOOL smb_io_rpc_schannel_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth)
+bool smb_io_rpc_schannel_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth)
{
if (rav == NULL)
return False;
Reads or writes an RPC_AUTH_SCHANNEL_NEG structure.
********************************************************************/
-BOOL smb_io_rpc_auth_schannel_neg(const char *desc, RPC_AUTH_SCHANNEL_NEG *neg,
+bool smb_io_rpc_auth_schannel_neg(const char *desc, RPC_AUTH_SCHANNEL_NEG *neg,
prs_struct *ps, int depth)
{
if (neg == NULL)
reads or writes an RPC_AUTH_SCHANNEL_CHK structure.
********************************************************************/
-BOOL smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len,
+bool smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len,
RPC_AUTH_SCHANNEL_CHK * chk,
prs_struct *ps, int depth)
{
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_close_hnd(const char *desc, SAMR_Q_CLOSE_HND * q_u,
+bool samr_io_q_close_hnd(const char *desc, SAMR_Q_CLOSE_HND * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_close_hnd(const char *desc, SAMR_R_CLOSE_HND * r_u,
+bool samr_io_r_close_hnd(const char *desc, SAMR_R_CLOSE_HND * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_lookup_domain(const char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u,
+bool samr_io_q_lookup_domain(const char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_lookup_domain(const char *desc, SAMR_R_LOOKUP_DOMAIN * r_u,
+bool samr_io_r_lookup_domain(const char *desc, SAMR_R_LOOKUP_DOMAIN * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_remove_sid_foreign_domain(const char *desc, SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN * q_u,
+bool samr_io_q_remove_sid_foreign_domain(const char *desc, SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_remove_sid_foreign_domain(const char *desc, SAMR_R_REMOVE_SID_FOREIGN_DOMAIN * r_u,
+bool samr_io_r_remove_sid_foreign_domain(const char *desc, SAMR_R_REMOVE_SID_FOREIGN_DOMAIN * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_domain(const char *desc, SAMR_Q_OPEN_DOMAIN * q_u,
+bool samr_io_q_open_domain(const char *desc, SAMR_Q_OPEN_DOMAIN * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_domain(const char *desc, SAMR_R_OPEN_DOMAIN * r_u,
+bool samr_io_r_open_domain(const char *desc, SAMR_R_OPEN_DOMAIN * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_get_usrdom_pwinfo(const char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u,
+bool samr_io_q_get_usrdom_pwinfo(const char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_get_usrdom_pwinfo(const char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u,
+bool samr_io_r_get_usrdom_pwinfo(const char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_sec_obj(const char *desc, SAMR_Q_SET_SEC_OBJ * q_u,
+bool samr_io_q_set_sec_obj(const char *desc, SAMR_Q_SET_SEC_OBJ * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_sec_obj(const char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u,
+bool samr_io_q_query_sec_obj(const char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_domain_info(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u,
+bool samr_io_q_query_domain_info(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info1(const char *desc, SAM_UNK_INFO_1 * u_1,
+static bool sam_io_unk_info1(const char *desc, SAM_UNK_INFO_1 * u_1,
prs_struct *ps, int depth)
{
if (u_1 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info2(const char *desc, SAM_UNK_INFO_2 * u_2,
+static bool sam_io_unk_info2(const char *desc, SAM_UNK_INFO_2 * u_2,
prs_struct *ps, int depth)
{
if (u_2 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info3(const char *desc, SAM_UNK_INFO_3 * u_3,
+static bool sam_io_unk_info3(const char *desc, SAM_UNK_INFO_3 * u_3,
prs_struct *ps, int depth)
{
if (u_3 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info4(const char *desc, SAM_UNK_INFO_4 * u_4,
+static bool sam_io_unk_info4(const char *desc, SAM_UNK_INFO_4 * u_4,
prs_struct *ps, int depth)
{
if (u_4 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info5(const char *desc, SAM_UNK_INFO_5 * u_5,
+static bool sam_io_unk_info5(const char *desc, SAM_UNK_INFO_5 * u_5,
prs_struct *ps, int depth)
{
if (u_5 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info6(const char *desc, SAM_UNK_INFO_6 * u_6,
+static bool sam_io_unk_info6(const char *desc, SAM_UNK_INFO_6 * u_6,
prs_struct *ps, int depth)
{
if (u_6 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info7(const char *desc, SAM_UNK_INFO_7 * u_7,
+static bool sam_io_unk_info7(const char *desc, SAM_UNK_INFO_7 * u_7,
prs_struct *ps, int depth)
{
if (u_7 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info8(const char *desc, SAM_UNK_INFO_8 * u_8,
+static bool sam_io_unk_info8(const char *desc, SAM_UNK_INFO_8 * u_8,
prs_struct *ps, int depth)
{
if (u_8 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info9(const char *desc, SAM_UNK_INFO_9 * u_9,
+static bool sam_io_unk_info9(const char *desc, SAM_UNK_INFO_9 * u_9,
prs_struct *ps, int depth)
{
if (u_9 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info12(const char *desc, SAM_UNK_INFO_12 * u_12,
+static bool sam_io_unk_info12(const char *desc, SAM_UNK_INFO_12 * u_12,
prs_struct *ps, int depth)
{
if (u_12 == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info13(const char *desc, SAM_UNK_INFO_13 * u_13,
+static bool sam_io_unk_info13(const char *desc, SAM_UNK_INFO_13 * u_13,
prs_struct *ps, int depth)
{
if (u_13 == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_domain_info(const char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u,
+bool samr_io_r_query_domain_info(const char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a SAMR_R_SET_SEC_OBJ structure.
********************************************************************/
-BOOL samr_io_r_set_sec_obj(const char *desc, SAMR_R_SET_SEC_OBJ * r_u,
+bool samr_io_r_set_sec_obj(const char *desc, SAMR_R_SET_SEC_OBJ * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a SAMR_R_QUERY_SEC_OBJ structure.
********************************************************************/
-BOOL samr_io_r_query_sec_obj(const char *desc, SAMR_R_QUERY_SEC_OBJ * r_u,
+bool samr_io_r_query_sec_obj(const char *desc, SAMR_R_QUERY_SEC_OBJ * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a SAM_STR1 structure.
********************************************************************/
-static BOOL sam_io_sam_str1(const char *desc, SAM_STR1 * sam, uint32 acct_buf,
+static bool sam_io_sam_str1(const char *desc, SAM_STR1 * sam, uint32 acct_buf,
uint32 name_buf, uint32 desc_buf,
prs_struct *ps, int depth)
{
reads or writes a SAM_ENTRY1 structure.
********************************************************************/
-static BOOL sam_io_sam_entry1(const char *desc, SAM_ENTRY1 * sam,
+static bool sam_io_sam_entry1(const char *desc, SAM_ENTRY1 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_STR2 structure.
********************************************************************/
-static BOOL sam_io_sam_str2(const char *desc, SAM_STR2 * sam, uint32 acct_buf,
+static bool sam_io_sam_str2(const char *desc, SAM_STR2 * sam, uint32 acct_buf,
uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_ENTRY2 structure.
********************************************************************/
-static BOOL sam_io_sam_entry2(const char *desc, SAM_ENTRY2 * sam,
+static bool sam_io_sam_entry2(const char *desc, SAM_ENTRY2 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_STR3 structure.
********************************************************************/
-static BOOL sam_io_sam_str3(const char *desc, SAM_STR3 * sam, uint32 acct_buf,
+static bool sam_io_sam_str3(const char *desc, SAM_STR3 * sam, uint32 acct_buf,
uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_ENTRY3 structure.
********************************************************************/
-static BOOL sam_io_sam_entry3(const char *desc, SAM_ENTRY3 * sam,
+static bool sam_io_sam_entry3(const char *desc, SAM_ENTRY3 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_ENTRY4 structure.
********************************************************************/
-static BOOL sam_io_sam_entry4(const char *desc, SAM_ENTRY4 * sam,
+static bool sam_io_sam_entry4(const char *desc, SAM_ENTRY4 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_ENTRY5 structure.
********************************************************************/
-static BOOL sam_io_sam_entry5(const char *desc, SAM_ENTRY5 * sam,
+static bool sam_io_sam_entry5(const char *desc, SAM_ENTRY5 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a SAM_ENTRY structure.
********************************************************************/
-static BOOL sam_io_sam_entry(const char *desc, SAM_ENTRY * sam,
+static bool sam_io_sam_entry(const char *desc, SAM_ENTRY * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_dom_users(const char *desc, SAMR_Q_ENUM_DOM_USERS * q_e,
+bool samr_io_q_enum_dom_users(const char *desc, SAMR_Q_ENUM_DOM_USERS * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_dom_users(const char *desc, SAMR_R_ENUM_DOM_USERS * r_u,
+bool samr_io_r_enum_dom_users(const char *desc, SAMR_R_ENUM_DOM_USERS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_dispinfo(const char *desc, SAMR_Q_QUERY_DISPINFO * q_e,
+bool samr_io_q_query_dispinfo(const char *desc, SAMR_Q_QUERY_DISPINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_1(const char *desc, SAM_DISPINFO_1 * sam,
+static bool sam_io_sam_dispinfo_1(const char *desc, SAM_DISPINFO_1 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_2(const char *desc, SAM_DISPINFO_2 * sam,
+static bool sam_io_sam_dispinfo_2(const char *desc, SAM_DISPINFO_2 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_3(const char *desc, SAM_DISPINFO_3 * sam,
+static bool sam_io_sam_dispinfo_3(const char *desc, SAM_DISPINFO_3 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_4(const char *desc, SAM_DISPINFO_4 * sam,
+static bool sam_io_sam_dispinfo_4(const char *desc, SAM_DISPINFO_4 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_5(const char *desc, SAM_DISPINFO_5 * sam,
+static bool sam_io_sam_dispinfo_5(const char *desc, SAM_DISPINFO_5 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_dispinfo(const char *desc, SAMR_R_QUERY_DISPINFO * r_u,
+bool samr_io_r_query_dispinfo(const char *desc, SAMR_R_QUERY_DISPINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_group(const char *desc, SAMR_Q_OPEN_GROUP * q_u,
+bool samr_io_q_open_group(const char *desc, SAMR_Q_OPEN_GROUP * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_group(const char *desc, SAMR_R_OPEN_GROUP * r_u,
+bool samr_io_r_open_group(const char *desc, SAMR_R_OPEN_GROUP * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
+bool samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
prs_struct *ps, int depth)
{
uint16 dummy = 1;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info2(const char *desc, GROUP_INFO2 *gr2, prs_struct *ps, int depth)
+bool samr_io_group_info2(const char *desc, GROUP_INFO2 *gr2, prs_struct *ps, int depth)
{
if (gr2 == NULL)
return False;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth)
+bool samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth)
{
if (gr3 == NULL)
return False;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info4(const char *desc, GROUP_INFO4 * gr4,
+bool samr_io_group_info4(const char *desc, GROUP_INFO4 * gr4,
prs_struct *ps, int depth)
{
if (gr4 == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info5(const char *desc, GROUP_INFO5 * gr5,
+bool samr_io_group_info5(const char *desc, GROUP_INFO5 * gr5,
prs_struct *ps, int depth)
{
uint16 dummy = 1;
reads or writes a structure.
********************************************************************/
-static BOOL samr_group_info_ctr(const char *desc, GROUP_INFO_CTR **ctr,
+static bool samr_group_info_ctr(const char *desc, GROUP_INFO_CTR **ctr,
prs_struct *ps, int depth)
{
if (UNMARSHALLING(ps))
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_create_dom_group(const char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e,
+bool samr_io_q_create_dom_group(const char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_create_dom_group(const char *desc, SAMR_R_CREATE_DOM_GROUP * r_u,
+bool samr_io_r_create_dom_group(const char *desc, SAMR_R_CREATE_DOM_GROUP * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_dom_group(const char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u,
+bool samr_io_q_delete_dom_group(const char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_dom_group(const char *desc, SAMR_R_DELETE_DOM_GROUP * r_u,
+bool samr_io_r_delete_dom_group(const char *desc, SAMR_R_DELETE_DOM_GROUP * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_del_groupmem(const char *desc, SAMR_Q_DEL_GROUPMEM * q_e,
+bool samr_io_q_del_groupmem(const char *desc, SAMR_Q_DEL_GROUPMEM * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_del_groupmem(const char *desc, SAMR_R_DEL_GROUPMEM * r_u,
+bool samr_io_r_del_groupmem(const char *desc, SAMR_R_DEL_GROUPMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_add_groupmem(const char *desc, SAMR_Q_ADD_GROUPMEM * q_e,
+bool samr_io_q_add_groupmem(const char *desc, SAMR_Q_ADD_GROUPMEM * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_add_groupmem(const char *desc, SAMR_R_ADD_GROUPMEM * r_u,
+bool samr_io_r_add_groupmem(const char *desc, SAMR_R_ADD_GROUPMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_groupinfo(const char *desc, SAMR_Q_SET_GROUPINFO * q_e,
+bool samr_io_q_set_groupinfo(const char *desc, SAMR_Q_SET_GROUPINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_groupinfo(const char *desc, SAMR_R_SET_GROUPINFO * r_u,
+bool samr_io_r_set_groupinfo(const char *desc, SAMR_R_SET_GROUPINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_groupinfo(const char *desc, SAMR_Q_QUERY_GROUPINFO * q_e,
+bool samr_io_q_query_groupinfo(const char *desc, SAMR_Q_QUERY_GROUPINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
+bool samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_groupmem(const char *desc, SAMR_Q_QUERY_GROUPMEM * q_u,
+bool samr_io_q_query_groupmem(const char *desc, SAMR_Q_QUERY_GROUPMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_groupmem(const char *desc, SAMR_R_QUERY_GROUPMEM * r_u,
+bool samr_io_r_query_groupmem(const char *desc, SAMR_R_QUERY_GROUPMEM * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_usergroups(const char *desc, SAMR_Q_QUERY_USERGROUPS * q_u,
+bool samr_io_q_query_usergroups(const char *desc, SAMR_Q_QUERY_USERGROUPS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_gids(const char *desc, uint32 *num_gids, DOM_GID ** gid,
+bool samr_io_gids(const char *desc, uint32 *num_gids, DOM_GID ** gid,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_usergroups(const char *desc, SAMR_R_QUERY_USERGROUPS * r_u,
+bool samr_io_r_query_usergroups(const char *desc, SAMR_R_QUERY_USERGROUPS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_domains(const char *desc, SAMR_Q_ENUM_DOMAINS * q_e,
+bool samr_io_q_enum_domains(const char *desc, SAMR_Q_ENUM_DOMAINS * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_domains(const char *desc, SAMR_R_ENUM_DOMAINS * r_u,
+bool samr_io_r_enum_domains(const char *desc, SAMR_R_ENUM_DOMAINS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_dom_groups(const char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e,
+bool samr_io_q_enum_dom_groups(const char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_dom_groups(const char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u,
+bool samr_io_r_enum_dom_groups(const char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_dom_aliases(const char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e,
+bool samr_io_q_enum_dom_aliases(const char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_dom_aliases(const char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u,
+bool samr_io_r_enum_dom_aliases(const char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_alias_info1(const char *desc, ALIAS_INFO1 * al1,
+bool samr_io_alias_info1(const char *desc, ALIAS_INFO1 * al1,
prs_struct *ps, int depth)
{
if (al1 == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_alias_info3(const char *desc, ALIAS_INFO3 *al3,
+bool samr_io_alias_info3(const char *desc, ALIAS_INFO3 *al3,
prs_struct *ps, int depth)
{
if (al3 == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_alias_info2(const char *desc, ALIAS_INFO2 *al2,
+bool samr_io_alias_info2(const char *desc, ALIAS_INFO2 *al2,
prs_struct *ps, int depth)
{
if (al2 == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_alias_info_ctr(const char *desc, prs_struct *ps, int depth, ALIAS_INFO_CTR * ctr)
+bool samr_alias_info_ctr(const char *desc, prs_struct *ps, int depth, ALIAS_INFO_CTR * ctr)
{
if ( !ctr )
return False;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_aliasinfo(const char *desc, SAMR_Q_QUERY_ALIASINFO *in,
+bool samr_io_q_query_aliasinfo(const char *desc, SAMR_Q_QUERY_ALIASINFO *in,
prs_struct *ps, int depth)
{
if ( !in )
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_aliasinfo(const char *desc, SAMR_R_QUERY_ALIASINFO *out,
+bool samr_io_r_query_aliasinfo(const char *desc, SAMR_R_QUERY_ALIASINFO *out,
prs_struct *ps, int depth)
{
if ( !out )
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_aliasinfo(const char *desc, SAMR_Q_SET_ALIASINFO * q_u,
+bool samr_io_q_set_aliasinfo(const char *desc, SAMR_Q_SET_ALIASINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u,
+bool samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a SAMR_Q_QUERY_USERALIASES structure.
********************************************************************/
-BOOL samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u,
+bool samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u,
prs_struct *ps, int depth)
{
fstring tmp;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_rids(const char *desc, uint32 *num_rids, uint32 **rid,
+bool samr_io_rids(const char *desc, uint32 *num_rids, uint32 **rid,
prs_struct *ps, int depth)
{
fstring tmp;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_useraliases(const char *desc, SAMR_R_QUERY_USERALIASES * r_u,
+bool samr_io_r_query_useraliases(const char *desc, SAMR_R_QUERY_USERALIASES * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_alias(const char *desc, SAMR_Q_OPEN_ALIAS * q_u,
+bool samr_io_q_open_alias(const char *desc, SAMR_Q_OPEN_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_alias(const char *desc, SAMR_R_OPEN_ALIAS * r_u,
+bool samr_io_r_open_alias(const char *desc, SAMR_R_OPEN_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_lookup_rids(const char *desc, SAMR_Q_LOOKUP_RIDS * q_u,
+bool samr_io_q_lookup_rids(const char *desc, SAMR_Q_LOOKUP_RIDS * q_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_lookup_rids(const char *desc, SAMR_R_LOOKUP_RIDS * r_u,
+bool samr_io_r_lookup_rids(const char *desc, SAMR_R_LOOKUP_RIDS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
+bool samr_io_q_delete_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
+bool samr_io_r_delete_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_create_dom_alias(const char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u,
+bool samr_io_q_create_dom_alias(const char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_create_dom_alias(const char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u,
+bool samr_io_r_create_dom_alias(const char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_add_aliasmem(const char *desc, SAMR_Q_ADD_ALIASMEM * q_u,
+bool samr_io_q_add_aliasmem(const char *desc, SAMR_Q_ADD_ALIASMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_add_aliasmem(const char *desc, SAMR_R_ADD_ALIASMEM * r_u,
+bool samr_io_r_add_aliasmem(const char *desc, SAMR_R_ADD_ALIASMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_del_aliasmem(const char *desc, SAMR_Q_DEL_ALIASMEM * q_u,
+bool samr_io_q_del_aliasmem(const char *desc, SAMR_Q_DEL_ALIASMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_del_aliasmem(const char *desc, SAMR_R_DEL_ALIASMEM * r_u,
+bool samr_io_r_del_aliasmem(const char *desc, SAMR_R_DEL_ALIASMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_dom_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
+bool samr_io_q_delete_dom_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_dom_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
+bool samr_io_r_delete_dom_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_aliasmem(const char *desc, SAMR_Q_QUERY_ALIASMEM * q_u,
+bool samr_io_q_query_aliasmem(const char *desc, SAMR_Q_QUERY_ALIASMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_aliasmem(const char *desc, SAMR_R_QUERY_ALIASMEM * r_u,
+bool samr_io_r_query_aliasmem(const char *desc, SAMR_R_QUERY_ALIASMEM * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_lookup_names(const char *desc, SAMR_Q_LOOKUP_NAMES * q_u,
+bool samr_io_q_lookup_names(const char *desc, SAMR_Q_LOOKUP_NAMES * q_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u,
+bool samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u,
prs_struct *ps, int depth)
{
uint32 i;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_dom_user(const char *desc, SAMR_Q_DELETE_DOM_USER * q_u,
+bool samr_io_q_delete_dom_user(const char *desc, SAMR_Q_DELETE_DOM_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_dom_user(const char *desc, SAMR_R_DELETE_DOM_USER * r_u,
+bool samr_io_r_delete_dom_user(const char *desc, SAMR_R_DELETE_DOM_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_user(const char *desc, SAMR_Q_OPEN_USER * q_u,
+bool samr_io_q_open_user(const char *desc, SAMR_Q_OPEN_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_user(const char *desc, SAMR_R_OPEN_USER * r_u,
+bool samr_io_r_open_user(const char *desc, SAMR_R_OPEN_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_create_user(const char *desc, SAMR_Q_CREATE_USER * q_u,
+bool samr_io_q_create_user(const char *desc, SAMR_Q_CREATE_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_create_user(const char *desc, SAMR_R_CREATE_USER * r_u,
+bool samr_io_r_create_user(const char *desc, SAMR_R_CREATE_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_userinfo(const char *desc, SAMR_Q_QUERY_USERINFO * q_u,
+bool samr_io_q_query_userinfo(const char *desc, SAMR_Q_QUERY_USERINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a LOGON_HRS structure.
********************************************************************/
-static BOOL sam_io_logon_hrs(const char *desc, LOGON_HRS * hrs,
+static bool sam_io_logon_hrs(const char *desc, LOGON_HRS * hrs,
prs_struct *ps, int depth)
{
if (hrs == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info18(const char *desc, SAM_USER_INFO_18 * u,
+static bool sam_io_user_info18(const char *desc, SAM_USER_INFO_18 * u,
prs_struct *ps, int depth)
{
if (u == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info7(const char *desc, SAM_USER_INFO_7 * usr,
+static bool sam_io_user_info7(const char *desc, SAM_USER_INFO_7 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info9(const char *desc, SAM_USER_INFO_9 * usr,
+static bool sam_io_user_info9(const char *desc, SAM_USER_INFO_9 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info16(const char *desc, SAM_USER_INFO_16 * usr,
+static bool sam_io_user_info16(const char *desc, SAM_USER_INFO_16 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info17(const char *desc, SAM_USER_INFO_17 * usr,
+static bool sam_io_user_info17(const char *desc, SAM_USER_INFO_17 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info24(const char *desc, SAM_USER_INFO_24 * usr,
+static bool sam_io_user_info24(const char *desc, SAM_USER_INFO_24 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info26(const char *desc, SAM_USER_INFO_26 * usr,
+static bool sam_io_user_info26(const char *desc, SAM_USER_INFO_26 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info23(const char *desc, SAM_USER_INFO_23 * usr,
+static bool sam_io_user_info23(const char *desc, SAM_USER_INFO_23 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
way than normal... And there are definately other problems. JRA.
********************************************************************/
-static BOOL sam_io_user_info25(const char *desc, SAM_USER_INFO_25 * usr, prs_struct *ps, int depth)
+static bool sam_io_user_info25(const char *desc, SAM_USER_INFO_25 * usr, prs_struct *ps, int depth)
{
if (usr == NULL)
return False;
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info21(const char *desc, SAM_USER_INFO_21 * usr,
+static bool sam_io_user_info21(const char *desc, SAM_USER_INFO_21 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info20(const char *desc, SAM_USER_INFO_20 *usr,
+static bool sam_io_user_info20(const char *desc, SAM_USER_INFO_20 *usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
reads or writes a structure.
********************************************************************/
-static BOOL samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr,
+static bool samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr,
prs_struct *ps, int depth)
{
- BOOL ret;
+ bool ret;
SAM_USERINFO_CTR *ctr;
prs_debug(ps, depth, desc, "samr_io_userinfo_ctr");
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_userinfo(const char *desc, SAMR_R_QUERY_USERINFO * r_u,
+bool samr_io_r_query_userinfo(const char *desc, SAMR_R_QUERY_USERINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_userinfo(const char *desc, SAMR_Q_SET_USERINFO * q_u,
+bool samr_io_q_set_userinfo(const char *desc, SAMR_Q_SET_USERINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_userinfo(const char *desc, SAMR_R_SET_USERINFO * r_u,
+bool samr_io_r_set_userinfo(const char *desc, SAMR_R_SET_USERINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_userinfo2(const char *desc, SAMR_Q_SET_USERINFO2 * q_u,
+bool samr_io_q_set_userinfo2(const char *desc, SAMR_Q_SET_USERINFO2 * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_userinfo2(const char *desc, SAMR_R_SET_USERINFO2 * r_u,
+bool samr_io_r_set_userinfo2(const char *desc, SAMR_R_SET_USERINFO2 * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect(const char *desc, SAMR_Q_CONNECT * q_u,
+bool samr_io_q_connect(const char *desc, SAMR_Q_CONNECT * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect(const char *desc, SAMR_R_CONNECT * r_u,
+bool samr_io_r_connect(const char *desc, SAMR_R_CONNECT * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect4(const char *desc, SAMR_Q_CONNECT4 * q_u,
+bool samr_io_q_connect4(const char *desc, SAMR_Q_CONNECT4 * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect4(const char *desc, SAMR_R_CONNECT4 * r_u,
+bool samr_io_r_connect4(const char *desc, SAMR_R_CONNECT4 * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect5(const char *desc, SAMR_Q_CONNECT5 * q_u,
+bool samr_io_q_connect5(const char *desc, SAMR_Q_CONNECT5 * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect5(const char *desc, SAMR_R_CONNECT5 * r_u,
+bool samr_io_r_connect5(const char *desc, SAMR_R_CONNECT5 * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect_anon(const char *desc, SAMR_Q_CONNECT_ANON * q_u,
+bool samr_io_q_connect_anon(const char *desc, SAMR_Q_CONNECT_ANON * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect_anon(const char *desc, SAMR_R_CONNECT_ANON * r_u,
+bool samr_io_r_connect_anon(const char *desc, SAMR_R_CONNECT_ANON * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_get_dom_pwinfo(const char *desc, SAMR_Q_GET_DOM_PWINFO * q_u,
+bool samr_io_q_get_dom_pwinfo(const char *desc, SAMR_Q_GET_DOM_PWINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_get_dom_pwinfo(const char *desc, SAMR_R_GET_DOM_PWINFO * r_u,
+bool samr_io_r_get_dom_pwinfo(const char *desc, SAMR_R_GET_DOM_PWINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a SAMR_ENC_PASSWD structure.
********************************************************************/
-BOOL samr_io_enc_passwd(const char *desc, SAMR_ENC_PASSWD * pwd,
+bool samr_io_enc_passwd(const char *desc, SAMR_ENC_PASSWD * pwd,
prs_struct *ps, int depth)
{
if (pwd == NULL)
reads or writes a SAMR_ENC_HASH structure.
********************************************************************/
-BOOL samr_io_enc_hash(const char *desc, SAMR_ENC_HASH * hsh,
+bool samr_io_enc_hash(const char *desc, SAMR_ENC_HASH * hsh,
prs_struct *ps, int depth)
{
if (hsh == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_chgpasswd_user(const char *desc, SAMR_Q_CHGPASSWD_USER * q_u,
+bool samr_io_q_chgpasswd_user(const char *desc, SAMR_Q_CHGPASSWD_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_chgpasswd_user(const char *desc, SAMR_R_CHGPASSWD_USER * r_u,
+bool samr_io_r_chgpasswd_user(const char *desc, SAMR_R_CHGPASSWD_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_chgpasswd_user3(const char *desc, SAMR_Q_CHGPASSWD_USER3 * q_u,
+bool samr_io_q_chgpasswd_user3(const char *desc, SAMR_Q_CHGPASSWD_USER3 * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
Reads or writes an SAMR_CHANGE_REJECT structure.
********************************************************************/
-BOOL samr_io_change_reject(const char *desc, SAMR_CHANGE_REJECT *reject, prs_struct *ps, int depth)
+bool samr_io_change_reject(const char *desc, SAMR_CHANGE_REJECT *reject, prs_struct *ps, int depth)
{
if (reject == NULL)
return False;
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_chgpasswd_user3(const char *desc, SAMR_R_CHGPASSWD_USER3 *r_u,
+bool samr_io_r_chgpasswd_user3(const char *desc, SAMR_R_CHGPASSWD_USER3 *r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_domain_info2(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO2 *q_u,
+bool samr_io_q_query_domain_info2(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO2 *q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_domain_info2(const char *desc, SAMR_R_QUERY_DOMAIN_INFO2 * r_u,
+bool samr_io_r_query_domain_info2(const char *desc, SAMR_R_QUERY_DOMAIN_INFO2 * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_domain_info(const char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u,
+bool samr_io_q_set_domain_info(const char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_domain_info(const char *desc, SAMR_R_SET_DOMAIN_INFO * r_u,
+bool samr_io_r_set_domain_info(const char *desc, SAMR_R_SET_DOMAIN_INFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
Reads or writes a SEC_ACCESS structure.
********************************************************************/
-BOOL sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth)
+bool sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth)
{
if (t == NULL)
return False;
Reads or writes a SEC_ACE structure.
********************************************************************/
-BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
+bool sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
{
uint32 old_offset;
uint32 offset_ace_size;
for you as it reads them.
********************************************************************/
-BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
+bool sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
{
unsigned int i;
uint32 old_offset;
If reading and the *ppsd = NULL, allocates the structure.
********************************************************************/
-BOOL sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
+bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
{
uint32 old_offset;
uint32 max_offset = 0; /* after we're done, move offset to end */
Reads or writes a SEC_DESC_BUF structure.
********************************************************************/
-BOOL sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth)
+bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth)
{
uint32 off_len;
uint32 off_max_len;
This should be moved in a more generic lib.
********************************************************************/
-BOOL spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime)
+bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime)
{
if(!prs_uint16("year", ps, depth, &systime->year))
return False;
/*******************************************************************
********************************************************************/
-BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime)
+bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime)
{
systime->year=unixtime->tm_year+1900;
systime->month=unixtime->tm_mon+1;
reads or writes an DOC_INFO structure.
********************************************************************/
-static BOOL smb_io_doc_info_1(const char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth)
+static bool smb_io_doc_info_1(const char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth)
{
if (info_1 == NULL) return False;
reads or writes an DOC_INFO structure.
********************************************************************/
-static BOOL smb_io_doc_info(const char *desc, DOC_INFO *info, prs_struct *ps, int depth)
+static bool smb_io_doc_info(const char *desc, DOC_INFO *info, prs_struct *ps, int depth)
{
uint32 useless_ptr=0;
reads or writes an DOC_INFO_CONTAINER structure.
********************************************************************/
-static BOOL smb_io_doc_info_container(const char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth)
+static bool smb_io_doc_info_container(const char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth)
{
if (cont == NULL) return False;
structure. The _TYPE structure is really the deferred referrants (i.e
the notify fields array) of the _TYPE structure. -tpot */
-static BOOL smb_io_notify_option_type(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
+static bool smb_io_notify_option_type(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_notify_option_type");
depth++;
reads or writes an NOTIFY OPTION TYPE DATA.
********************************************************************/
-static BOOL smb_io_notify_option_type_data(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
+static bool smb_io_notify_option_type_data(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
{
int i;
reads or writes an NOTIFY OPTION structure.
********************************************************************/
-static BOOL smb_io_notify_option_type_ctr(const char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth)
+static bool smb_io_notify_option_type_ctr(const char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth)
{
int i;
reads or writes an NOTIFY OPTION structure.
********************************************************************/
-static BOOL smb_io_notify_option(const char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth)
+static bool smb_io_notify_option(const char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_notify_option");
depth++;
reads or writes an NOTIFY INFO DATA structure.
********************************************************************/
-static BOOL smb_io_notify_info_data(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth)
+static bool smb_io_notify_info_data(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth)
{
uint32 useless_ptr=0x0FF0ADDE;
reads or writes an NOTIFY INFO DATA structure.
********************************************************************/
-BOOL smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
+bool smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_notify_info_data_strings");
reads or writes an NOTIFY INFO structure.
********************************************************************/
-static BOOL smb_io_notify_info(const char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *ps, int depth)
+static bool smb_io_notify_info(const char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *ps, int depth)
{
int i;
/*******************************************************************
********************************************************************/
-BOOL spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u )
+bool spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u )
{
prs_debug(ps, depth, desc, "");
depth++;
/*******************************************************************
********************************************************************/
-static BOOL spool_io_user_level(const char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, int depth)
+static bool spool_io_user_level(const char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, int depth)
{
if (q_u==NULL)
return False;
#define DM_NUM_OPTIONAL_FIELDS 8
-BOOL spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode)
+bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode)
{
int available_space; /* size of the device mode left to parse */
/* only important on unmarshalling */
Read or write a DEVICEMODE container
********************************************************************/
-static BOOL spoolss_io_devmode_cont(const char *desc, DEVMODE_CTR *dm_c, prs_struct *ps, int depth)
+static bool spoolss_io_devmode_cont(const char *desc, DEVMODE_CTR *dm_c, prs_struct *ps, int depth)
{
if (dm_c==NULL)
return False;
/*******************************************************************
********************************************************************/
-static BOOL spoolss_io_printer_default(const char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth)
+static bool spoolss_io_printer_default(const char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth)
{
if (pd==NULL)
return False;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u,
+bool make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u,
const fstring printername,
const fstring datatype,
uint32 access_required,
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u,
+bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u,
const char *srv_name, const char* clientname, const char* user_name,
uint32 level, PRINTER_INFO_CTR *ctr)
{
create a SPOOL_PRINTER_INFO_2 stuct from a PRINTER_INFO_2 struct
*******************************************************************/
-BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2,
+bool make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2,
PRINTER_INFO_2 *info)
{
create a SPOOL_PRINTER_INFO_3 struct from a PRINTER_INFO_3 struct
*******************************************************************/
-BOOL make_spoolss_printer_info_3(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_3 **spool_info3,
+bool make_spoolss_printer_info_3(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_3 **spool_info3,
PRINTER_INFO_3 *info)
{
create a SPOOL_PRINTER_INFO_7 struct from a PRINTER_INFO_7 struct
*******************************************************************/
-BOOL make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7 **spool_info7,
+bool make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7 **spool_info7,
PRINTER_INFO_7 *info)
{
* called from spoolss_q_open_printer_ex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
* called from spoolss_open_printer_ex (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
* called from spoolss_q_open_printer_ex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
* called from spoolss_open_printer_ex (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
/*******************************************************************
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
+bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
SPOOL_Q_DELETEPRINTERDRIVEREX *q_u,
const char *server,
const char* arch,
/*******************************************************************
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteprinterdriver(
+bool make_spoolss_q_deleteprinterdriver(
TALLOC_CTX *mem_ctx,
SPOOL_Q_DELETEPRINTERDRIVER *q_u,
const char *server,
* make a structure.
********************************************************************/
-BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
+bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
const POLICY_HND *handle,
const char *valuename, uint32 size)
{
* make a structure.
********************************************************************/
-BOOL make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
+bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
const POLICY_HND *handle,
const char *keyname,
const char *valuename, uint32 size)
* called from spoolss_q_getprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
* called from spoolss_q_deleteprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
* called from spoolss_r_deleteprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdata");
depth++;
* called from spoolss_q_deleteprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
* called from spoolss_r_deleteprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdataex");
depth++;
* called from spoolss_r_getprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
* make a structure.
********************************************************************/
-BOOL make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd)
+bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd)
{
if (q_u == NULL) return False;
* called from spoolss_abortprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_r_abortprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_abortprinter");
depth++;
* called from spoolss_deleteprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_deleteprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinter");
depth++;
* called from spoolss_deleteprinterdriver (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
/*******************************************************************
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
* called from spoolss_deleteprinterdriver (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
/*******************************************************************
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
* called from spoolss_closeprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_closeprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_closeprinter");
depth++;
* called from spoolss_q_startdocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_r_startdocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_startdocprinter");
depth++;
* called from spoolss_q_enddocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_r_enddocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enddocprinter");
depth++;
* called from spoolss_q_startpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_r_startpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_startpageprinter");
depth++;
* called from spoolss_q_endpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_r_endpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_endpageprinter");
depth++;
* called from spoolss_q_writeprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
* called from spoolss_r_writeprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_writeprinter");
depth++;
* called from spoolss_q_rffpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_rffpcnex");
depth++;
* called from spoolss_r_rffpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_rffpcnex");
depth++;
* called from spoolss_q_rfnpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_rfnpcnex");
depth++;
* called from spoolss_r_rfnpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_rfnpcnex");
depth++;
Parse a DEVMODE structure and its relative pointer.
********************************************************************/
-static BOOL smb_io_reldevmode(const char *desc, RPC_BUFFER *buffer, int depth, DEVICEMODE **devmode)
+static bool smb_io_reldevmode(const char *desc, RPC_BUFFER *buffer, int depth, DEVICEMODE **devmode)
{
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_0 structure.
********************************************************************/
-BOOL smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth)
+bool smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_1 structure.
********************************************************************/
-BOOL smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth)
+bool smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_2 structure.
********************************************************************/
-BOOL smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth)
+bool smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
uint32 dm_offset, sd_offset, current_offset;
Parse a PRINTER_INFO_3 structure.
********************************************************************/
-BOOL smb_io_printer_info_3(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_3 *info, int depth)
+bool smb_io_printer_info_3(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_3 *info, int depth)
{
uint32 offset = 0;
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_4 structure.
********************************************************************/
-BOOL smb_io_printer_info_4(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_4 *info, int depth)
+bool smb_io_printer_info_4(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_4 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_5 structure.
********************************************************************/
-BOOL smb_io_printer_info_5(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_5 *info, int depth)
+bool smb_io_printer_info_5(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_5 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_6 structure.
********************************************************************/
-BOOL smb_io_printer_info_6(const char *desc, RPC_BUFFER *buffer,
+bool smb_io_printer_info_6(const char *desc, RPC_BUFFER *buffer,
PRINTER_INFO_6 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PRINTER_INFO_7 structure.
********************************************************************/
-BOOL smb_io_printer_info_7(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_7 *info, int depth)
+bool smb_io_printer_info_7(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_7 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PORT_INFO_1 structure.
********************************************************************/
-BOOL smb_io_port_info_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth)
+bool smb_io_port_info_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PORT_INFO_2 structure.
********************************************************************/
-BOOL smb_io_port_info_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth)
+bool smb_io_port_info_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a DRIVER_INFO_1 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_1(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_1 *info, int depth)
+bool smb_io_printer_driver_info_1(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a DRIVER_INFO_2 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_2(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_2 *info, int depth)
+bool smb_io_printer_driver_info_2(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a DRIVER_INFO_3 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_3(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_3 *info, int depth)
+bool smb_io_printer_driver_info_3(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_3 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a DRIVER_INFO_6 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_6(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_6 *info, int depth)
+bool smb_io_printer_driver_info_6(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_6 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a JOB_INFO_1 structure.
********************************************************************/
-BOOL smb_io_job_info_1(const char *desc, RPC_BUFFER *buffer, JOB_INFO_1 *info, int depth)
+bool smb_io_job_info_1(const char *desc, RPC_BUFFER *buffer, JOB_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a JOB_INFO_2 structure.
********************************************************************/
-BOOL smb_io_job_info_2(const char *desc, RPC_BUFFER *buffer, JOB_INFO_2 *info, int depth)
+bool smb_io_job_info_2(const char *desc, RPC_BUFFER *buffer, JOB_INFO_2 *info, int depth)
{
uint32 pipo=0;
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL smb_io_form_1(const char *desc, RPC_BUFFER *buffer, FORM_1 *info, int depth)
+bool smb_io_form_1(const char *desc, RPC_BUFFER *buffer, FORM_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a DRIVER_DIRECTORY_1 structure.
********************************************************************/
-BOOL smb_io_driverdir_1(const char *desc, RPC_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth)
+bool smb_io_driverdir_1(const char *desc, RPC_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PORT_INFO_1 structure.
********************************************************************/
-BOOL smb_io_port_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth)
+bool smb_io_port_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
Parse a PORT_INFO_2 structure.
********************************************************************/
-BOOL smb_io_port_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth)
+bool smb_io_port_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL smb_io_printprocessor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth)
+bool smb_io_printprocessor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL smb_io_printprocdatatype_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth)
+bool smb_io_printprocdatatype_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL smb_io_printmonitor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_1 *info, int depth)
+bool smb_io_printmonitor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL smb_io_printmonitor_info_2(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_2 *info, int depth)
+bool smb_io_printmonitor_info_2(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u,
+bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u,
const POLICY_HND *hnd,
const fstring architecture,
uint32 level, uint32 clientmajor, uint32 clientminor,
* called from spoolss_getprinterdriver2 (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdriver2");
depth++;
* called from spoolss_getprinterdriver2 (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdriver2");
depth++;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_enumprinters(
+bool make_spoolss_q_enumprinters(
SPOOL_Q_ENUMPRINTERS *q_u,
uint32 flags,
char *servername,
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u,
+bool make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u,
fstring servername, uint32 level,
RPC_BUFFER *buffer, uint32 offered)
{
* called from spoolss_enumprinters (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinters");
depth++;
Parse a SPOOL_R_ENUMPRINTERS structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinters");
depth++;
*
********************************************************************/
-BOOL spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprinter");
depth++;
* called from spoolss_getprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getprinter");
depth++;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_getprinter(
+bool make_spoolss_q_getprinter(
TALLOC_CTX *mem_ctx,
SPOOL_Q_GETPRINTER *q_u,
const POLICY_HND *hnd,
/*******************************************************************
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u,
+bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u,
const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info,
uint32 command)
{
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setprinter");
depth++;
Marshall/unmarshall a SPOOL_Q_SETPRINTER struct.
********************************************************************/
-BOOL spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth)
{
uint32 ptr_sec_desc = 0;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_fcpn");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_fcpn");
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumjobs");
depth++;
/*******************************************************************
********************************************************************/
-BOOL make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
+bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
uint32 firstjob,
uint32 numofjobs,
uint32 level,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumjobs");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_schedulejob");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_schedulejob");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setjob");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_setjob");
depth++;
Parse a SPOOL_R_ENUMPRINTERDRIVERS structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdrivers");
depth++;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
+bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
const char *name,
const char *environment,
uint32 level,
Parse a SPOOL_Q_ENUMPRINTERDRIVERS structure.
********************************************************************/
-BOOL spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdrivers");
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumforms");
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumforms");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getform");
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getform");
depth++;
Parse a SPOOL_R_ENUMPORTS structure.
********************************************************************/
-BOOL spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumports");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
Parse a SPOOL_PRINTER_INFO_LEVEL_1 structure.
********************************************************************/
-BOOL spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth)
+bool spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_1");
depth++;
Parse a SPOOL_PRINTER_INFO_LEVEL_3 structure.
********************************************************************/
-BOOL spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth)
+bool spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_3");
depth++;
Parse a SPOOL_PRINTER_INFO_LEVEL_2 structure.
********************************************************************/
-BOOL spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth)
+bool spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_2");
depth++;
return True;
}
-BOOL spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth)
+bool spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_7");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth)
+bool spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth)
{
uint32 ptr_sec_desc = 0;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u,
+bool spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprinterex");
/*******************************************************************
********************************************************************/
-BOOL spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u,
+bool spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u,
prs_struct *ps, int depth)
{
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *il;
parse a SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure
********************************************************************/
-BOOL spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u,
+bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u,
prs_struct *ps, int depth)
{
SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *il;
********************************************************************/
-static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
+static bool uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
{
fstring f;
int n = 0;
and size of array at beginning
********************************************************************/
-BOOL smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth)
+bool smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth)
{
if (buffer==NULL) return False;
/*******************************************************************
********************************************************************/
-BOOL spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth)
+bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_driver_info_level");
depth++;
init a SPOOL_Q_ADDPRINTERDRIVER struct
******************************************************************/
-BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
+bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name,
uint32 level, PRINTER_DRIVER_CTR *info)
{
return True;
}
-BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
+bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
DRIVER_INFO_3 *info3)
{
init_unistr2_from_unistr(&inf->defaultdatatype, &info3->defaultdatatype);
if (info3->dependentfiles) {
- BOOL done = False;
- BOOL null_char = False;
+ bool done = False;
+ bool null_char = False;
uint16 *ptr = info3->dependentfiles;
while (!done) {
switch (*ptr) {
case 0:
- /* the null_char BOOL is used to help locate
+ /* the null_char bool is used to help locate
two '\0's back to back */
if (null_char) {
done = True;
make a BUFFER5 struct from a uint16*
******************************************************************/
-BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src)
+bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src)
{
buf5->buf_len = len;
fill in the prs_struct for a ADDPRINTERDRIVER request PDU
********************************************************************/
-BOOL spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriver");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriver");
depth++;
fill in the prs_struct for a ADDPRINTERDRIVER request PDU
********************************************************************/
-BOOL spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriverex");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriverex");
depth++;
/*******************************************************************
********************************************************************/
-BOOL uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
+bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc)
{
NT_PRINTER_DRIVER_INFO_LEVEL_3 *d;
/*******************************************************************
********************************************************************/
-BOOL uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
+bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc)
{
NT_PRINTER_DRIVER_INFO_LEVEL_6 *d;
return False;
}
-BOOL uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
+bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
NT_PRINTER_INFO_LEVEL_2 *d)
{
DEBUG(7,("Converting from UNICODE to ASCII\n"));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
+bool make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
fstring servername, fstring env_name, uint32 level,
RPC_BUFFER *buffer, uint32 offered)
{
Parse a SPOOL_Q_GETPRINTERDRIVERDIR structure.
********************************************************************/
-BOOL spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdriverdir");
depth++;
Parse a SPOOL_R_GETPRINTERDRIVERDIR structure.
********************************************************************/
-BOOL spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdriverdir");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprintprocessors");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprintprocessors");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_addprintprocessor");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprintproicessor");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprintprocdatatypes");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprintprocdatatypes");
depth++;
Parse a SPOOL_Q_ENUMPRINTMONITORS structure.
********************************************************************/
-BOOL spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprintmonitors");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprintmonitors");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdata");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdata");
depth++;
/*******************************************************************
********************************************************************/
-BOOL make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
+bool make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
const POLICY_HND *hnd,
uint32 idx, uint32 valuelen, uint32 datalen)
{
/*******************************************************************
********************************************************************/
-BOOL make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
+bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
const POLICY_HND *hnd, const char *key,
uint32 size)
{
/*******************************************************************
********************************************************************/
-BOOL make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND *hnd,
+bool make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND *hnd,
char* value, uint32 data_type, char* data, uint32 data_size)
{
memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
/*******************************************************************
********************************************************************/
-BOOL make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY_HND *hnd,
+bool make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY_HND *hnd,
char *key, char* value, uint32 data_type, char* data,
uint32 data_size)
{
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_setprinterdata");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setprinterdata");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_resetprinter");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_resetprinter");
depth++;
/*******************************************************************
********************************************************************/
-static BOOL spoolss_io_addform(const char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth)
+static bool spoolss_io_addform(const char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_addform");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_deleteform");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteform");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
{
uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_addform");
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addform");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth)
{
uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_setform");
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setform");
depth++;
Parse a SPOOL_R_GETJOB structure.
********************************************************************/
-BOOL spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getjob");
depth++;
Parse a SPOOL_Q_GETJOB structure.
********************************************************************/
-BOOL spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u,
+bool make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u,
const fstring string, uint32 printer, uint32 type)
{
if (q_u == NULL)
Parse a SPOOL_Q_REPLYOPENPRINTER structure.
********************************************************************/
-BOOL spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_replyopenprinter");
depth++;
Parse a SPOOL_R_REPLYOPENPRINTER structure.
********************************************************************/
-BOOL spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_replyopenprinter");
depth++;
/*******************************************************************
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd,
+bool make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd,
uint32 condition, uint32 change_id)
{
/*******************************************************************
Parse a SPOOL_Q_ROUTERREPLYPRINTER structure.
********************************************************************/
-BOOL spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_routerreplyprinter");
/*******************************************************************
Parse a SPOOL_R_ROUTERREPLYPRINTER structure.
********************************************************************/
-BOOL spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_routerreplyprinter");
depth++;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd)
+bool make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd)
{
if (q_u == NULL)
return False;
Parse a SPOOL_Q_REPLYCLOSEPRINTER structure.
********************************************************************/
-BOOL spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_replycloseprinter");
depth++;
Parse a SPOOL_R_REPLYCLOSEPRINTER structure.
********************************************************************/
-BOOL spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter");
depth++;
/*******************************************************************
Deep copy a SPOOL_NOTIFY_INFO_DATA structure
******************************************************************/
-static BOOL copy_spool_notify_info_data(SPOOL_NOTIFY_INFO_DATA *dst,
+static bool copy_spool_notify_info_data(SPOOL_NOTIFY_INFO_DATA *dst,
SPOOL_NOTIFY_INFO_DATA *src, int n)
{
int i;
/*******************************************************************
Deep copy a SPOOL_NOTIFY_INFO structure
******************************************************************/
-static BOOL copy_spool_notify_info(SPOOL_NOTIFY_INFO *dst, SPOOL_NOTIFY_INFO *src)
+static bool copy_spool_notify_info(SPOOL_NOTIFY_INFO *dst, SPOOL_NOTIFY_INFO *src)
{
if (!dst) {
DEBUG(0,("copy_spool_notify_info: NULL destination pointer!\n"));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
+bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
uint32 change_low, uint32 change_high,
SPOOL_NOTIFY_INFO *info)
{
Parse a SPOOL_Q_REPLY_RRPCN structure.
********************************************************************/
-BOOL spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_reply_rrpcn");
depth++;
Parse a SPOOL_R_REPLY_RRPCN structure.
********************************************************************/
-BOOL spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_reply_rrpcn");
depth++;
* called from spoolss_q_getprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
* called from spoolss_r_getprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_setprinterdataex");
depth++;
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setprinterdataex");
depth++;
/*******************************************************************
* read a structure.
********************************************************************/
-BOOL make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
+bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
POLICY_HND *hnd, const char *key,
uint32 size)
{
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterkey");
depth++;
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterkey");
depth++;
* read a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u,
+bool make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u,
POLICY_HND *hnd, char *keyname)
{
DEBUG(5,("make_spoolss_q_deleteprinterkey\n"));
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterkey");
depth++;
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterkey");
depth++;
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdataex");
depth++;
/*******************************************************************
********************************************************************/
-static BOOL spoolss_io_printer_enum_values_ctr(const char *desc, prs_struct *ps,
+static bool spoolss_io_printer_enum_values_ctr(const char *desc, prs_struct *ps,
PRINTER_ENUM_VALUES_CTR *ctr, int depth)
{
int i;
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
uint32 data_offset, end_offset;
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdataex");
*/
-BOOL make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered)
+bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered)
{
DEBUG(5,("make_spoolss_q_getprintprocessordirectory\n"));
return True;
}
-BOOL spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth)
{
uint32 ptr;
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprintprocessordirectory");
depth++;
return True;
}
-BOOL smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth)
+bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
+bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
int level, FORM *form)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
+bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
int level, const char *form_name, FORM *form)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
+bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
const char *form)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
+bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
const char *formname, uint32 level,
RPC_BUFFER *buffer, uint32 offered)
{
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
+bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
uint32 level, RPC_BUFFER *buffer,
uint32 offered)
{
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle,
+bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle,
uint32 jobid, uint32 level, uint32 command)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
+bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
uint32 jobid, uint32 level, RPC_BUFFER *buffer,
uint32 offered)
{
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u,
+bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u,
POLICY_HND *handle)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u,
+bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u,
POLICY_HND *handle)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
+bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
POLICY_HND *handle, uint32 level,
char *docname, char *outputfile,
char *datatype)
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u,
+bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u,
POLICY_HND *handle)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u,
+bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u,
POLICY_HND *handle, uint32 data_size,
char *data)
{
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u,
+bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u,
POLICY_HND *handle, char *valuename)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u,
+bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u,
POLICY_HND *handle, char *key,
char *value)
{
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
+bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
uint32 flags, uint32 options, const char *localmachine,
uint32 printerlocal, SPOOL_NOTIFY_OPTION *option)
{
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth)
+bool spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_xcvdataport");
depth++;
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth)
+bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_xcvdataport");
depth++;
/*******************************************************************
********************************************************************/
-BOOL make_monitorui_buf( RPC_BUFFER *buf, const char *dllname )
+bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname )
{
UNISTR string;
#define PORT_DATA_1_PAD 540
-static BOOL smb_io_port_data_1( const char *desc, RPC_BUFFER *buf, int depth, SPOOL_PORT_DATA_1 *p1 )
+static bool smb_io_port_data_1( const char *desc, RPC_BUFFER *buf, int depth, SPOOL_PORT_DATA_1 *p1 )
{
prs_struct *ps = &buf->prs;
uint8 padding[PORT_DATA_1_PAD];
/*******************************************************************
********************************************************************/
-BOOL convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf )
+bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf )
{
SPOOL_PORT_DATA_1 spdata_1;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info0_str(const char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth)
+static bool srv_io_share_info0_str(const char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth)
{
if (sh0 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info0(const char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth)
+static bool srv_io_share_info0(const char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth)
{
if (sh0 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1_str(const char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
+static bool srv_io_share_info1_str(const char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1(const char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
+static bool srv_io_share_info1(const char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info2_str(const char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
+static bool srv_io_share_info2_str(const char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info2(const char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
+static bool srv_io_share_info2(const char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL)
return False;
Reads of writes a structure.
*******************************************************************/
-static BOOL srv_io_share_info501(const char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth)
+static bool srv_io_share_info501(const char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth)
{
if (sh501 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info501_str(const char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth)
+static bool srv_io_share_info501_str(const char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth)
{
if (sh501 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info502(const char *desc, SH_INFO_502 *sh502, prs_struct *ps, int depth)
+static bool srv_io_share_info502(const char *desc, SH_INFO_502 *sh502, prs_struct *ps, int depth)
{
if (sh502 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info502_str(const char *desc, SH_INFO_502_STR *sh502, prs_struct *ps, int depth)
+static bool srv_io_share_info502_str(const char *desc, SH_INFO_502_STR *sh502, prs_struct *ps, int depth)
{
if (sh502 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1004_str(const char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth)
+static bool srv_io_share_info1004_str(const char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth)
{
if (sh1004 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1004(const char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth)
+static bool srv_io_share_info1004(const char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth)
{
if (sh1004 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1005(const char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth)
+static bool srv_io_share_info1005(const char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth)
{
if(sh1005 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1006(const char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth)
+static bool srv_io_share_info1006(const char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth)
{
if(sh1006 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1007_str(const char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth)
+static bool srv_io_share_info1007_str(const char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth)
{
if (sh1007 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1007(const char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth)
+static bool srv_io_share_info1007(const char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth)
{
if (sh1007 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1501(const char* desc, SRV_SHARE_INFO_1501* sh1501,
+static bool srv_io_share_info1501(const char* desc, SRV_SHARE_INFO_1501* sh1501,
prs_struct* ps, int depth)
{
if(sh1501 == NULL)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_share_ctr(const char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
+static bool srv_io_srv_share_ctr(const char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_enum(const char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_share_enum(const char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_enum(const char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_share_enum(const char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
initialises a structure.
********************************************************************/
-BOOL init_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO *q_n, const char *srv_name, const char *share_name, uint32 info_level)
+bool init_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO *q_n, const char *srv_name, const char *share_name, uint32 info_level)
{
uint32 ptr_share_name;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_get_info(const char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_share_get_info(const char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_share_info(const char *desc, prs_struct *ps, int depth, SRV_SHARE_INFO *r_n)
+static bool srv_io_srv_share_info(const char *desc, prs_struct *ps, int depth, SRV_SHARE_INFO *r_n)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_get_info(const char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_share_get_info(const char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
intialises a structure.
********************************************************************/
-BOOL init_srv_q_net_share_set_info(SRV_Q_NET_SHARE_SET_INFO *q_n,
+bool init_srv_q_net_share_set_info(SRV_Q_NET_SHARE_SET_INFO *q_n,
const char *srv_name,
const char *share_name,
uint32 info_level,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_set_info(const char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_share_set_info(const char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_set_info(const char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_share_set_info(const char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_add(const char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_share_add(const char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_add(const char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_share_add(const char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_del(const char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_share_del(const char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_del(const char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
+bool srv_io_r_net_share_del(const char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_sess_info_0(const char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
+static bool srv_io_srv_sess_info_0(const char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_sess_info_1(const char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
+static bool srv_io_srv_sess_info_1(const char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_sess_ctr(const char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
+static bool srv_io_srv_sess_ctr(const char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
{
SRV_SESS_INFO_CTR *ctr = *pp_ctr;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_u, prs_struct *ps, int depth)
+bool srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_sess_del(const char *desc, SRV_Q_NET_SESS_DEL *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_sess_del(const char *desc, SRV_Q_NET_SESS_DEL *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_sess_del(const char *desc, SRV_R_NET_SESS_DEL *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_sess_del(const char *desc, SRV_R_NET_SESS_DEL *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_conn_info0(const char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
+static bool srv_io_conn_info0(const char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_conn_info_0(const char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
+static bool srv_io_srv_conn_info_0(const char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_conn_info1_str(const char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
+static bool srv_io_conn_info1_str(const char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_conn_info1(const char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
+static bool srv_io_conn_info1(const char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_conn_info_1(const char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
+static bool srv_io_srv_conn_info_1(const char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_conn_ctr(const char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
+static bool srv_io_srv_conn_ctr(const char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
{
SRV_CONN_INFO_CTR *ctr = *pp_ctr;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_file_info3_str(const char *desc, FILE_INFO_3 *sh1, prs_struct *ps, int depth)
+static bool srv_io_file_info3_str(const char *desc, FILE_INFO_3 *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_file_info3(const char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
+static bool srv_io_file_info3(const char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
{
uint32 uni_p;
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_file_ctr(const char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
+static bool srv_io_srv_file_ctr(const char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_u, prs_struct *ps, int depth)
+bool srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a SRV_INFO_101 structure.
********************************************************************/
-static BOOL srv_io_info_100(const char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth)
+static bool srv_io_info_100(const char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth)
{
if (sv100 == NULL)
return False;
Reads or writes a SRV_INFO_101 structure.
********************************************************************/
-static BOOL srv_io_info_101(const char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
+static bool srv_io_info_101(const char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
{
if (sv101 == NULL)
return False;
Reads or writes a SRV_INFO_102 structure.
********************************************************************/
-static BOOL srv_io_info_102(const char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
+static bool srv_io_info_102(const char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
{
if (sv102 == NULL)
return False;
Reads or writes a SRV_INFO_102 structure.
********************************************************************/
-static BOOL srv_io_info_ctr(const char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
+static bool srv_io_info_ctr(const char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_srv_get_info(const char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_srv_get_info(const char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_srv_set_info(const char *desc, SRV_Q_NET_SRV_SET_INFO *q_n,
+bool srv_io_q_net_srv_set_info(const char *desc, SRV_Q_NET_SRV_SET_INFO *q_n,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "srv_io_q_net_srv_set_info");
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_srv_get_info(const char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_srv_get_info(const char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_srv_set_info(const char *desc, SRV_R_NET_SRV_SET_INFO *r_n,
+bool srv_io_r_net_srv_set_info(const char *desc, SRV_R_NET_SRV_SET_INFO *r_n,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "srv_io_r_net_srv_set_info");
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a TIME_OF_DAY_INFO structure.
********************************************************************/
-static BOOL srv_io_time_of_day_info(const char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
+static bool srv_io_time_of_day_info(const char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
{
if (tod == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
initialises a structure.
********************************************************************/
-BOOL init_srv_q_net_disk_enum(SRV_Q_NET_DISK_ENUM *q_n,
+bool init_srv_q_net_disk_enum(SRV_Q_NET_DISK_ENUM *q_n,
const char *srv_name,
uint32 preferred_len,
ENUM_HND *enum_hnd
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth)
{
unsigned int i;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_name_validate(const char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_name_validate(const char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_name_validate(const char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_name_validate(const char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_query_secdesc(const char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_file_query_secdesc(const char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_query_secdesc(const char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_file_query_secdesc(const char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_set_secdesc(const char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth)
+bool srv_io_q_net_file_set_secdesc(const char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth)
+bool srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
/*******************************************************************
********************************************************************/
-static BOOL svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, prs_struct *ps, int depth )
+static bool svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, prs_struct *ps, int depth )
{
prs_debug(ps, depth, desc, "svcctl_io_service_status");
/*******************************************************************
********************************************************************/
-static BOOL svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, prs_struct *ps, int depth )
+static bool svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, prs_struct *ps, int depth )
{
prs_debug(ps, depth, desc, "svcctl_io_service_config");
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth )
+bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth )
{
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth )
+bool svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth )
{
prs_struct *ps=&buffer->prs;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname )
+bool init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname )
{
r_u->display_name_len = strlen(displayname);
init_unistr2( &r_u->displayname, displayname, UNI_STR_TERMINATE );
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth )
+bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth )
{
prs_struct *ps = &buffer->prs;
/*******************************************************************
********************************************************************/
-static BOOL svcctl_io_action( const char *desc, SC_ACTION *action, prs_struct *ps, int depth )
+static bool svcctl_io_action( const char *desc, SC_ACTION *action, prs_struct *ps, int depth )
{
prs_debug(ps, depth, desc, "svcctl_io_action");
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth )
+bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth )
{
prs_struct *ps = &buffer->prs;
int i;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth)
+bool svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
/*******************************************************************
********************************************************************/
-BOOL svcctl_io_r_set_service_sec(const char *desc, SVCCTL_R_SET_SERVICE_SEC *r_u, prs_struct *ps, int depth)
+bool svcctl_io_r_set_service_sec(const char *desc, SVCCTL_R_SET_SERVICE_SEC *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
{
struct junction_map *jn = NULL;
struct referral *old_referral_list = NULL;
- BOOL self_ref = False;
+ bool self_ref = False;
int consumedcnt = 0;
- BOOL exists = False;
+ bool exists = False;
char *altpath = NULL;
NTSTATUS status;
TALLOC_CTX *ctx = talloc_tos();
WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
{
struct junction_map *jn = NULL;
- BOOL self_ref = False;
+ bool self_ref = False;
int consumedcnt = 0;
- BOOL found = False;
+ bool found = False;
TALLOC_CTX *ctx = talloc_tos();
char *altpath = NULL;
return WERR_OK;
}
-static BOOL init_reply_dfs_info_1(TALLOC_CTX *mem_ctx, struct junction_map* j,struct dfs_Info1* dfs1)
+static bool init_reply_dfs_info_1(TALLOC_CTX *mem_ctx, struct junction_map* j,struct dfs_Info1* dfs1)
{
dfs1->path = talloc_asprintf(mem_ctx,
"\\\\%s\\%s\\%s", global_myname(),
return True;
}
-static BOOL init_reply_dfs_info_2(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info2* dfs2)
+static bool init_reply_dfs_info_2(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info2* dfs2)
{
dfs2->path = talloc_asprintf(mem_ctx,
"\\\\%s\\%s\\%s", global_myname(), j->service_name, j->volume_name);
return True;
}
-static BOOL init_reply_dfs_info_3(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info3* dfs3)
+static bool init_reply_dfs_info_3(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info3* dfs3)
{
int ii;
if (j->volume_name[0] == '\0')
return True;
}
-static BOOL init_reply_dfs_info_100(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info100* dfs100)
+static bool init_reply_dfs_info_100(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info100* dfs100)
{
dfs100->comment = talloc_strdup(mem_ctx, j->comment);
return True;
{
int consumedcnt = strlen(r->in.dfs_entry_path);
struct junction_map *jn = NULL;
- BOOL self_ref = False;
+ bool self_ref = False;
TALLOC_CTX *ctx = talloc_tos();
- BOOL ret;
+ bool ret;
jn = TALLOC_ZERO_P(ctx, struct junction_map);
if (!jn) {
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-static BOOL proxy_eventlog_call(pipes_struct *p, uint8 opnum)
+static bool proxy_eventlog_call(pipes_struct *p, uint8 opnum)
{
struct api_struct *fns;
int n_fns;
return fns[opnum].fn(p);
}
-static BOOL api_eventlog_open_eventlog(pipes_struct *p)
+static bool api_eventlog_open_eventlog(pipes_struct *p)
{
EVENTLOG_Q_OPEN_EVENTLOG q_u;
EVENTLOG_R_OPEN_EVENTLOG r_u;
return True;
}
-static BOOL api_eventlog_close_eventlog(pipes_struct *p)
+static bool api_eventlog_close_eventlog(pipes_struct *p)
{
return proxy_eventlog_call( p, NDR_EVENTLOG_CLOSEEVENTLOG );
}
-static BOOL api_eventlog_get_num_records(pipes_struct *p)
+static bool api_eventlog_get_num_records(pipes_struct *p)
{
EVENTLOG_Q_GET_NUM_RECORDS q_u;
EVENTLOG_R_GET_NUM_RECORDS r_u;
return True;
}
-static BOOL api_eventlog_get_oldest_entry(pipes_struct *p)
+static bool api_eventlog_get_oldest_entry(pipes_struct *p)
{
EVENTLOG_Q_GET_OLDEST_ENTRY q_u;
EVENTLOG_R_GET_OLDEST_ENTRY r_u;
return True;
}
-static BOOL api_eventlog_read_eventlog(pipes_struct *p)
+static bool api_eventlog_read_eventlog(pipes_struct *p)
{
EVENTLOG_Q_READ_EVENTLOG q_u;
EVENTLOG_R_READ_EVENTLOG r_u;
return True;
}
-static BOOL api_eventlog_clear_eventlog(pipes_struct *p)
+static bool api_eventlog_clear_eventlog(pipes_struct *p)
{
EVENTLOG_Q_CLEAR_EVENTLOG q_u;
EVENTLOG_R_CLEAR_EVENTLOG r_u;
return True if we made enough room to accommodate needed bytes
********************************************************************/
-BOOL make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
- BOOL whack_by_date )
+bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
+ bool whack_by_date )
{
int start_record, i, new_start;
int end_record;
calculate how many bytes we need to remove
********************************************************************/
-BOOL prune_eventlog( TDB_CONTEXT * tdb )
+bool prune_eventlog( TDB_CONTEXT * tdb )
{
int MaxSize, Retention, CalcdSize;
/********************************************************************
********************************************************************/
-BOOL can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed )
+bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed )
{
int calcd_size;
int MaxSize, Retention;
/*******************************************************************
*******************************************************************/
-ELOG_TDB *elog_open_tdb( char *logname, BOOL force_clear )
+ELOG_TDB *elog_open_tdb( char *logname, bool force_clear )
{
TDB_CONTEXT *tdb = NULL;
uint32 vers_id;
Wrapper to handle reference counts to the tdb
*******************************************************************/
-int elog_close_tdb( ELOG_TDB *etdb, BOOL force_close )
+int elog_close_tdb( ELOG_TDB *etdb, bool force_close )
{
TDB_CONTEXT *tdb;
going in.
********************************************************************/
-BOOL parse_logentry( char *line, Eventlog_entry * entry, BOOL * eor )
+bool parse_logentry( char *line, Eventlog_entry * entry, bool * eor )
{
char *start = NULL, *stop = NULL;
pstring temp;
/********************************************************************
********************************************************************/
-static BOOL elog_check_access( EVENTLOG_INFO *info, NT_USER_TOKEN *token )
+static bool elog_check_access( EVENTLOG_INFO *info, NT_USER_TOKEN *token )
{
char *tdbname = elog_tdbname( info->logname );
SEC_DESC *sec_desc;
- BOOL ret;
+ bool ret;
NTSTATUS ntstatus;
if ( !tdbname )
/********************************************************************
********************************************************************/
-static BOOL elog_validate_logname( const char *name )
+static bool elog_validate_logname( const char *name )
{
int i;
const char **elogs = lp_eventlog_list();
/********************************************************************
********************************************************************/
-static BOOL get_num_records_hook( EVENTLOG_INFO * info )
+static bool get_num_records_hook( EVENTLOG_INFO * info )
{
int next_record;
int oldest_record;
/********************************************************************
********************************************************************/
-static BOOL get_oldest_entry_hook( EVENTLOG_INFO * info )
+static bool get_oldest_entry_hook( EVENTLOG_INFO * info )
{
/* it's the same thing */
return get_num_records_hook( info );
since it uses the table to find the tdb handle
********************************************************************/
-static BOOL sync_eventlog_params( EVENTLOG_INFO *info )
+static bool sync_eventlog_params( EVENTLOG_INFO *info )
{
pstring path;
uint32 uiMaxSize;
/********************************************************************
********************************************************************/
-static BOOL add_record_to_resp( EVENTLOG_R_READ_EVENTLOG * r_u,
+static bool add_record_to_resp( EVENTLOG_R_READ_EVENTLOG * r_u,
Eventlog_entry * ee_new )
{
Eventlog_entry *insert_point;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-static BOOL proxy_lsa_call(pipes_struct *p, uint8 opnum)
+static bool proxy_lsa_call(pipes_struct *p, uint8 opnum)
{
struct api_struct *fns;
int n_fns;
api_lsa_open_policy2
***************************************************************************/
-static BOOL api_lsa_open_policy2(pipes_struct *p)
+static bool api_lsa_open_policy2(pipes_struct *p)
{
LSA_Q_OPEN_POL2 q_u;
LSA_R_OPEN_POL2 r_u;
api_lsa_open_policy
***************************************************************************/
-static BOOL api_lsa_open_policy(pipes_struct *p)
+static bool api_lsa_open_policy(pipes_struct *p)
{
LSA_Q_OPEN_POL q_u;
LSA_R_OPEN_POL r_u;
api_lsa_enum_trust_dom
***************************************************************************/
-static BOOL api_lsa_enum_trust_dom(pipes_struct *p)
+static bool api_lsa_enum_trust_dom(pipes_struct *p)
{
LSA_Q_ENUM_TRUST_DOM q_u;
LSA_R_ENUM_TRUST_DOM r_u;
api_lsa_query_info
***************************************************************************/
-static BOOL api_lsa_query_info(pipes_struct *p)
+static bool api_lsa_query_info(pipes_struct *p)
{
LSA_Q_QUERY_INFO q_u;
LSA_R_QUERY_INFO r_u;
api_lsa_lookup_sids
***************************************************************************/
-static BOOL api_lsa_lookup_sids(pipes_struct *p)
+static bool api_lsa_lookup_sids(pipes_struct *p)
{
LSA_Q_LOOKUP_SIDS q_u;
LSA_R_LOOKUP_SIDS r_u;
api_lsa_lookup_names
***************************************************************************/
-static BOOL api_lsa_lookup_names(pipes_struct *p)
+static bool api_lsa_lookup_names(pipes_struct *p)
{
LSA_Q_LOOKUP_NAMES q_u;
LSA_R_LOOKUP_NAMES r_u;
api_lsa_close.
***************************************************************************/
-static BOOL api_lsa_close(pipes_struct *p)
+static bool api_lsa_close(pipes_struct *p)
{
return proxy_lsa_call(p, NDR_LSA_CLOSE);
}
api_lsa_open_secret.
***************************************************************************/
-static BOOL api_lsa_open_secret(pipes_struct *p)
+static bool api_lsa_open_secret(pipes_struct *p)
{
return proxy_lsa_call(p, NDR_LSA_OPENSECRET);
}
api_lsa_open_secret.
***************************************************************************/
-static BOOL api_lsa_enum_privs(pipes_struct *p)
+static bool api_lsa_enum_privs(pipes_struct *p)
{
LSA_Q_ENUM_PRIVS q_u;
LSA_R_ENUM_PRIVS r_u;
api_lsa_open_secret.
***************************************************************************/
-static BOOL api_lsa_priv_get_dispname(pipes_struct *p)
+static bool api_lsa_priv_get_dispname(pipes_struct *p)
{
LSA_Q_PRIV_GET_DISPNAME q_u;
LSA_R_PRIV_GET_DISPNAME r_u;
api_lsa_open_secret.
***************************************************************************/
-static BOOL api_lsa_enum_accounts(pipes_struct *p)
+static bool api_lsa_enum_accounts(pipes_struct *p)
{
LSA_Q_ENUM_ACCOUNTS q_u;
LSA_R_ENUM_ACCOUNTS r_u;
api_lsa_UNK_GET_CONNUSER
***************************************************************************/
-static BOOL api_lsa_unk_get_connuser(pipes_struct *p)
+static bool api_lsa_unk_get_connuser(pipes_struct *p)
{
LSA_Q_UNK_GET_CONNUSER q_u;
LSA_R_UNK_GET_CONNUSER r_u;
api_lsa_create_user
***************************************************************************/
-static BOOL api_lsa_create_account(pipes_struct *p)
+static bool api_lsa_create_account(pipes_struct *p)
{
LSA_Q_CREATEACCOUNT q_u;
LSA_R_CREATEACCOUNT r_u;
api_lsa_open_user
***************************************************************************/
-static BOOL api_lsa_open_account(pipes_struct *p)
+static bool api_lsa_open_account(pipes_struct *p)
{
LSA_Q_OPENACCOUNT q_u;
LSA_R_OPENACCOUNT r_u;
api_lsa_get_privs
***************************************************************************/
-static BOOL api_lsa_enum_privsaccount(pipes_struct *p)
+static bool api_lsa_enum_privsaccount(pipes_struct *p)
{
LSA_Q_ENUMPRIVSACCOUNT q_u;
LSA_R_ENUMPRIVSACCOUNT r_u;
api_lsa_getsystemaccount
***************************************************************************/
-static BOOL api_lsa_getsystemaccount(pipes_struct *p)
+static bool api_lsa_getsystemaccount(pipes_struct *p)
{
LSA_Q_GETSYSTEMACCOUNT q_u;
LSA_R_GETSYSTEMACCOUNT r_u;
api_lsa_setsystemaccount
***************************************************************************/
-static BOOL api_lsa_setsystemaccount(pipes_struct *p)
+static bool api_lsa_setsystemaccount(pipes_struct *p)
{
LSA_Q_SETSYSTEMACCOUNT q_u;
LSA_R_SETSYSTEMACCOUNT r_u;
api_lsa_addprivs
***************************************************************************/
-static BOOL api_lsa_addprivs(pipes_struct *p)
+static bool api_lsa_addprivs(pipes_struct *p)
{
LSA_Q_ADDPRIVS q_u;
LSA_R_ADDPRIVS r_u;
api_lsa_removeprivs
***************************************************************************/
-static BOOL api_lsa_removeprivs(pipes_struct *p)
+static bool api_lsa_removeprivs(pipes_struct *p)
{
LSA_Q_REMOVEPRIVS q_u;
LSA_R_REMOVEPRIVS r_u;
api_lsa_query_secobj
***************************************************************************/
-static BOOL api_lsa_query_secobj(pipes_struct *p)
+static bool api_lsa_query_secobj(pipes_struct *p)
{
LSA_Q_QUERY_SEC_OBJ q_u;
LSA_R_QUERY_SEC_OBJ r_u;
api_lsa_add_acct_rights
***************************************************************************/
-static BOOL api_lsa_add_acct_rights(pipes_struct *p)
+static bool api_lsa_add_acct_rights(pipes_struct *p)
{
LSA_Q_ADD_ACCT_RIGHTS q_u;
LSA_R_ADD_ACCT_RIGHTS r_u;
api_lsa_remove_acct_rights
***************************************************************************/
-static BOOL api_lsa_remove_acct_rights(pipes_struct *p)
+static bool api_lsa_remove_acct_rights(pipes_struct *p)
{
LSA_Q_REMOVE_ACCT_RIGHTS q_u;
LSA_R_REMOVE_ACCT_RIGHTS r_u;
api_lsa_enum_acct_rights
***************************************************************************/
-static BOOL api_lsa_enum_acct_rights(pipes_struct *p)
+static bool api_lsa_enum_acct_rights(pipes_struct *p)
{
LSA_Q_ENUM_ACCT_RIGHTS q_u;
LSA_R_ENUM_ACCT_RIGHTS r_u;
api_lsa_lookup_priv_value
***************************************************************************/
-static BOOL api_lsa_lookup_priv_value(pipes_struct *p)
+static bool api_lsa_lookup_priv_value(pipes_struct *p)
{
LSA_Q_LOOKUP_PRIV_VALUE q_u;
LSA_R_LOOKUP_PRIV_VALUE r_u;
/***************************************************************************
***************************************************************************/
-static BOOL api_lsa_open_trust_dom(pipes_struct *p)
+static bool api_lsa_open_trust_dom(pipes_struct *p)
{
return proxy_lsa_call(p, NDR_LSA_OPENTRUSTEDDOMAIN);
}
/***************************************************************************
***************************************************************************/
-static BOOL api_lsa_create_trust_dom(pipes_struct *p)
+static bool api_lsa_create_trust_dom(pipes_struct *p)
{
return proxy_lsa_call(p, NDR_LSA_CREATETRUSTEDDOMAIN);
}
/***************************************************************************
***************************************************************************/
-static BOOL api_lsa_create_secret(pipes_struct *p)
+static bool api_lsa_create_secret(pipes_struct *p)
{
return proxy_lsa_call(p, NDR_LSA_CREATESECRET);
}
/***************************************************************************
***************************************************************************/
-static BOOL api_lsa_set_secret(pipes_struct *p)
+static bool api_lsa_set_secret(pipes_struct *p)
{
return proxy_lsa_call(p, NDR_LSA_SETSECRET);
}
/***************************************************************************
***************************************************************************/
-static BOOL api_lsa_delete_object(pipes_struct *p)
+static bool api_lsa_delete_object(pipes_struct *p)
{
LSA_Q_DELETE_OBJECT q_u;
LSA_R_DELETE_OBJECT r_u;
api_lsa_lookup_sids2
***************************************************************************/
-static BOOL api_lsa_lookup_sids2(pipes_struct *p)
+static bool api_lsa_lookup_sids2(pipes_struct *p)
{
LSA_Q_LOOKUP_SIDS2 q_u;
LSA_R_LOOKUP_SIDS2 r_u;
api_lsa_lookup_sids3
***************************************************************************/
-static BOOL api_lsa_lookup_sids3(pipes_struct *p)
+static bool api_lsa_lookup_sids3(pipes_struct *p)
{
LSA_Q_LOOKUP_SIDS3 q_u;
LSA_R_LOOKUP_SIDS3 r_u;
api_lsa_lookup_names2
***************************************************************************/
-static BOOL api_lsa_lookup_names2(pipes_struct *p)
+static bool api_lsa_lookup_names2(pipes_struct *p)
{
LSA_Q_LOOKUP_NAMES2 q_u;
LSA_R_LOOKUP_NAMES2 r_u;
api_lsa_lookup_names3
***************************************************************************/
-static BOOL api_lsa_lookup_names3(pipes_struct *p)
+static bool api_lsa_lookup_names3(pipes_struct *p)
{
LSA_Q_LOOKUP_NAMES3 q_u;
LSA_R_LOOKUP_NAMES3 r_u;
api_lsa_lookup_names4
***************************************************************************/
-static BOOL api_lsa_lookup_names4(pipes_struct *p)
+static bool api_lsa_lookup_names4(pipes_struct *p)
{
LSA_Q_LOOKUP_NAMES4 q_u;
LSA_R_LOOKUP_NAMES4 r_u;
api_lsa_query_info2
***************************************************************************/
-static BOOL api_lsa_query_info2(pipes_struct *p)
+static bool api_lsa_query_info2(pipes_struct *p)
{
LSA_Q_QUERY_INFO2 q_u;
LSA_R_QUERY_INFO2 r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_dsrole_get_primary_dominfo(pipes_struct *p)
+static bool api_dsrole_get_primary_dominfo(pipes_struct *p)
{
DS_Q_GETPRIMDOMINFO q_u;
DS_R_GETPRIMDOMINFO r_u;
stub functions for unimplemented RPC
*******************************************************************/
-static BOOL api_dsrole_stub( pipes_struct *p )
+static bool api_dsrole_stub( pipes_struct *p )
{
DEBUG(0,("api_dsrole_stub: Hmmm....didn't know this RPC existed...\n"));
pipe is open. JRA.
****************************************************************************/
-static BOOL is_samr_lsa_pipe(const char *pipe_name)
+static bool is_samr_lsa_pipe(const char *pipe_name)
{
return (strstr(pipe_name, "samr") || strstr(pipe_name, "lsa"));
}
pipes of the same name.
****************************************************************************/
-BOOL init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
+bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
{
pipes_struct *plist = get_first_internal_pipe();
struct handle_list *hl = NULL;
find first available policy slot. creates a policy handle for you.
****************************************************************************/
-BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr)
+bool create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr)
{
static uint32 pol_hnd_low = 0;
static uint32 pol_hnd_high = 0;
find policy by handle
****************************************************************************/
-BOOL find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p)
+bool find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p)
{
return find_policy_by_hnd_internal(p, hnd, data_p) == NULL ? False : True;
}
Close a policy.
****************************************************************************/
-BOOL close_policy_hnd(pipes_struct *p, POLICY_HND *hnd)
+bool close_policy_hnd(pipes_struct *p, POLICY_HND *hnd)
{
struct policy *pol = find_policy_by_hnd_internal(p, hnd, NULL);
token has enough access to access the pipe.
********************************************************************/
-BOOL pipe_access_check(pipes_struct *p)
+bool pipe_access_check(pipes_struct *p)
{
/* Don't let anonymous users access this RPC if restrict
anonymous > 0 */
api_net_req_chal:
*************************************************************************/
-static BOOL api_net_req_chal(pipes_struct *p)
+static bool api_net_req_chal(pipes_struct *p)
{
NET_Q_REQ_CHAL q_u;
NET_R_REQ_CHAL r_u;
api_net_auth:
*************************************************************************/
-static BOOL api_net_auth(pipes_struct *p)
+static bool api_net_auth(pipes_struct *p)
{
NET_Q_AUTH q_u;
NET_R_AUTH r_u;
api_net_auth_2:
*************************************************************************/
-static BOOL api_net_auth_2(pipes_struct *p)
+static bool api_net_auth_2(pipes_struct *p)
{
NET_Q_AUTH_2 q_u;
NET_R_AUTH_2 r_u;
api_net_srv_pwset:
*************************************************************************/
-static BOOL api_net_srv_pwset(pipes_struct *p)
+static bool api_net_srv_pwset(pipes_struct *p)
{
NET_Q_SRV_PWSET q_u;
NET_R_SRV_PWSET r_u;
api_net_sam_logoff:
*************************************************************************/
-static BOOL api_net_sam_logoff(pipes_struct *p)
+static bool api_net_sam_logoff(pipes_struct *p)
{
NET_Q_SAM_LOGOFF q_u;
NET_R_SAM_LOGOFF r_u;
api_net_sam_logon:
*************************************************************************/
-static BOOL api_net_sam_logon(pipes_struct *p)
+static bool api_net_sam_logon(pipes_struct *p)
{
NET_Q_SAM_LOGON q_u;
NET_R_SAM_LOGON r_u;
api_net_trust_dom_list:
*************************************************************************/
-static BOOL api_net_trust_dom_list(pipes_struct *p)
+static bool api_net_trust_dom_list(pipes_struct *p)
{
NET_Q_TRUST_DOM_LIST q_u;
NET_R_TRUST_DOM_LIST r_u;
api_net_logon_ctrl2:
*************************************************************************/
-static BOOL api_net_logon_ctrl2(pipes_struct *p)
+static bool api_net_logon_ctrl2(pipes_struct *p)
{
NET_Q_LOGON_CTRL2 q_u;
NET_R_LOGON_CTRL2 r_u;
api_net_logon_ctrl:
*************************************************************************/
-static BOOL api_net_logon_ctrl(pipes_struct *p)
+static bool api_net_logon_ctrl(pipes_struct *p)
{
NET_Q_LOGON_CTRL q_u;
NET_R_LOGON_CTRL r_u;
api_net_sam_logon_ex:
*************************************************************************/
-static BOOL api_net_sam_logon_ex(pipes_struct *p)
+static bool api_net_sam_logon_ex(pipes_struct *p)
{
NET_Q_SAM_LOGON_EX q_u;
NET_R_SAM_LOGON_EX r_u;
*************************************************************************/
#if 0 /* JERRY */
-static BOOL api_ds_enum_dom_trusts(pipes_struct *p)
+static bool api_ds_enum_dom_trusts(pipes_struct *p)
{
DS_Q_ENUM_DOM_TRUSTS q_u;
DS_R_ENUM_DOM_TRUSTS r_u;
{
struct samu *sampass = NULL;
const uint8 *pass;
- BOOL ret;
+ bool ret;
uint32 acct_ctrl;
#if 0
{
fstring remote_machine;
struct samu *sampass=NULL;
- BOOL ret = False;
+ bool ret = False;
unsigned char pwd[16];
int i;
uint32 acct_ctrl;
if (!p->dc) {
/* Restore the saved state of the netlogon creds. */
- BOOL ret;
+ bool ret;
become_root();
ret = secrets_restore_schannel_session_info(p->pipe_state_mem_ctx,
static NTSTATUS _net_sam_logon_internal(pipes_struct *p,
NET_Q_SAM_LOGON *q_u,
NET_R_SAM_LOGON *r_u,
- BOOL process_creds)
+ bool process_creds)
{
NTSTATUS status = NT_STATUS_OK;
NET_USER_INFO_3 *usr_info = NULL;
if (!p->dc) {
/* Restore the saved state of the netlogon creds. */
- BOOL ret;
+ bool ret;
become_root();
ret = secrets_restore_schannel_session_info(p->pipe_state_mem_ctx,
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_get_version(pipes_struct *p)
+static bool api_ntsvcs_get_version(pipes_struct *p)
{
NTSVCS_Q_GET_VERSION q_u;
NTSVCS_R_GET_VERSION r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_get_device_list_size(pipes_struct *p)
+static bool api_ntsvcs_get_device_list_size(pipes_struct *p)
{
NTSVCS_Q_GET_DEVICE_LIST_SIZE q_u;
NTSVCS_R_GET_DEVICE_LIST_SIZE r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_get_device_list(pipes_struct *p)
+static bool api_ntsvcs_get_device_list(pipes_struct *p)
{
NTSVCS_Q_GET_DEVICE_LIST q_u;
NTSVCS_R_GET_DEVICE_LIST r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_validate_device_instance(pipes_struct *p)
+static bool api_ntsvcs_validate_device_instance(pipes_struct *p)
{
NTSVCS_Q_VALIDATE_DEVICE_INSTANCE q_u;
NTSVCS_R_VALIDATE_DEVICE_INSTANCE r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_get_device_reg_property(pipes_struct *p)
+static bool api_ntsvcs_get_device_reg_property(pipes_struct *p)
{
NTSVCS_Q_GET_DEVICE_REG_PROPERTY q_u;
NTSVCS_R_GET_DEVICE_REG_PROPERTY r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_get_hw_profile_info(pipes_struct *p)
+static bool api_ntsvcs_get_hw_profile_info(pipes_struct *p)
{
NTSVCS_Q_GET_HW_PROFILE_INFO q_u;
NTSVCS_R_GET_HW_PROFILE_INFO r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_ntsvcs_hw_profile_flags(pipes_struct *p)
+static bool api_ntsvcs_hw_profile_flags(pipes_struct *p)
{
NTSVCS_Q_HW_PROFILE_FLAGS q_u;
NTSVCS_R_HW_PROFILE_FLAGS r_u;
Handle NTLMSSP.
********************************************************************/
-static BOOL create_next_pdu_ntlmssp(pipes_struct *p)
+static bool create_next_pdu_ntlmssp(pipes_struct *p)
{
RPC_HDR_RESP hdr_resp;
uint32 ss_padding_len = 0;
Return an schannel authenticated fragment.
********************************************************************/
-static BOOL create_next_pdu_schannel(pipes_struct *p)
+static bool create_next_pdu_schannel(pipes_struct *p)
{
RPC_HDR_RESP hdr_resp;
uint32 ss_padding_len = 0;
No authentication done.
********************************************************************/
-static BOOL create_next_pdu_noauth(pipes_struct *p)
+static bool create_next_pdu_noauth(pipes_struct *p)
{
RPC_HDR_RESP hdr_resp;
uint32 data_len;
Generate the next PDU to be returned from the data in p->rdata.
********************************************************************/
-BOOL create_next_pdu(pipes_struct *p)
+bool create_next_pdu(pipes_struct *p)
{
switch(p->auth.auth_level) {
case PIPE_AUTH_LEVEL_NONE:
the pipe struct.
*******************************************************************/
-static BOOL pipe_ntlmssp_verify_final(pipes_struct *p, DATA_BLOB *p_resp_blob)
+static bool pipe_ntlmssp_verify_final(pipes_struct *p, DATA_BLOB *p_resp_blob)
{
DATA_BLOB reply;
NTSTATUS status;
This is the "stage3" NTLMSSP response after a bind request and reply.
*******************************************************************/
-BOOL api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p)
+bool api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p)
{
RPC_HDR_AUTH auth_info;
uint32 pad;
Marshall a bind_nak pdu.
*******************************************************************/
-static BOOL setup_bind_nak(pipes_struct *p)
+static bool setup_bind_nak(pipes_struct *p)
{
prs_struct outgoing_rpc;
RPC_HDR nak_hdr;
Marshall a fault pdu.
*******************************************************************/
-BOOL setup_fault_pdu(pipes_struct *p, NTSTATUS status)
+bool setup_fault_pdu(pipes_struct *p, NTSTATUS status)
{
prs_struct outgoing_pdu;
RPC_HDR fault_hdr;
We should probably check the auth-verifier here.
*******************************************************************/
-BOOL setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p)
+bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p)
{
prs_struct outgoing_pdu;
RPC_HDR ack_reply_hdr;
Used to reject unknown binds from Win2k.
*******************************************************************/
-BOOL check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
+bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
RPC_IFACE* transfer, uint32 context_id)
{
char *pipe_name = p->name;
Handle a SPNEGO krb5 bind auth.
*******************************************************************/
-static BOOL pipe_spnego_auth_bind_kerberos(pipes_struct *p, prs_struct *rpc_in_p, RPC_HDR_AUTH *pauth_info,
+static bool pipe_spnego_auth_bind_kerberos(pipes_struct *p, prs_struct *rpc_in_p, RPC_HDR_AUTH *pauth_info,
DATA_BLOB *psecblob, prs_struct *pout_auth)
{
return False;
Handle the first part of a SPNEGO bind auth.
*******************************************************************/
-static BOOL pipe_spnego_auth_bind_negotiate(pipes_struct *p, prs_struct *rpc_in_p,
+static bool pipe_spnego_auth_bind_negotiate(pipes_struct *p, prs_struct *rpc_in_p,
RPC_HDR_AUTH *pauth_info, prs_struct *pout_auth)
{
DATA_BLOB blob;
char *OIDs[ASN1_MAX_OIDS];
int i;
NTSTATUS status;
- BOOL got_kerberos_mechanism = False;
+ bool got_kerberos_mechanism = False;
AUTH_NTLMSSP_STATE *a = NULL;
RPC_HDR_AUTH auth_info;
DEBUG(3,("pipe_spnego_auth_bind_negotiate: Got secblob of size %lu\n", (unsigned long)secblob.length));
if ( got_kerberos_mechanism && ((lp_security()==SEC_ADS) || lp_use_kerberos_keytab()) ) {
- BOOL ret = pipe_spnego_auth_bind_kerberos(p, rpc_in_p, pauth_info, &secblob, pout_auth);
+ bool ret = pipe_spnego_auth_bind_kerberos(p, rpc_in_p, pauth_info, &secblob, pout_auth);
data_blob_free(&secblob);
data_blob_free(&blob);
return ret;
Handle the second part of a SPNEGO bind auth.
*******************************************************************/
-static BOOL pipe_spnego_auth_bind_continue(pipes_struct *p, prs_struct *rpc_in_p,
+static bool pipe_spnego_auth_bind_continue(pipes_struct *p, prs_struct *rpc_in_p,
RPC_HDR_AUTH *pauth_info, prs_struct *pout_auth)
{
RPC_HDR_AUTH auth_info;
Handle an schannel bind auth.
*******************************************************************/
-static BOOL pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
+static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
RPC_HDR_AUTH *pauth_info, prs_struct *pout_auth)
{
RPC_HDR_AUTH auth_info;
RPC_AUTH_SCHANNEL_NEG neg;
RPC_AUTH_VERIFIER auth_verifier;
- BOOL ret;
+ bool ret;
struct dcinfo *pdcinfo;
uint32 flags;
Handle an NTLMSSP bind auth.
*******************************************************************/
-static BOOL pipe_ntlmssp_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
+static bool pipe_ntlmssp_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
RPC_HDR_AUTH *pauth_info, prs_struct *pout_auth)
{
RPC_HDR_AUTH auth_info;
Respond to a pipe bind request.
*******************************************************************/
-BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
+bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
{
RPC_HDR_BA hdr_ba;
RPC_HDR_RB hdr_rb;
SPNEGO calls.
****************************************************************************/
-BOOL api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
+bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
{
RPC_HDR_BA hdr_ba;
RPC_HDR_RB hdr_rb;
Deal with NTLMSSP sign & seal processing on an RPC request.
****************************************************************************/
-BOOL api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
+bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
uint32 *p_ss_padding_len, NTSTATUS *pstatus)
{
RPC_HDR_AUTH auth_info;
Deal with schannel processing on an RPC request.
****************************************************************************/
-BOOL api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss_padding_len)
+bool api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss_padding_len)
{
uint32 data_len;
uint32 auth_len;
before doing the call.
****************************************************************************/
-BOOL api_pipe_request(pipes_struct *p)
+bool api_pipe_request(pipes_struct *p)
{
- BOOL ret = False;
- BOOL changed_user = False;
+ bool ret = False;
+ bool changed_user = False;
PIPE_RPC_FNS *pipe_fns;
if (p->pipe_bound &&
Calls the underlying RPC function for a named pipe.
********************************************************************/
-BOOL api_rpcTNP(pipes_struct *p, const char *rpc_name,
+bool api_rpcTNP(pipes_struct *p, const char *rpc_name,
const struct api_struct *api_rpc_cmds, int n_cmds)
{
int fn_num;
*/
static ssize_t read_from_internal_pipe(void *np_conn, char *data, size_t n,
- BOOL *is_data_outstanding);
+ bool *is_data_outstanding);
static ssize_t write_to_internal_pipe(void *np_conn, char *data, size_t n);
-static BOOL close_internal_rpc_pipe_hnd(void *np_conn);
+static bool close_internal_rpc_pipe_hnd(void *np_conn);
static void *make_internal_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid);
Initialise an outgoing packet.
****************************************************************************/
-static BOOL pipe_init_outgoing_data(pipes_struct *p)
+static bool pipe_init_outgoing_data(pipes_struct *p)
{
output_data *o_data = &p->out_data;
int i;
smb_np_struct *p, *p_it;
static int next_pipe;
- BOOL is_spoolss_pipe = False;
+ bool is_spoolss_pipe = False;
DEBUG(4,("Open pipe requested %s (pipes_open=%d)\n",
pipe_name, pipes_open));
appends the data into the complete stream if the LAST flag is not set.
****************************************************************************/
-static BOOL process_request_pdu(pipes_struct *p, prs_struct *rpc_in_p)
+static bool process_request_pdu(pipes_struct *p, prs_struct *rpc_in_p)
{
uint32 ss_padding_len = 0;
size_t data_len = p->hdr.frag_len - RPC_HEADER_LEN - RPC_HDR_REQ_LEN -
}
if(p->hdr.flags & RPC_FLG_LAST) {
- BOOL ret = False;
+ bool ret = False;
/*
* Ok - we finally have a complete RPC stream.
* Call the rpc command to process it.
prs_struct rpc_in;
size_t data_len = p->in_data.pdu_received_len - RPC_HEADER_LEN;
char *data_p = (char *)&p->in_data.current_in_pdu[RPC_HEADER_LEN];
- BOOL reply = False;
+ bool reply = False;
if(p->fault_state) {
DEBUG(10,("process_complete_pdu: pipe %s in fault state.\n",
****************************************************************************/
ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n,
- BOOL *is_data_outstanding)
+ bool *is_data_outstanding)
{
if (!p || !p->open) {
DEBUG(0,("read_from_pipe: pipe not open\n"));
****************************************************************************/
static ssize_t read_from_internal_pipe(void *np_conn, char *data, size_t n,
- BOOL *is_data_outstanding)
+ bool *is_data_outstanding)
{
pipes_struct *p = (pipes_struct*)np_conn;
uint32 pdu_remaining = 0;
Wait device state on a pipe. Exactly what this is for is unknown...
****************************************************************************/
-BOOL wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority)
+bool wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority)
{
if (p == NULL) {
return False;
Set device state on a pipe. Exactly what this is for is unknown...
****************************************************************************/
-BOOL set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state)
+bool set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state)
{
if (p == NULL) {
return False;
Close an rpc pipe.
****************************************************************************/
-BOOL close_rpc_pipe_hnd(smb_np_struct *p)
+bool close_rpc_pipe_hnd(smb_np_struct *p)
{
if (!p) {
DEBUG(0,("Invalid pipe in close_rpc_pipe_hnd\n"));
Close an rpc pipe.
****************************************************************************/
-static BOOL close_internal_rpc_pipe_hnd(void *np_conn)
+static bool close_internal_rpc_pipe_hnd(void *np_conn)
{
pipes_struct *p = (pipes_struct *)np_conn;
if (!p) {
api_samr_close_hnd
********************************************************************/
-static BOOL api_samr_close_hnd(pipes_struct *p)
+static bool api_samr_close_hnd(pipes_struct *p)
{
SAMR_Q_CLOSE_HND q_u;
SAMR_R_CLOSE_HND r_u;
api_samr_open_domain
********************************************************************/
-static BOOL api_samr_open_domain(pipes_struct *p)
+static bool api_samr_open_domain(pipes_struct *p)
{
SAMR_Q_OPEN_DOMAIN q_u;
SAMR_R_OPEN_DOMAIN r_u;
api_samr_get_usrdom_pwinfo
********************************************************************/
-static BOOL api_samr_get_usrdom_pwinfo(pipes_struct *p)
+static bool api_samr_get_usrdom_pwinfo(pipes_struct *p)
{
SAMR_Q_GET_USRDOM_PWINFO q_u;
SAMR_R_GET_USRDOM_PWINFO r_u;
api_samr_set_sec_obj
********************************************************************/
-static BOOL api_samr_set_sec_obj(pipes_struct *p)
+static bool api_samr_set_sec_obj(pipes_struct *p)
{
SAMR_Q_SET_SEC_OBJ q_u;
SAMR_R_SET_SEC_OBJ r_u;
api_samr_query_sec_obj
********************************************************************/
-static BOOL api_samr_query_sec_obj(pipes_struct *p)
+static bool api_samr_query_sec_obj(pipes_struct *p)
{
SAMR_Q_QUERY_SEC_OBJ q_u;
SAMR_R_QUERY_SEC_OBJ r_u;
api_samr_enum_dom_users
********************************************************************/
-static BOOL api_samr_enum_dom_users(pipes_struct *p)
+static bool api_samr_enum_dom_users(pipes_struct *p)
{
SAMR_Q_ENUM_DOM_USERS q_u;
SAMR_R_ENUM_DOM_USERS r_u;
api_samr_enum_dom_groups
********************************************************************/
-static BOOL api_samr_enum_dom_groups(pipes_struct *p)
+static bool api_samr_enum_dom_groups(pipes_struct *p)
{
SAMR_Q_ENUM_DOM_GROUPS q_u;
SAMR_R_ENUM_DOM_GROUPS r_u;
api_samr_enum_dom_aliases
********************************************************************/
-static BOOL api_samr_enum_dom_aliases(pipes_struct *p)
+static bool api_samr_enum_dom_aliases(pipes_struct *p)
{
SAMR_Q_ENUM_DOM_ALIASES q_u;
SAMR_R_ENUM_DOM_ALIASES r_u;
api_samr_query_dispinfo
********************************************************************/
-static BOOL api_samr_query_dispinfo(pipes_struct *p)
+static bool api_samr_query_dispinfo(pipes_struct *p)
{
SAMR_Q_QUERY_DISPINFO q_u;
SAMR_R_QUERY_DISPINFO r_u;
api_samr_query_aliasinfo
********************************************************************/
-static BOOL api_samr_query_aliasinfo(pipes_struct *p)
+static bool api_samr_query_aliasinfo(pipes_struct *p)
{
SAMR_Q_QUERY_ALIASINFO q_u;
SAMR_R_QUERY_ALIASINFO r_u;
api_samr_lookup_names
********************************************************************/
-static BOOL api_samr_lookup_names(pipes_struct *p)
+static bool api_samr_lookup_names(pipes_struct *p)
{
SAMR_Q_LOOKUP_NAMES q_u;
SAMR_R_LOOKUP_NAMES r_u;
api_samr_chgpasswd_user
********************************************************************/
-static BOOL api_samr_chgpasswd_user(pipes_struct *p)
+static bool api_samr_chgpasswd_user(pipes_struct *p)
{
SAMR_Q_CHGPASSWD_USER q_u;
SAMR_R_CHGPASSWD_USER r_u;
api_samr_lookup_rids
********************************************************************/
-static BOOL api_samr_lookup_rids(pipes_struct *p)
+static bool api_samr_lookup_rids(pipes_struct *p)
{
SAMR_Q_LOOKUP_RIDS q_u;
SAMR_R_LOOKUP_RIDS r_u;
api_samr_open_user
********************************************************************/
-static BOOL api_samr_open_user(pipes_struct *p)
+static bool api_samr_open_user(pipes_struct *p)
{
SAMR_Q_OPEN_USER q_u;
SAMR_R_OPEN_USER r_u;
api_samr_query_userinfo
********************************************************************/
-static BOOL api_samr_query_userinfo(pipes_struct *p)
+static bool api_samr_query_userinfo(pipes_struct *p)
{
SAMR_Q_QUERY_USERINFO q_u;
SAMR_R_QUERY_USERINFO r_u;
api_samr_query_usergroups
********************************************************************/
-static BOOL api_samr_query_usergroups(pipes_struct *p)
+static bool api_samr_query_usergroups(pipes_struct *p)
{
SAMR_Q_QUERY_USERGROUPS q_u;
SAMR_R_QUERY_USERGROUPS r_u;
api_samr_query_domain_info
********************************************************************/
-static BOOL api_samr_query_domain_info(pipes_struct *p)
+static bool api_samr_query_domain_info(pipes_struct *p)
{
SAMR_Q_QUERY_DOMAIN_INFO q_u;
SAMR_R_QUERY_DOMAIN_INFO r_u;
api_samr_create_user
********************************************************************/
-static BOOL api_samr_create_user(pipes_struct *p)
+static bool api_samr_create_user(pipes_struct *p)
{
prs_struct *data = &p->in_data.data;
prs_struct *rdata = &p->out_data.rdata;
api_samr_connect_anon
********************************************************************/
-static BOOL api_samr_connect_anon(pipes_struct *p)
+static bool api_samr_connect_anon(pipes_struct *p)
{
SAMR_Q_CONNECT_ANON q_u;
SAMR_R_CONNECT_ANON r_u;
api_samr_connect
********************************************************************/
-static BOOL api_samr_connect(pipes_struct *p)
+static bool api_samr_connect(pipes_struct *p)
{
SAMR_Q_CONNECT q_u;
SAMR_R_CONNECT r_u;
api_samr_connect4
********************************************************************/
-static BOOL api_samr_connect4(pipes_struct *p)
+static bool api_samr_connect4(pipes_struct *p)
{
SAMR_Q_CONNECT4 q_u;
SAMR_R_CONNECT4 r_u;
api_samr_chgpasswd_user3
********************************************************************/
-static BOOL api_samr_chgpasswd_user3(pipes_struct *p)
+static bool api_samr_chgpasswd_user3(pipes_struct *p)
{
SAMR_Q_CHGPASSWD_USER3 q_u;
SAMR_R_CHGPASSWD_USER3 r_u;
api_samr_connect5
********************************************************************/
-static BOOL api_samr_connect5(pipes_struct *p)
+static bool api_samr_connect5(pipes_struct *p)
{
SAMR_Q_CONNECT5 q_u;
SAMR_R_CONNECT5 r_u;
api_samr_lookup_domain
**********************************************************************/
-static BOOL api_samr_lookup_domain(pipes_struct *p)
+static bool api_samr_lookup_domain(pipes_struct *p)
{
SAMR_Q_LOOKUP_DOMAIN q_u;
SAMR_R_LOOKUP_DOMAIN r_u;
api_samr_enum_domains
**********************************************************************/
-static BOOL api_samr_enum_domains(pipes_struct *p)
+static bool api_samr_enum_domains(pipes_struct *p)
{
SAMR_Q_ENUM_DOMAINS q_u;
SAMR_R_ENUM_DOMAINS r_u;
api_samr_open_alias
********************************************************************/
-static BOOL api_samr_open_alias(pipes_struct *p)
+static bool api_samr_open_alias(pipes_struct *p)
{
SAMR_Q_OPEN_ALIAS q_u;
SAMR_R_OPEN_ALIAS r_u;
api_samr_set_userinfo
********************************************************************/
-static BOOL api_samr_set_userinfo(pipes_struct *p)
+static bool api_samr_set_userinfo(pipes_struct *p)
{
SAMR_Q_SET_USERINFO q_u;
SAMR_R_SET_USERINFO r_u;
api_samr_set_userinfo2
********************************************************************/
-static BOOL api_samr_set_userinfo2(pipes_struct *p)
+static bool api_samr_set_userinfo2(pipes_struct *p)
{
SAMR_Q_SET_USERINFO2 q_u;
SAMR_R_SET_USERINFO2 r_u;
api_samr_query_useraliases
********************************************************************/
-static BOOL api_samr_query_useraliases(pipes_struct *p)
+static bool api_samr_query_useraliases(pipes_struct *p)
{
SAMR_Q_QUERY_USERALIASES q_u;
SAMR_R_QUERY_USERALIASES r_u;
api_samr_query_aliasmem
********************************************************************/
-static BOOL api_samr_query_aliasmem(pipes_struct *p)
+static bool api_samr_query_aliasmem(pipes_struct *p)
{
SAMR_Q_QUERY_ALIASMEM q_u;
SAMR_R_QUERY_ALIASMEM r_u;
api_samr_query_groupmem
********************************************************************/
-static BOOL api_samr_query_groupmem(pipes_struct *p)
+static bool api_samr_query_groupmem(pipes_struct *p)
{
SAMR_Q_QUERY_GROUPMEM q_u;
SAMR_R_QUERY_GROUPMEM r_u;
api_samr_add_aliasmem
********************************************************************/
-static BOOL api_samr_add_aliasmem(pipes_struct *p)
+static bool api_samr_add_aliasmem(pipes_struct *p)
{
SAMR_Q_ADD_ALIASMEM q_u;
SAMR_R_ADD_ALIASMEM r_u;
api_samr_del_aliasmem
********************************************************************/
-static BOOL api_samr_del_aliasmem(pipes_struct *p)
+static bool api_samr_del_aliasmem(pipes_struct *p)
{
SAMR_Q_DEL_ALIASMEM q_u;
SAMR_R_DEL_ALIASMEM r_u;
api_samr_add_groupmem
********************************************************************/
-static BOOL api_samr_add_groupmem(pipes_struct *p)
+static bool api_samr_add_groupmem(pipes_struct *p)
{
SAMR_Q_ADD_GROUPMEM q_u;
SAMR_R_ADD_GROUPMEM r_u;
api_samr_del_groupmem
********************************************************************/
-static BOOL api_samr_del_groupmem(pipes_struct *p)
+static bool api_samr_del_groupmem(pipes_struct *p)
{
SAMR_Q_DEL_GROUPMEM q_u;
SAMR_R_DEL_GROUPMEM r_u;
api_samr_delete_dom_user
********************************************************************/
-static BOOL api_samr_delete_dom_user(pipes_struct *p)
+static bool api_samr_delete_dom_user(pipes_struct *p)
{
SAMR_Q_DELETE_DOM_USER q_u;
SAMR_R_DELETE_DOM_USER r_u;
api_samr_delete_dom_group
********************************************************************/
-static BOOL api_samr_delete_dom_group(pipes_struct *p)
+static bool api_samr_delete_dom_group(pipes_struct *p)
{
SAMR_Q_DELETE_DOM_GROUP q_u;
SAMR_R_DELETE_DOM_GROUP r_u;
api_samr_delete_dom_alias
********************************************************************/
-static BOOL api_samr_delete_dom_alias(pipes_struct *p)
+static bool api_samr_delete_dom_alias(pipes_struct *p)
{
SAMR_Q_DELETE_DOM_ALIAS q_u;
SAMR_R_DELETE_DOM_ALIAS r_u;
api_samr_create_dom_group
********************************************************************/
-static BOOL api_samr_create_dom_group(pipes_struct *p)
+static bool api_samr_create_dom_group(pipes_struct *p)
{
SAMR_Q_CREATE_DOM_GROUP q_u;
SAMR_R_CREATE_DOM_GROUP r_u;
api_samr_create_dom_alias
********************************************************************/
-static BOOL api_samr_create_dom_alias(pipes_struct *p)
+static bool api_samr_create_dom_alias(pipes_struct *p)
{
SAMR_Q_CREATE_DOM_ALIAS q_u;
SAMR_R_CREATE_DOM_ALIAS r_u;
api_samr_query_groupinfo
********************************************************************/
-static BOOL api_samr_query_groupinfo(pipes_struct *p)
+static bool api_samr_query_groupinfo(pipes_struct *p)
{
SAMR_Q_QUERY_GROUPINFO q_u;
SAMR_R_QUERY_GROUPINFO r_u;
api_samr_set_groupinfo
********************************************************************/
-static BOOL api_samr_set_groupinfo(pipes_struct *p)
+static bool api_samr_set_groupinfo(pipes_struct *p)
{
SAMR_Q_SET_GROUPINFO q_u;
SAMR_R_SET_GROUPINFO r_u;
api_samr_set_aliasinfo
********************************************************************/
-static BOOL api_samr_set_aliasinfo(pipes_struct *p)
+static bool api_samr_set_aliasinfo(pipes_struct *p)
{
SAMR_Q_SET_ALIASINFO q_u;
SAMR_R_SET_ALIASINFO r_u;
api_samr_get_dom_pwinfo
********************************************************************/
-static BOOL api_samr_get_dom_pwinfo(pipes_struct *p)
+static bool api_samr_get_dom_pwinfo(pipes_struct *p)
{
SAMR_Q_GET_DOM_PWINFO q_u;
SAMR_R_GET_DOM_PWINFO r_u;
api_samr_open_group
********************************************************************/
-static BOOL api_samr_open_group(pipes_struct *p)
+static bool api_samr_open_group(pipes_struct *p)
{
SAMR_Q_OPEN_GROUP q_u;
SAMR_R_OPEN_GROUP r_u;
api_samr_remove_sid_foreign_domain
********************************************************************/
-static BOOL api_samr_remove_sid_foreign_domain(pipes_struct *p)
+static bool api_samr_remove_sid_foreign_domain(pipes_struct *p)
{
SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN q_u;
SAMR_R_REMOVE_SID_FOREIGN_DOMAIN r_u;
api_samr_query_dom_info2
********************************************************************/
-static BOOL api_samr_query_domain_info2(pipes_struct *p)
+static bool api_samr_query_domain_info2(pipes_struct *p)
{
SAMR_Q_QUERY_DOMAIN_INFO2 q_u;
SAMR_R_QUERY_DOMAIN_INFO2 r_u;
api_samr_set_dom_info
********************************************************************/
-static BOOL api_samr_set_dom_info(pipes_struct *p)
+static bool api_samr_set_dom_info(pipes_struct *p)
{
SAMR_Q_SET_DOMAIN_INFO q_u;
SAMR_R_SET_DOMAIN_INFO r_u;
typedef struct disp_info {
DOM_SID sid; /* identify which domain this is. */
- BOOL builtin_domain; /* Quick flag to check if this is the builtin domain. */
+ bool builtin_domain; /* Quick flag to check if this is the builtin domain. */
struct pdb_search *users; /* querydispinfo 1 and 4 */
struct pdb_search *machines; /* querydispinfo 2 */
struct pdb_search *groups; /* querydispinfo 3 and 5, enumgroups */
struct samr_info {
/* for use by the \PIPE\samr policy */
DOM_SID sid;
- BOOL builtin_domain; /* Quick flag to check if this is the builtin domain. */
+ bool builtin_domain; /* Quick flag to check if this is the builtin domain. */
uint32 status; /* some sort of flag. best to record it. comes from opnum 0x39 */
uint32 acc_granted;
DISP_INFO *disp_info;
/*******************************************************************
********************************************************************/
-static BOOL get_lsa_policy_samr_sid( pipes_struct *p, POLICY_HND *pol,
+static bool get_lsa_policy_samr_sid( pipes_struct *p, POLICY_HND *pol,
DOM_SID *sid, uint32 *acc_granted,
DISP_INFO **ppdisp_info)
{
DOM_SID pol_sid;
uint32 acc_granted, i;
SEC_ACL *dacl;
- BOOL ret;
+ bool ret;
struct samu *sampass=NULL;
NTSTATUS status;
/*******************************************************************
build correct perms based on policies and password times for _samr_query_sec_obj
*******************************************************************/
-static BOOL check_change_pw_access(TALLOC_CTX *mem_ctx, DOM_SID *user_sid)
+static bool check_change_pw_access(TALLOC_CTX *mem_ctx, DOM_SID *user_sid)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
if ( !(sampass = samu_new( mem_ctx )) ) {
DEBUG(0,("No memory!\n"));
makes a SAMR_R_LOOKUP_RIDS structure.
********************************************************************/
-static BOOL make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names,
+static bool make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names,
const char **names, UNIHDR **pp_hdr_name,
UNISTR2 **pp_uni_name)
{
uint32 acc_granted;
uint32 des_access = q_u->access_mask;
size_t sd_size;
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
SE_PRIV se_rights;
static NTSTATUS get_user_info_7(TALLOC_CTX *mem_ctx, SAM_USER_INFO_7 *id7, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if ( !(smbpass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
static NTSTATUS get_user_info_9(TALLOC_CTX *mem_ctx, SAM_USER_INFO_9 * id9, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if ( !(smbpass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
static NTSTATUS get_user_info_16(TALLOC_CTX *mem_ctx, SAM_USER_INFO_16 *id16, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if ( !(smbpass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
static NTSTATUS get_user_info_18(pipes_struct *p, TALLOC_CTX *mem_ctx, SAM_USER_INFO_18 * id18, DOM_SID *user_sid)
{
struct samu *smbpass=NULL;
- BOOL ret;
+ bool ret;
if (p->auth.auth_type != PIPE_AUTH_TYPE_NTLMSSP || p->auth.auth_type != PIPE_AUTH_TYPE_SPNEGO_NTLMSSP) {
return NT_STATUS_ACCESS_DENIED;
static NTSTATUS get_user_info_20(TALLOC_CTX *mem_ctx, SAM_USER_INFO_20 *id20, DOM_SID *user_sid)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
if ( !(sampass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
DOM_SID *user_sid, DOM_SID *domain_sid)
{
struct samu *sampass=NULL;
- BOOL ret;
+ bool ret;
NTSTATUS nt_status;
if ( !(sampass = samu_new( mem_ctx )) ) {
gid_t *unix_gids;
size_t i, num_gids;
uint32 acc_granted;
- BOOL ret;
+ bool ret;
NTSTATUS result;
- BOOL success = False;
+ bool success = False;
/*
* from the SID in the request:
static NTSTATUS can_create(TALLOC_CTX *mem_ctx, const char *new_name)
{
enum lsa_SidType type;
- BOOL result;
+ bool result;
DEBUG(10, ("Checking whether [%s] can be created\n", new_name));
size_t sd_size;
/* check this, when giving away 'add computer to domain' privs */
uint32 des_access = GENERIC_RIGHTS_USER_ALL_ACCESS;
- BOOL can_add_account = False;
+ bool can_add_account = False;
SE_PRIV se_rights;
DISP_INFO *disp_info = NULL;
makes a SAMR_R_ENUM_DOMAINS structure.
********************************************************************/
-static BOOL make_enum_domains(TALLOC_CTX *ctx, SAM_ENTRY **pp_sam,
+static bool make_enum_domains(TALLOC_CTX *ctx, SAM_ENTRY **pp_sam,
UNISTR2 **pp_uni_name, uint32 num_sam_entries, fstring doms[])
{
uint32 i;
{
/* Check we actually have the requested alias */
enum lsa_SidType type;
- BOOL result;
+ bool result;
gid_t gid;
become_root();
set_user_info_16
********************************************************************/
-static BOOL set_user_info_16(const SAM_USER_INFO_16 *id16, struct samu *pwd)
+static bool set_user_info_16(const SAM_USER_INFO_16 *id16, struct samu *pwd)
{
if (id16 == NULL) {
DEBUG(5, ("set_user_info_16: NULL id16\n"));
set_user_info_18
********************************************************************/
-static BOOL set_user_info_18(SAM_USER_INFO_18 *id18, struct samu *pwd)
+static bool set_user_info_18(SAM_USER_INFO_18 *id18, struct samu *pwd)
{
if (id18 == NULL) {
set_user_info_20
********************************************************************/
-static BOOL set_user_info_20(SAM_USER_INFO_20 *id20, struct samu *pwd)
+static bool set_user_info_20(SAM_USER_INFO_20 *id20, struct samu *pwd)
{
if (id20 == NULL) {
DEBUG(5, ("set_user_info_20: NULL id20\n"));
set_user_info_pw
********************************************************************/
-static BOOL set_user_info_pw(uint8 *pass, struct samu *pwd)
+static bool set_user_info_pw(uint8 *pass, struct samu *pwd)
{
uint32 len;
pstring plaintext_buf;
SAM_USERINFO_CTR *ctr = q_u->ctr;
uint32 acc_granted;
uint32 acc_required;
- BOOL ret;
- BOOL has_enough_rights = False;
+ bool ret;
+ bool has_enough_rights = False;
uint32 acb_info;
DISP_INFO *disp_info = NULL;
uint16 switch_value = q_u->switch_value;
uint32 acc_granted;
uint32 acc_required;
- BOOL ret;
- BOOL has_enough_rights = False;
+ bool ret;
+ bool has_enough_rights = False;
uint32 acb_info;
DISP_INFO *disp_info = NULL;
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
NTSTATUS ret;
DISP_INFO *disp_info = NULL;
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
NTSTATUS ret;
DISP_INFO *disp_info = NULL;
uint32 group_rid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
uint32 group_rid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/*
DOM_SID user_sid;
struct samu *sam_pass=NULL;
uint32 acc_granted;
- BOOL can_add_accounts;
+ bool can_add_accounts;
uint32 acb_info;
DISP_INFO *disp_info = NULL;
- BOOL ret;
+ bool ret;
DEBUG(5, ("_samr_delete_dom_user: %d\n", __LINE__));
uint32 group_rid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
DEBUG(5, ("samr_delete_dom_group: %d\n", __LINE__));
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
NTSTATUS status;
DISP_INFO *disp_info = NULL;
struct samr_info *info;
uint32 acc_granted;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
gid_t gid;
NTSTATUS result;
SE_PRIV se_rights;
- BOOL can_add_accounts;
+ bool can_add_accounts;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
GROUP_MAP map;
GROUP_INFO_CTR *ctr;
uint32 acc_granted;
- BOOL ret;
+ bool ret;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted, NULL))
return NT_STATUS_INVALID_HANDLE;
GROUP_INFO_CTR *ctr;
uint32 acc_granted;
NTSTATUS ret;
- BOOL result;
- BOOL can_mod_accounts;
+ bool result;
+ bool can_mod_accounts;
DISP_INFO *disp_info = NULL;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted, &disp_info))
struct acct_info info;
ALIAS_INFO_CTR *ctr;
uint32 acc_granted;
- BOOL can_mod_accounts;
+ bool can_mod_accounts;
NTSTATUS status;
DISP_INFO *disp_info = NULL;
size_t sd_size;
NTSTATUS status;
fstring sid_string;
- BOOL ret;
+ bool ret;
SE_PRIV se_rights;
if (!get_lsa_policy_samr_sid(p, &q_u->domain_pol, &sid, &acc_granted, NULL))
* api_spoolss_open_printer_ex (rarely seen - older call)
********************************************************************/
-static BOOL api_spoolss_open_printer(pipes_struct *p)
+static bool api_spoolss_open_printer(pipes_struct *p)
{
SPOOL_Q_OPEN_PRINTER q_u;
SPOOL_R_OPEN_PRINTER r_u;
* api_spoolss_open_printer_ex
********************************************************************/
-static BOOL api_spoolss_open_printer_ex(pipes_struct *p)
+static bool api_spoolss_open_printer_ex(pipes_struct *p)
{
SPOOL_Q_OPEN_PRINTER_EX q_u;
SPOOL_R_OPEN_PRINTER_EX r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_getprinterdata(pipes_struct *p)
+static bool api_spoolss_getprinterdata(pipes_struct *p)
{
SPOOL_Q_GETPRINTERDATA q_u;
SPOOL_R_GETPRINTERDATA r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_deleteprinterdata(pipes_struct *p)
+static bool api_spoolss_deleteprinterdata(pipes_struct *p)
{
SPOOL_Q_DELETEPRINTERDATA q_u;
SPOOL_R_DELETEPRINTERDATA r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_closeprinter(pipes_struct *p)
+static bool api_spoolss_closeprinter(pipes_struct *p)
{
SPOOL_Q_CLOSEPRINTER q_u;
SPOOL_R_CLOSEPRINTER r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_abortprinter(pipes_struct *p)
+static bool api_spoolss_abortprinter(pipes_struct *p)
{
SPOOL_Q_ABORTPRINTER q_u;
SPOOL_R_ABORTPRINTER r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_deleteprinter(pipes_struct *p)
+static bool api_spoolss_deleteprinter(pipes_struct *p)
{
SPOOL_Q_DELETEPRINTER q_u;
SPOOL_R_DELETEPRINTER r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_deleteprinterdriver(pipes_struct *p)
+static bool api_spoolss_deleteprinterdriver(pipes_struct *p)
{
SPOOL_Q_DELETEPRINTERDRIVER q_u;
SPOOL_R_DELETEPRINTERDRIVER r_u;
* ReplyFindFirstPrinterChangeNotifyEx
********************************************************************/
-static BOOL api_spoolss_rffpcnex(pipes_struct *p)
+static bool api_spoolss_rffpcnex(pipes_struct *p)
{
SPOOL_Q_RFFPCNEX q_u;
SPOOL_R_RFFPCNEX r_u;
* JRA.
********************************************************************/
-static BOOL api_spoolss_rfnpcnex(pipes_struct *p)
+static bool api_spoolss_rfnpcnex(pipes_struct *p)
{
SPOOL_Q_RFNPCNEX q_u;
SPOOL_R_RFNPCNEX r_u;
*
********************************************************************/
-static BOOL api_spoolss_enumprinters(pipes_struct *p)
+static bool api_spoolss_enumprinters(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTERS q_u;
SPOOL_R_ENUMPRINTERS r_u;
*
********************************************************************/
-static BOOL api_spoolss_getprinter(pipes_struct *p)
+static bool api_spoolss_getprinter(pipes_struct *p)
{
SPOOL_Q_GETPRINTER q_u;
SPOOL_R_GETPRINTER r_u;
*
********************************************************************/
-static BOOL api_spoolss_getprinterdriver2(pipes_struct *p)
+static bool api_spoolss_getprinterdriver2(pipes_struct *p)
{
SPOOL_Q_GETPRINTERDRIVER2 q_u;
SPOOL_R_GETPRINTERDRIVER2 r_u;
*
********************************************************************/
-static BOOL api_spoolss_startpageprinter(pipes_struct *p)
+static bool api_spoolss_startpageprinter(pipes_struct *p)
{
SPOOL_Q_STARTPAGEPRINTER q_u;
SPOOL_R_STARTPAGEPRINTER r_u;
*
********************************************************************/
-static BOOL api_spoolss_endpageprinter(pipes_struct *p)
+static bool api_spoolss_endpageprinter(pipes_struct *p)
{
SPOOL_Q_ENDPAGEPRINTER q_u;
SPOOL_R_ENDPAGEPRINTER r_u;
/********************************************************************
********************************************************************/
-static BOOL api_spoolss_startdocprinter(pipes_struct *p)
+static bool api_spoolss_startdocprinter(pipes_struct *p)
{
SPOOL_Q_STARTDOCPRINTER q_u;
SPOOL_R_STARTDOCPRINTER r_u;
/********************************************************************
********************************************************************/
-static BOOL api_spoolss_enddocprinter(pipes_struct *p)
+static bool api_spoolss_enddocprinter(pipes_struct *p)
{
SPOOL_Q_ENDDOCPRINTER q_u;
SPOOL_R_ENDDOCPRINTER r_u;
/********************************************************************
********************************************************************/
-static BOOL api_spoolss_writeprinter(pipes_struct *p)
+static bool api_spoolss_writeprinter(pipes_struct *p)
{
SPOOL_Q_WRITEPRINTER q_u;
SPOOL_R_WRITEPRINTER r_u;
****************************************************************************/
-static BOOL api_spoolss_setprinter(pipes_struct *p)
+static bool api_spoolss_setprinter(pipes_struct *p)
{
SPOOL_Q_SETPRINTER q_u;
SPOOL_R_SETPRINTER r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_fcpn(pipes_struct *p)
+static bool api_spoolss_fcpn(pipes_struct *p)
{
SPOOL_Q_FCPN q_u;
SPOOL_R_FCPN r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_addjob(pipes_struct *p)
+static bool api_spoolss_addjob(pipes_struct *p)
{
SPOOL_Q_ADDJOB q_u;
SPOOL_R_ADDJOB r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumjobs(pipes_struct *p)
+static bool api_spoolss_enumjobs(pipes_struct *p)
{
SPOOL_Q_ENUMJOBS q_u;
SPOOL_R_ENUMJOBS r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_schedulejob(pipes_struct *p)
+static bool api_spoolss_schedulejob(pipes_struct *p)
{
SPOOL_Q_SCHEDULEJOB q_u;
SPOOL_R_SCHEDULEJOB r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_setjob(pipes_struct *p)
+static bool api_spoolss_setjob(pipes_struct *p)
{
SPOOL_Q_SETJOB q_u;
SPOOL_R_SETJOB r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprinterdrivers(pipes_struct *p)
+static bool api_spoolss_enumprinterdrivers(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTERDRIVERS q_u;
SPOOL_R_ENUMPRINTERDRIVERS r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_getform(pipes_struct *p)
+static bool api_spoolss_getform(pipes_struct *p)
{
SPOOL_Q_GETFORM q_u;
SPOOL_R_GETFORM r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumforms(pipes_struct *p)
+static bool api_spoolss_enumforms(pipes_struct *p)
{
SPOOL_Q_ENUMFORMS q_u;
SPOOL_R_ENUMFORMS r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumports(pipes_struct *p)
+static bool api_spoolss_enumports(pipes_struct *p)
{
SPOOL_Q_ENUMPORTS q_u;
SPOOL_R_ENUMPORTS r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_addprinterex(pipes_struct *p)
+static bool api_spoolss_addprinterex(pipes_struct *p)
{
SPOOL_Q_ADDPRINTEREX q_u;
SPOOL_R_ADDPRINTEREX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_addprinterdriver(pipes_struct *p)
+static bool api_spoolss_addprinterdriver(pipes_struct *p)
{
SPOOL_Q_ADDPRINTERDRIVER q_u;
SPOOL_R_ADDPRINTERDRIVER r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_getprinterdriverdirectory(pipes_struct *p)
+static bool api_spoolss_getprinterdriverdirectory(pipes_struct *p)
{
SPOOL_Q_GETPRINTERDRIVERDIR q_u;
SPOOL_R_GETPRINTERDRIVERDIR r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprinterdata(pipes_struct *p)
+static bool api_spoolss_enumprinterdata(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTERDATA q_u;
SPOOL_R_ENUMPRINTERDATA r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_setprinterdata(pipes_struct *p)
+static bool api_spoolss_setprinterdata(pipes_struct *p)
{
SPOOL_Q_SETPRINTERDATA q_u;
SPOOL_R_SETPRINTERDATA r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_reset_printer(pipes_struct *p)
+static bool api_spoolss_reset_printer(pipes_struct *p)
{
SPOOL_Q_RESETPRINTER q_u;
SPOOL_R_RESETPRINTER r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_addform(pipes_struct *p)
+static bool api_spoolss_addform(pipes_struct *p)
{
SPOOL_Q_ADDFORM q_u;
SPOOL_R_ADDFORM r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_deleteform(pipes_struct *p)
+static bool api_spoolss_deleteform(pipes_struct *p)
{
SPOOL_Q_DELETEFORM q_u;
SPOOL_R_DELETEFORM r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_setform(pipes_struct *p)
+static bool api_spoolss_setform(pipes_struct *p)
{
SPOOL_Q_SETFORM q_u;
SPOOL_R_SETFORM r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprintprocessors(pipes_struct *p)
+static bool api_spoolss_enumprintprocessors(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTPROCESSORS q_u;
SPOOL_R_ENUMPRINTPROCESSORS r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_addprintprocessor(pipes_struct *p)
+static bool api_spoolss_addprintprocessor(pipes_struct *p)
{
SPOOL_Q_ADDPRINTPROCESSOR q_u;
SPOOL_R_ADDPRINTPROCESSOR r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprintprocdatatypes(pipes_struct *p)
+static bool api_spoolss_enumprintprocdatatypes(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTPROCDATATYPES q_u;
SPOOL_R_ENUMPRINTPROCDATATYPES r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprintmonitors(pipes_struct *p)
+static bool api_spoolss_enumprintmonitors(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTMONITORS q_u;
SPOOL_R_ENUMPRINTMONITORS r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_getjob(pipes_struct *p)
+static bool api_spoolss_getjob(pipes_struct *p)
{
SPOOL_Q_GETJOB q_u;
SPOOL_R_GETJOB r_u;
* called from the spoolss dispatcher
********************************************************************/
-static BOOL api_spoolss_getprinterdataex(pipes_struct *p)
+static bool api_spoolss_getprinterdataex(pipes_struct *p)
{
SPOOL_Q_GETPRINTERDATAEX q_u;
SPOOL_R_GETPRINTERDATAEX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_setprinterdataex(pipes_struct *p)
+static bool api_spoolss_setprinterdataex(pipes_struct *p)
{
SPOOL_Q_SETPRINTERDATAEX q_u;
SPOOL_R_SETPRINTERDATAEX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprinterkey(pipes_struct *p)
+static bool api_spoolss_enumprinterkey(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTERKEY q_u;
SPOOL_R_ENUMPRINTERKEY r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_enumprinterdataex(pipes_struct *p)
+static bool api_spoolss_enumprinterdataex(pipes_struct *p)
{
SPOOL_Q_ENUMPRINTERDATAEX q_u;
SPOOL_R_ENUMPRINTERDATAEX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p)
+static bool api_spoolss_getprintprocessordirectory(pipes_struct *p)
{
SPOOL_Q_GETPRINTPROCESSORDIRECTORY q_u;
SPOOL_R_GETPRINTPROCESSORDIRECTORY r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_deleteprinterdataex(pipes_struct *p)
+static bool api_spoolss_deleteprinterdataex(pipes_struct *p)
{
SPOOL_Q_DELETEPRINTERDATAEX q_u;
SPOOL_R_DELETEPRINTERDATAEX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_deleteprinterkey(pipes_struct *p)
+static bool api_spoolss_deleteprinterkey(pipes_struct *p)
{
SPOOL_Q_DELETEPRINTERKEY q_u;
SPOOL_R_DELETEPRINTERKEY r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_addprinterdriverex(pipes_struct *p)
+static bool api_spoolss_addprinterdriverex(pipes_struct *p)
{
SPOOL_Q_ADDPRINTERDRIVEREX q_u;
SPOOL_R_ADDPRINTERDRIVEREX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_deleteprinterdriverex(pipes_struct *p)
+static bool api_spoolss_deleteprinterdriverex(pipes_struct *p)
{
SPOOL_Q_DELETEPRINTERDRIVEREX q_u;
SPOOL_R_DELETEPRINTERDRIVEREX r_u;
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_xcvdataport(pipes_struct *p)
+static bool api_spoolss_xcvdataport(pipes_struct *p)
{
SPOOL_Q_XCVDATAPORT q_u;
SPOOL_R_XCVDATAPORT r_u;
Close printer index by handle.
****************************************************************************/
-static BOOL close_printer_handle(pipes_struct *p, POLICY_HND *hnd)
+static bool close_printer_handle(pipes_struct *p, POLICY_HND *hnd)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
pstring command;
int ret;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
- BOOL is_print_op = False;
+ bool is_print_op = False;
/* can't fail if we don't try */
Return the snum of a printer corresponding to an handle.
****************************************************************************/
-static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number,
+static bool get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number,
struct share_params **params)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
Check if it's \\server or \\server\printer
****************************************************************************/
-static BOOL set_printer_hnd_printertype(Printer_entry *Printer, char *handlename)
+static bool set_printer_hnd_printertype(Printer_entry *Printer, char *handlename)
{
DEBUG(3,("Setting printer type=%s\n", handlename));
XcvDataPort() interface.
****************************************************************************/
-static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename)
+static bool set_printer_hnd_name(Printer_entry *Printer, char *handlename)
{
int snum;
int n_services=lp_numservices();
char *aprinter, *printername;
const char *servername;
fstring sname;
- BOOL found=False;
+ bool found=False;
NT_PRINTER_INFO_LEVEL *printer = NULL;
WERROR result;
Find first available printer slot. creates a printer handle for you.
****************************************************************************/
-static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name, uint32 access_granted)
+static bool open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name, uint32 access_granted)
{
Printer_entry *new_printer;
given by (notify_type, notify_field).
**************************************************************************/
-static BOOL is_monitoring_event_flags(uint32 flags, uint16 notify_type,
+static bool is_monitoring_event_flags(uint32 flags, uint16 notify_type,
uint16 notify_field)
{
return True;
}
-static BOOL is_monitoring_event(Printer_entry *p, uint16 notify_type,
+static bool is_monitoring_event(Printer_entry *p, uint16 notify_type,
uint16 notify_field)
{
SPOOL_NOTIFY_OPTION *option = p->notify.option;
/***********************************************************************
**********************************************************************/
-static BOOL notify2_unpack_msg( SPOOLSS_NOTIFY_MSG *msg, struct timeval *tv, void *buf, size_t len )
+static bool notify2_unpack_msg( SPOOLSS_NOTIFY_MSG *msg, struct timeval *tv, void *buf, size_t len )
{
uint32 tv_sec, tv_usec;
driver
********************************************************************/
-static BOOL srv_spoolss_drv_upgrade_printer(char* drivername)
+static bool srv_spoolss_drv_upgrade_printer(char* drivername)
{
int len = strlen(drivername);
driver
********************************************************************/
-static BOOL srv_spoolss_reset_printerdata(char* drivername)
+static bool srv_spoolss_reset_printerdata(char* drivername)
{
int len = strlen(drivername);
/****************************************************************************
****************************************************************************/
-static BOOL convert_printer_info(const SPOOL_PRINTER_INFO_LEVEL *uni,
+static bool convert_printer_info(const SPOOL_PRINTER_INFO_LEVEL *uni,
NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
- BOOL ret;
+ bool ret;
switch (level) {
case 2:
return False;
}
-static BOOL convert_printer_driver_info(const SPOOL_PRINTER_DRIVER_INFO_LEVEL *uni,
+static bool convert_printer_driver_info(const SPOOL_PRINTER_DRIVER_INFO_LEVEL *uni,
NT_PRINTER_DRIVER_INFO_LEVEL *printer, uint32 level)
{
- BOOL result = True;
+ bool result = True;
switch (level) {
case 3:
return result;
}
-BOOL convert_devicemode(const char *printername, const DEVICEMODE *devmode,
+bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
NT_DEVICEMODE **pp_nt_devmode)
{
NT_DEVICEMODE *nt_devmode = *pp_nt_devmode;
NT_PRINTER_DRIVER_INFO_LEVEL info_win2k;
int version;
uint32 flags = q_u->delete_flags;
- BOOL delete_files;
+ bool delete_files;
WERROR status;
WERROR status_win2k = WERR_ACCESS_DENIED;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
Connect to the client machine.
**********************************************************/
-static BOOL spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
+static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
struct in_addr *client_ip, const char *remote_machine)
{
NTSTATUS ret;
Connect to the client.
****************************************************************************/
-static BOOL srv_spoolss_replyopenprinter(int snum, const char *printer,
+static bool srv_spoolss_replyopenprinter(int snum, const char *printer,
uint32 localprinter, uint32 type,
POLICY_HND *handle, struct in_addr *client_ip)
{
/****************************************************************************
****************************************************************************/
-static BOOL search_notify(uint16 type, uint16 field, int *value)
+static bool search_notify(uint16 type, uint16 field, int *value)
{
int i;
*
********************************************************************/
-static BOOL construct_notify_printer_info(Printer_entry *print_hnd, SPOOL_NOTIFY_INFO *info, int
+static bool construct_notify_printer_info(Printer_entry *print_hnd, SPOOL_NOTIFY_INFO *info, int
snum, SPOOL_NOTIFY_OPTION_TYPE
*option_type, uint32 id,
TALLOC_CTX *mem_ctx)
*
********************************************************************/
-static BOOL construct_notify_jobs_info(print_queue_struct *queue,
+static bool construct_notify_jobs_info(print_queue_struct *queue,
SPOOL_NOTIFY_INFO *info,
NT_PRINTER_INFO_LEVEL *printer,
int snum, SPOOL_NOTIFY_OPTION_TYPE
* fill a printer_info_0 struct
********************************************************************/
-static BOOL construct_printer_info_0(Printer_entry *print_hnd, PRINTER_INFO_0 *printer, int snum)
+static bool construct_printer_info_0(Printer_entry *print_hnd, PRINTER_INFO_0 *printer, int snum)
{
pstring chaine;
int count;
* construct_printer_info_1
* fill a printer_info_1 struct
********************************************************************/
-static BOOL construct_printer_info_1(Printer_entry *print_hnd, uint32 flags, PRINTER_INFO_1 *printer, int snum)
+static bool construct_printer_info_1(Printer_entry *print_hnd, uint32 flags, PRINTER_INFO_1 *printer, int snum)
{
pstring chaine;
pstring chaine2;
should be valid upon entry
****************************************************************************/
-static BOOL convert_nt_devicemode( DEVICEMODE *devmode, NT_DEVICEMODE *ntdevmode )
+static bool convert_nt_devicemode( DEVICEMODE *devmode, NT_DEVICEMODE *ntdevmode )
{
if ( !devmode || !ntdevmode )
return False;
* fill a printer_info_2 struct
********************************************************************/
-static BOOL construct_printer_info_2(Printer_entry *print_hnd, PRINTER_INFO_2 *printer, int snum)
+static bool construct_printer_info_2(Printer_entry *print_hnd, PRINTER_INFO_2 *printer, int snum)
{
int count;
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
* fill a printer_info_3 struct
********************************************************************/
-static BOOL construct_printer_info_3(Printer_entry *print_hnd, PRINTER_INFO_3 **pp_printer, int snum)
+static bool construct_printer_info_3(Printer_entry *print_hnd, PRINTER_INFO_3 **pp_printer, int snum)
{
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
PRINTER_INFO_3 *printer = NULL;
* fill a printer_info_4 struct
********************************************************************/
-static BOOL construct_printer_info_4(Printer_entry *print_hnd, PRINTER_INFO_4 *printer, int snum)
+static bool construct_printer_info_4(Printer_entry *print_hnd, PRINTER_INFO_4 *printer, int snum)
{
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
* fill a printer_info_5 struct
********************************************************************/
-static BOOL construct_printer_info_5(Printer_entry *print_hnd, PRINTER_INFO_5 *printer, int snum)
+static bool construct_printer_info_5(Printer_entry *print_hnd, PRINTER_INFO_5 *printer, int snum)
{
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
* fill a printer_info_6 struct
********************************************************************/
-static BOOL construct_printer_info_6(Printer_entry *print_hnd,
+static bool construct_printer_info_6(Printer_entry *print_hnd,
PRINTER_INFO_6 *printer,
int snum)
{
* fill a printer_info_7 struct
********************************************************************/
-static BOOL construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *printer, int snum)
+static bool construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *printer, int snum)
{
char *guid_str = NULL;
struct GUID guid;
_spoolss_open_printer_ex().
********************************************************************/
-static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum)
+static bool check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum)
{
fstring printername;
const char *p;
int ret;
int fd;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
- BOOL is_print_op = False;
+ bool is_print_op = False;
if ( !*cmd ) {
return WERR_ACCESS_DENIED;
/****************************************************************************
****************************************************************************/
-BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer)
+bool add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer)
{
char *cmd = lp_addprinter_cmd();
char **qlines;
int fd;
fstring remote_machine = "%m";
SE_PRIV se_printop = SE_PRINT_OPERATOR;
- BOOL is_print_op = False;
+ bool is_print_op = False;
standard_sub_basic(current_user_info.smb_name,
current_user_info.domain,
/****************************************************************************
****************************************************************************/
-static BOOL fill_job_info_2(JOB_INFO_2 *job_info, const print_queue_struct *queue,
+static bool fill_job_info_2(JOB_INFO_2 *job_info, const print_queue_struct *queue,
int position, int snum,
const NT_PRINTER_INFO_LEVEL *ntprinter,
DEVICEMODE *devmode)
nt_forms_struct *list=NULL;
nt_forms_struct builtin_form;
- BOOL foundBuiltin;
+ bool foundBuiltin;
FORM_1 form_1;
fstring form_name;
int buffer_size=0;
uint32 *needed)
{
int i=0;
- BOOL found=False;
+ bool found=False;
JOB_INFO_1 *info_1=NULL;
WERROR result = WERR_OK;
uint32 *needed)
{
int i = 0;
- BOOL found = False;
+ bool found = False;
JOB_INFO_2 *info_2;
WERROR result;
DEVICEMODE *devmode = NULL;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-static BOOL proxy_srvsvc_call(pipes_struct *p, uint8 opnum)
+static bool proxy_srvsvc_call(pipes_struct *p, uint8 opnum)
{
struct api_struct *fns;
int n_fns;
api_srv_net_srv_get_info
********************************************************************/
-static BOOL api_srv_net_srv_get_info(pipes_struct *p)
+static bool api_srv_net_srv_get_info(pipes_struct *p)
{
SRV_Q_NET_SRV_GET_INFO q_u;
SRV_R_NET_SRV_GET_INFO r_u;
api_srv_net_srv_get_info
********************************************************************/
-static BOOL api_srv_net_srv_set_info(pipes_struct *p)
+static bool api_srv_net_srv_set_info(pipes_struct *p)
{
SRV_Q_NET_SRV_SET_INFO q_u;
SRV_R_NET_SRV_SET_INFO r_u;
api_srv_net_file_enum
********************************************************************/
-static BOOL api_srv_net_file_enum(pipes_struct *p)
+static bool api_srv_net_file_enum(pipes_struct *p)
{
SRV_Q_NET_FILE_ENUM q_u;
SRV_R_NET_FILE_ENUM r_u;
api_srv_net_conn_enum
********************************************************************/
-static BOOL api_srv_net_conn_enum(pipes_struct *p)
+static bool api_srv_net_conn_enum(pipes_struct *p)
{
SRV_Q_NET_CONN_ENUM q_u;
SRV_R_NET_CONN_ENUM r_u;
Enumerate sessions.
********************************************************************/
-static BOOL api_srv_net_sess_enum(pipes_struct *p)
+static bool api_srv_net_sess_enum(pipes_struct *p)
{
SRV_Q_NET_SESS_ENUM q_u;
SRV_R_NET_SESS_ENUM r_u;
Delete session.
********************************************************************/
-static BOOL api_srv_net_sess_del(pipes_struct *p)
+static bool api_srv_net_sess_del(pipes_struct *p)
{
SRV_Q_NET_SESS_DEL q_u;
SRV_R_NET_SESS_DEL r_u;
RPC to enumerate shares.
********************************************************************/
-static BOOL api_srv_net_share_enum_all(pipes_struct *p)
+static bool api_srv_net_share_enum_all(pipes_struct *p)
{
SRV_Q_NET_SHARE_ENUM q_u;
SRV_R_NET_SHARE_ENUM r_u;
RPC to enumerate shares.
********************************************************************/
-static BOOL api_srv_net_share_enum(pipes_struct *p)
+static bool api_srv_net_share_enum(pipes_struct *p)
{
SRV_Q_NET_SHARE_ENUM q_u;
SRV_R_NET_SHARE_ENUM r_u;
RPC to return share information.
********************************************************************/
-static BOOL api_srv_net_share_get_info(pipes_struct *p)
+static bool api_srv_net_share_get_info(pipes_struct *p)
{
SRV_Q_NET_SHARE_GET_INFO q_u;
SRV_R_NET_SHARE_GET_INFO r_u;
RPC to set share information.
********************************************************************/
-static BOOL api_srv_net_share_set_info(pipes_struct *p)
+static bool api_srv_net_share_set_info(pipes_struct *p)
{
SRV_Q_NET_SHARE_SET_INFO q_u;
SRV_R_NET_SHARE_SET_INFO r_u;
RPC to add share information.
********************************************************************/
-static BOOL api_srv_net_share_add(pipes_struct *p)
+static bool api_srv_net_share_add(pipes_struct *p)
{
SRV_Q_NET_SHARE_ADD q_u;
SRV_R_NET_SHARE_ADD r_u;
RPC to delete share information.
********************************************************************/
-static BOOL api_srv_net_share_del(pipes_struct *p)
+static bool api_srv_net_share_del(pipes_struct *p)
{
SRV_Q_NET_SHARE_DEL q_u;
SRV_R_NET_SHARE_DEL r_u;
RPC to delete share information.
********************************************************************/
-static BOOL api_srv_net_share_del_sticky(pipes_struct *p)
+static bool api_srv_net_share_del_sticky(pipes_struct *p)
{
SRV_Q_NET_SHARE_DEL q_u;
SRV_R_NET_SHARE_DEL r_u;
api_srv_net_remote_tod
********************************************************************/
-static BOOL api_srv_net_remote_tod(pipes_struct *p)
+static bool api_srv_net_remote_tod(pipes_struct *p)
{
SRV_Q_NET_REMOTE_TOD q_u;
SRV_R_NET_REMOTE_TOD r_u;
RPC to enumerate disks available on a server e.g. C:, D: ...
*******************************************************************/
-static BOOL api_srv_net_disk_enum(pipes_struct *p)
+static bool api_srv_net_disk_enum(pipes_struct *p)
{
SRV_Q_NET_DISK_ENUM q_u;
SRV_R_NET_DISK_ENUM r_u;
NetValidateName (opnum 0x21)
*******************************************************************/
-static BOOL api_srv_net_name_validate(pipes_struct *p)
+static bool api_srv_net_name_validate(pipes_struct *p)
{
SRV_Q_NET_NAME_VALIDATE q_u;
SRV_R_NET_NAME_VALIDATE r_u;
NetFileQuerySecdesc (opnum 0x27)
*******************************************************************/
-static BOOL api_srv_net_file_query_secdesc(pipes_struct *p)
+static bool api_srv_net_file_query_secdesc(pipes_struct *p)
{
SRV_Q_NET_FILE_QUERY_SECDESC q_u;
SRV_R_NET_FILE_QUERY_SECDESC r_u;
NetFileSetSecdesc (opnum 0x28)
*******************************************************************/
-static BOOL api_srv_net_file_set_secdesc(pipes_struct *p)
+static bool api_srv_net_file_set_secdesc(pipes_struct *p)
{
SRV_Q_NET_FILE_SET_SECDESC q_u;
SRV_R_NET_FILE_SET_SECDESC r_u;
/*******************************************************************
*******************************************************************/
-static BOOL api_srv_net_file_close(pipes_struct *p)
+static bool api_srv_net_file_close(pipes_struct *p)
{
return proxy_srvsvc_call( p, NDR_SRVSVC_NETFILECLOSE );
}
True if it ends in '$'.
********************************************************************/
-static BOOL is_hidden_share(int snum)
+static bool is_hidden_share(int snum)
{
const char *net_name = lp_servicename(snum);
Fill in a share info structure.
********************************************************************/
-static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr,
- uint32 info_level, uint32 *resume_hnd, uint32 *total_entries, BOOL all_shares)
+static bool init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr,
+ uint32 info_level, uint32 *resume_hnd, uint32 *total_entries, bool all_shares)
{
int num_entries = 0;
int num_services = 0;
********************************************************************/
static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n,
- uint32 info_level, uint32 resume_hnd, BOOL all)
+ uint32 info_level, uint32 resume_hnd, bool all)
{
DEBUG(5,("init_srv_r_net_share_enum: %d\n", __LINE__));
uint32 num_files;
uint32 connect_time;
struct passwd *pw = sys_getpwnam(session_list[*snum].username);
- BOOL guest;
+ bool guest;
if ( !pw ) {
DEBUG(10,("init_srv_sess_info_1: failed to find owner: %s\n",
int num_sessions, snum;
fstring username;
fstring machine;
- BOOL not_root = False;
+ bool not_root = False;
rpcstr_pull_unistr2_fstring(username, &q_u->uni_user_name);
rpcstr_pull_unistr2_fstring(machine, &q_u->uni_cli_name);
char *path;
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
- BOOL is_disk_op = False;
+ bool is_disk_op = False;
int max_connections = 0;
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
char *path;
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
- BOOL is_disk_op;
+ bool is_disk_op;
int max_connections = 0;
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
int ret;
int snum;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
- BOOL is_disk_op;
+ bool is_disk_op;
struct share_params *params;
DEBUG(5,("_srv_net_share_del: %d\n", __LINE__));
NTSTATUS nt_status;
struct current_user user;
connection_struct *conn = NULL;
- BOOL became_user = False;
+ bool became_user = False;
TALLOC_CTX *ctx = talloc_tos();
ZERO_STRUCT(st);
NTSTATUS nt_status;
struct current_user user;
connection_struct *conn = NULL;
- BOOL became_user = False;
+ bool became_user = False;
TALLOC_CTX *ctx = talloc_tos();
ZERO_STRUCT(st);
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-static BOOL proxy_svcctl_call(pipes_struct *p, uint8 opnum)
+static bool proxy_svcctl_call(pipes_struct *p, uint8 opnum)
{
struct api_struct *fns;
int n_fns;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_close_service(pipes_struct *p)
+static bool api_svcctl_close_service(pipes_struct *p)
{
return proxy_svcctl_call( p, NDR_SVCCTL_CLOSESERVICEHANDLE );
}
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_open_scmanager(pipes_struct *p)
+static bool api_svcctl_open_scmanager(pipes_struct *p)
{
SVCCTL_Q_OPEN_SCMANAGER q_u;
SVCCTL_R_OPEN_SCMANAGER r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_open_service(pipes_struct *p)
+static bool api_svcctl_open_service(pipes_struct *p)
{
SVCCTL_Q_OPEN_SERVICE q_u;
SVCCTL_R_OPEN_SERVICE r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_get_display_name(pipes_struct *p)
+static bool api_svcctl_get_display_name(pipes_struct *p)
{
SVCCTL_Q_GET_DISPLAY_NAME q_u;
SVCCTL_R_GET_DISPLAY_NAME r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_query_status(pipes_struct *p)
+static bool api_svcctl_query_status(pipes_struct *p)
{
SVCCTL_Q_QUERY_STATUS q_u;
SVCCTL_R_QUERY_STATUS r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_enum_services_status(pipes_struct *p)
+static bool api_svcctl_enum_services_status(pipes_struct *p)
{
SVCCTL_Q_ENUM_SERVICES_STATUS q_u;
SVCCTL_R_ENUM_SERVICES_STATUS r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_query_service_status_ex(pipes_struct *p)
+static bool api_svcctl_query_service_status_ex(pipes_struct *p)
{
SVCCTL_Q_QUERY_SERVICE_STATUSEX q_u;
SVCCTL_R_QUERY_SERVICE_STATUSEX r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_enum_dependent_services(pipes_struct *p)
+static bool api_svcctl_enum_dependent_services(pipes_struct *p)
{
SVCCTL_Q_ENUM_DEPENDENT_SERVICES q_u;
SVCCTL_R_ENUM_DEPENDENT_SERVICES r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_start_service(pipes_struct *p)
+static bool api_svcctl_start_service(pipes_struct *p)
{
SVCCTL_Q_START_SERVICE q_u;
SVCCTL_R_START_SERVICE r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_control_service(pipes_struct *p)
+static bool api_svcctl_control_service(pipes_struct *p)
{
SVCCTL_Q_CONTROL_SERVICE q_u;
SVCCTL_R_CONTROL_SERVICE r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_query_service_config(pipes_struct *p)
+static bool api_svcctl_query_service_config(pipes_struct *p)
{
SVCCTL_Q_QUERY_SERVICE_CONFIG q_u;
SVCCTL_R_QUERY_SERVICE_CONFIG r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_query_service_config2(pipes_struct *p)
+static bool api_svcctl_query_service_config2(pipes_struct *p)
{
SVCCTL_Q_QUERY_SERVICE_CONFIG2 q_u;
SVCCTL_R_QUERY_SERVICE_CONFIG2 r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_lock_service_db(pipes_struct *p)
+static bool api_svcctl_lock_service_db(pipes_struct *p)
{
SVCCTL_Q_LOCK_SERVICE_DB q_u;
SVCCTL_R_LOCK_SERVICE_DB r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_unlock_service_db(pipes_struct *p)
+static bool api_svcctl_unlock_service_db(pipes_struct *p)
{
SVCCTL_Q_UNLOCK_SERVICE_DB q_u;
SVCCTL_R_UNLOCK_SERVICE_DB r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_query_security_sec(pipes_struct *p)
+static bool api_svcctl_query_security_sec(pipes_struct *p)
{
SVCCTL_Q_QUERY_SERVICE_SEC q_u;
SVCCTL_R_QUERY_SERVICE_SEC r_u;
/*******************************************************************
********************************************************************/
-static BOOL api_svcctl_set_security_sec(pipes_struct *p)
+static bool api_svcctl_set_security_sec(pipes_struct *p)
{
SVCCTL_Q_SET_SERVICE_SEC q_u;
SVCCTL_R_SET_SERVICE_SEC r_u;
/********************************************************************
********************************************************************/
-BOOL init_service_op_table( void )
+bool init_service_op_table( void )
{
const char **service_list = lp_svcctl_list();
int num_services = SVCCTL_NUM_INTERNAL_SERVICES + str_list_count( service_list );
Note that P should be valid & hnd should already have space
*******************************************************************/
-static BOOL close_registry_key(pipes_struct *p, POLICY_HND *hnd)
+static bool close_registry_key(pipes_struct *p, POLICY_HND *hnd)
{
struct registry_key *regkey = find_regkey_by_hnd(p, hnd);
uint32_t outbuf_size;
DATA_BLOB val_blob;
- BOOL free_buf = False;
- BOOL free_prs = False;
+ bool free_buf = False;
+ bool free_prs = False;
if ( !regkey )
return WERR_BADFID;
fstring reboot;
fstring f;
int ret;
- BOOL can_shutdown;
+ bool can_shutdown;
pstrcpy(shutdown_script, lp_shutdown_script());
{
pstring abort_shutdown_script;
int ret;
- BOOL can_shutdown;
+ bool can_shutdown;
pstrcpy(abort_shutdown_script, lp_abort_shutdown_script());
uint32 *dom_rids;
uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
uint32 acb_mask = ACB_NORMAL;
- BOOL got_connect_pol = False, got_domain_pol = False;
+ bool got_connect_pol = False, got_domain_pol = False;
if ((argc < 1) || (argc > 3)) {
printf("Usage: %s [access_mask] [acb_mask]\n", argv[0]);
uint32 start_idx, size, num_dom_groups, i;
uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
struct acct_info *dom_groups;
- BOOL got_connect_pol = False, got_domain_pol = False;
+ bool got_connect_pol = False, got_domain_pol = False;
if ((argc < 1) || (argc > 2)) {
printf("Usage: %s [access_mask]\n", argv[0]);
uint32 start_idx, size, num_als_groups, i;
uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
struct acct_info *als_groups;
- BOOL got_connect_pol = False, got_domain_pol = False;
+ bool got_connect_pol = False, got_domain_pol = False;
if ((argc < 2) || (argc > 3)) {
printf("Usage: %s builtin|domain [access mask]\n", argv[0]);
SAM_DISPINFO_4 info4;
SAM_DISPINFO_5 info5;
int loop_count = 0;
- BOOL got_params = False; /* Use get_query_dispinfo_params() or not? */
+ bool got_params = False; /* Use get_query_dispinfo_params() or not? */
if (argc > 6) {
printf("Usage: %s [info level] [start index] [max entries] [max size] [access mask]\n", argv[0]);
uint32 user_rid = 0;
TALLOC_CTX *ctx = NULL;
SEC_DESC_BUF *sec_desc_buf=NULL;
- BOOL domain = False;
+ bool domain = False;
ctx=talloc_init("cmd_samr_query_sec_obj");
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
fstring msg;
uint32 timeout = 20;
- BOOL force = False;
- BOOL reboot = False;
+ bool force = False;
+ bool reboot = False;
int opt;
*msg = 0;
POLICY_HND pol;
WERROR result;
uint32 info_level = 2;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
PRINTER_INFO_CTR ctr;
fstring printername,
servername,
POLICY_HND pol;
WERROR result;
uint32 info_level = 2;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
PRINTER_INFO_CTR ctr;
fstring printername,
servername,
POLICY_HND pol;
WERROR result;
uint32 info_level = 1;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
PRINTER_INFO_CTR ctr;
fstring printername,
servername,
{
POLICY_HND pol;
WERROR result;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
fstring printername,
servername,
user;
{
POLICY_HND pol;
WERROR result;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
fstring printername,
servername,
user;
fstring defaultdatatype = "";
int length=0;
- BOOL valid = True;
+ bool valid = True;
if (i1 == NULL)
return;
POLICY_HND pol;
WERROR werror;
uint32 info_level = 3;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
PRINTER_DRIVER_CTR ctr;
fstring printername,
servername,
user;
uint32 i;
- BOOL success = False;
+ bool success = False;
if ((argc == 1) || (argc > 3))
{
<Config File Name>:<Help File Name>:<Language Monitor Name>:\
<Default Data Type>:<Comma Separated list of Files>
*******************************************************************************/
-static BOOL init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info,
+static bool init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info,
char *args )
{
char *str, *str2;
POLICY_HND pol;
WERROR result;
uint32 level = 2;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
PRINTER_INFO_CTR ctr;
PRINTER_INFO_2 info2;
fstring servername,
WERROR werror;
char *servername = NULL, *printername = NULL;
FORM form;
- BOOL got_handle = False;
+ bool got_handle = False;
/* Parse the command arguements */
WERROR werror;
char *servername = NULL, *printername = NULL;
FORM form;
- BOOL got_handle = False;
+ bool got_handle = False;
/* Parse the command arguements */
WERROR werror;
char *servername = NULL, *printername = NULL;
FORM_1 form;
- BOOL got_handle = False;
+ bool got_handle = False;
/* Parse the command arguements */
POLICY_HND handle;
WERROR werror;
char *servername = NULL, *printername = NULL;
- BOOL got_handle = False;
+ bool got_handle = False;
/* Parse the command arguements */
POLICY_HND handle;
WERROR werror;
char *servername = NULL, *printername = NULL;
- BOOL got_handle = False;
+ bool got_handle = False;
uint32 num_forms, level = 1, i;
FORM_1 *forms;
WERROR result;
fstring servername, printername, user;
POLICY_HND pol;
- BOOL opened_hnd = False;
+ bool opened_hnd = False;
PRINTER_INFO_CTR ctr;
PRINTER_INFO_0 info;
REGISTRY_VALUE value;
{
WERROR result;
uint32 level = 1, num_jobs, i;
- BOOL got_hnd = False;
+ bool got_hnd = False;
pstring printername;
fstring servername, user;
POLICY_HND hnd;
{
WERROR result;
uint32 i=0, val_needed, data_needed;
- BOOL got_hnd = False;
+ bool got_hnd = False;
pstring printername;
fstring servername, user;
POLICY_HND hnd;
{
WERROR result;
uint32 i;
- BOOL got_hnd = False;
+ bool got_hnd = False;
pstring printername;
fstring servername, user;
const char *keyname = NULL;
const char **argv)
{
WERROR result;
- BOOL got_hnd = False;
+ bool got_hnd = False;
pstring printername;
fstring servername, user;
const char *keyname = NULL;
{
fstring servername, printername;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
WERROR result;
SPOOL_NOTIFY_OPTION option;
/****************************************************************************
****************************************************************************/
-static BOOL compare_printer( struct rpc_pipe_client *cli1, POLICY_HND *hnd1,
+static bool compare_printer( struct rpc_pipe_client *cli1, POLICY_HND *hnd1,
struct rpc_pipe_client *cli2, POLICY_HND *hnd2 )
{
PRINTER_INFO_CTR ctr1, ctr2;
/****************************************************************************
****************************************************************************/
-static BOOL compare_printer_secdesc( struct rpc_pipe_client *cli1, POLICY_HND *hnd1,
+static bool compare_printer_secdesc( struct rpc_pipe_client *cli1, POLICY_HND *hnd1,
struct rpc_pipe_client *cli2, POLICY_HND *hnd2 )
{
PRINTER_INFO_CTR ctr1, ctr2;
WERROR werror;
TALLOC_CTX *mem_ctx = talloc_init("compare_printer_secdesc");
SEC_DESC *sd1, *sd2;
- BOOL result = True;
+ bool result = True;
printf("Retreiving printer security for %s...", cli1->cli->desthost);
WKS_INFO_100 ctr;
uint32 info_level = 100;
- BOOL res = True;
+ bool res = True;
memset((char *)&ctr, '\0', sizeof(ctr));
NTSTATUS result = NT_STATUS_OK;
uint32 info_class = 5;
char *domain_name = NULL;
- static BOOL got_domain_sid;
+ static bool got_domain_sid;
TALLOC_CTX *mem_ctx;
DOM_SID *dom_sid = NULL;
struct rpc_pipe_client *lsapipe = NULL;
print "#include \"build_env.h\"";
print "#include \"dynconfig.h\"";
print "";
- print "static void output(BOOL screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);";
- print "void build_options(BOOL screen);";
+ print "static void output(bool screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);";
+ print "void build_options(bool screen);";
print "";
print "";
print "/****************************************************************************";
print "helper function for build_options";
print "****************************************************************************/";
- print "static void output(BOOL screen, const char *format, ...)";
+ print "static void output(bool screen, const char *format, ...)";
print "{";
print " char *ptr;";
print " va_list ap;";
print "/****************************************************************************";
print "options set at build time for the samba suite";
print "****************************************************************************/";
- print "void build_options(BOOL screen)";
+ print "void build_options(bool screen)";
print "{";
print " if ((DEBUGLEVEL < 4) && (!screen)) {";
print " return;";
/^FN_LOCAL_BOOL/ {
split($0,a,"[,()]")
- printf "BOOL %s(int );\n", a[2]
+ printf "bool %s(int );\n", a[2]
}
/^FN_LOCAL_PARM_BOOL/ {
split($0,a,"[,()]")
- printf "BOOL %s(const struct share_params *p );\n", a[2]
+ printf "bool %s(const struct share_params *p );\n", a[2]
}
/^FN_LOCAL_PARM_INTEGER/ {
/^FN_GLOBAL_BOOL/ {
split($0,a,"[,()]")
- printf "BOOL %s(void);\n", a[2]
+ printf "bool %s(void);\n", a[2]
}
/^FN_GLOBAL_LIST/ {
gotstart = 1;
}
- if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^bool|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|^SMB_BIG_INT/ ) {
+ if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^bool|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|^SMB_BIG_INT/ ) {
gotstart = 1;
}
/********************************************************************
********************************************************************/
-static BOOL read_init_file( const char *servicename, struct rcinit_file_information **service_info )
+static bool read_init_file( const char *servicename, struct rcinit_file_information **service_info )
{
struct rcinit_file_information *info;
pstring filepath, str;
Wrapper to make storing a Service sd easier
********************************************************************/
-BOOL svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token )
+bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token )
{
REGISTRY_KEY *key;
WERROR wresult;
pstring path;
REGVAL_CTR *values;
prs_struct ps;
- BOOL ret = False;
+ bool ret = False;
/* now add the security descriptor */
struct aio_extra *next, *prev;
SMB_STRUCT_AIOCB acb;
files_struct *fsp;
- BOOL read_req;
+ bool read_req;
uint16 mid;
char *inbuf;
char *outbuf;
Is there a signal waiting ?
*****************************************************************************/
-BOOL aio_finished(void)
+bool aio_finished(void)
{
return (signals_received != 0);
}
Set up an aio request from a SMBreadX call.
*****************************************************************************/
-BOOL schedule_aio_read_and_X(connection_struct *conn,
+bool schedule_aio_read_and_X(connection_struct *conn,
struct smb_request *req,
files_struct *fsp, SMB_OFF_T startpos,
size_t smb_maxcnt)
Set up an aio request from a SMBwriteX call.
*****************************************************************************/
-BOOL schedule_aio_write_and_X(connection_struct *conn,
+bool schedule_aio_write_and_X(connection_struct *conn,
struct smb_request *req,
files_struct *fsp, char *data,
SMB_OFF_T startpos,
struct aio_extra *aio_ex;
SMB_STRUCT_AIOCB *a;
size_t inbufsize, outbufsize;
- BOOL write_through = BITSETW(req->inbuf+smb_vwv7,0);
+ bool write_through = BITSETW(req->inbuf+smb_vwv7,0);
size_t min_aio_write_size = lp_aio_write_size(SNUM(conn));
if (!min_aio_write_size || (numtowrite < min_aio_write_size)) {
UNIXERROR(ERRHRD,ERRdiskfull);
ret = errno;
} else {
- BOOL write_through = BITSETW(aio_ex->inbuf+smb_vwv7,0);
+ bool write_through = BITSETW(aio_ex->inbuf+smb_vwv7,0);
NTSTATUS status;
SSVAL(outbuf,smb_vwv2,nwritten);
was non-zero), False if not.
*****************************************************************************/
-static BOOL handle_aio_completed(struct aio_extra *aio_ex, int *perr)
+static bool handle_aio_completed(struct aio_extra *aio_ex, int *perr)
{
int err;
}
#else
-BOOL aio_finished(void)
+bool aio_finished(void)
{
return False;
}
return False;
}
-BOOL schedule_aio_read_and_X(connection_struct *conn,
+bool schedule_aio_read_and_X(connection_struct *conn,
struct smb_request *req,
files_struct *fsp, SMB_OFF_T startpos,
size_t smb_maxcnt)
return False;
}
-BOOL schedule_aio_write_and_X(connection_struct *conn,
+bool schedule_aio_write_and_X(connection_struct *conn,
struct smb_request *req,
files_struct *fsp, char *data,
SMB_OFF_T startpos,
{
}
-BOOL wait_for_aio_completion(files_struct *fsp)
+int wait_for_aio_completion(files_struct *fsp)
{
- return True;
+ return ENOSYS;
}
#endif
Determine if this is a secondary element of a chained SMB.
**************************************************************************/
-static BOOL in_chained_smb(void)
+static bool in_chained_smb(void)
{
return (chain_size != 0);
}
next processing.
****************************************************************************/
-static BOOL recalc_brl_timeout(void)
+static bool recalc_brl_timeout(void)
{
blocking_lock_record *brl;
struct timeval next_timeout;
Function to push a blocking lock request onto the lock queue.
****************************************************************************/
-BOOL push_blocking_lock_request( struct byte_range_lock *br_lck,
+bool push_blocking_lock_request( struct byte_range_lock *br_lck,
const char *inbuf, int length,
files_struct *fsp,
int lock_timeout,
SMB_BIG_UINT count,
uint32 blocking_pid)
{
- static BOOL set_lock_msg;
+ static bool set_lock_msg;
blocking_lock_record *blr;
NTSTATUS status;
SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT) 0;
uint32 lock_pid;
unsigned char locktype = CVAL(inbuf,smb_vwv3);
- BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
+ bool large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
int i;
*/
for(i = blr->lock_num - 1; i >= 0; i--) {
- BOOL err;
+ bool err;
lock_pid = get_lock_pid( data, i, large_file_format);
count = get_lock_count( data, i, large_file_format);
Returns True if we want to be removed from the list.
*****************************************************************************/
-static BOOL process_lockingX(blocking_lock_record *blr)
+static bool process_lockingX(blocking_lock_record *blr)
{
char *inbuf = blr->inbuf;
unsigned char locktype = CVAL(inbuf,smb_vwv3);
uint16 num_locks = SVAL(inbuf,smb_vwv7);
SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT)0;
uint32 lock_pid;
- BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
+ bool large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
NTSTATUS status = NT_STATUS_OK;
for(; blr->lock_num < num_locks; blr->lock_num++) {
struct byte_range_lock *br_lck = NULL;
- BOOL err;
+ bool err;
lock_pid = get_lock_pid( data, blr->lock_num, large_file_format);
count = get_lock_count( data, blr->lock_num, large_file_format);
Returns True if we want to be removed from the list.
*****************************************************************************/
-static BOOL process_trans2(blocking_lock_record *blr)
+static bool process_trans2(blocking_lock_record *blr)
{
struct smb_request *req;
char params[2];
Returns True if we want to be removed from the list.
*****************************************************************************/
-static BOOL blocking_lock_record_process(blocking_lock_record *blr)
+static bool blocking_lock_record_process(blocking_lock_record *blr)
{
switch(blr->com_type) {
case SMBlockingX:
Is this mid a blocking lock request on the queue ?
*****************************************************************************/
-BOOL blocking_lock_was_deferred(int mid)
+bool blocking_lock_was_deferred(int mid)
{
blocking_lock_record *blr, *next = NULL;
{
struct timeval tv_curr = timeval_current();
blocking_lock_record *blr, *next = NULL;
- BOOL recalc_timeout = False;
+ bool recalc_timeout = False;
/*
* Go through the queue and see if we can get any of the locks.
Send ourselves a blocking lock cancelled message. Handled asynchronously above.
*****************************************************************************/
-BOOL blocking_lock_cancel(files_struct *fsp,
+bool blocking_lock_cancel(files_struct *fsp,
uint32 lock_pid,
SMB_BIG_UINT offset,
SMB_BIG_UINT count,
unsigned char locktype,
NTSTATUS err)
{
- static BOOL initialized;
+ static bool initialized;
char msg[MSG_BLOCKING_LOCK_CANCEL_SIZE];
blocking_lock_record *blr;
}
static int dochild(int master, const char *slavedev, const struct passwd *pass,
- const char *passwordprogram, BOOL as_root)
+ const char *passwordprogram, bool as_root)
{
int slave;
struct termios stermios;
{
pstring buffer;
int attempts, timeout, nread, len;
- BOOL match = False;
+ bool match = False;
for (attempts = 0; attempts < 2; attempts++) {
if (!strequal(issue, ".")) {
return (count > 0);
}
-static BOOL chat_with_program(char *passwordprogram, const struct passwd *pass,
- char *chatsequence, BOOL as_root)
+static bool chat_with_program(char *passwordprogram, const struct passwd *pass,
+ char *chatsequence, bool as_root)
{
char *slavedev;
int master;
pid_t pid, wpid;
int wstat;
- BOOL chstat = False;
+ bool chstat = False;
if (pass == NULL) {
DEBUG(0, ("chat_with_program: user doesn't exist in the UNIX password database.\n"));
return (chstat);
}
-BOOL chgpasswd(const char *name, const struct passwd *pass,
- const char *oldpass, const char *newpass, BOOL as_root)
+bool chgpasswd(const char *name, const struct passwd *pass,
+ const char *oldpass, const char *newpass, bool as_root)
{
pstring passwordprogram;
pstring chatsequence;
#ifdef WITH_PAM
if (lp_pam_password_change()) {
- BOOL ret;
+ bool ret;
if (as_root)
become_root();
#else /* ALLOW_CHANGE_PASSWORD */
-BOOL chgpasswd(const char *name, const struct passwd *pass,
- const char *oldpass, const char *newpass, BOOL as_root)
+bool chgpasswd(const char *name, const struct passwd *pass,
+ const char *oldpass, const char *newpass, bool as_root)
{
DEBUG(0, ("chgpasswd: Unix Password changing not compiled in (user=%s)\n", name));
return (False);
Code to check the lanman hashed password.
************************************************************/
-BOOL check_lanman_password(char *user, uchar * pass1,
+bool check_lanman_password(char *user, uchar * pass1,
uchar * pass2, struct samu **hnd)
{
uchar unenc_new_pw[16];
struct samu *sampass = NULL;
uint32 acct_ctrl;
const uint8 *lanman_pw;
- BOOL ret;
+ bool ret;
if ( !(sampass = samu_new(NULL)) ) {
DEBUG(0, ("samu_new() failed!\n"));
is correct before calling. JRA.
************************************************************/
-BOOL change_lanman_password(struct samu *sampass, uchar *pass2)
+bool change_lanman_password(struct samu *sampass, uchar *pass2)
{
static uchar null_pw[16];
uchar unenc_new_pw[16];
- BOOL ret;
+ bool ret;
uint32 acct_ctrl;
const uint8 *pwd;
uchar new_lm_hash[16];
uchar verifier[16];
char no_pw[2];
- BOOL ret;
+ bool ret;
- BOOL nt_pass_set = (password_encrypted_with_nt_hash && old_nt_hash_encrypted);
- BOOL lm_pass_set = (password_encrypted_with_lm_hash && old_lm_hash_encrypted);
+ bool nt_pass_set = (password_encrypted_with_nt_hash && old_nt_hash_encrypted);
+ bool lm_pass_set = (password_encrypted_with_lm_hash && old_lm_hash_encrypted);
*hnd = NULL;
found in the history list.
************************************************************/
-static BOOL check_passwd_history(struct samu *sampass, const char *plaintext)
+static bool check_passwd_history(struct samu *sampass, const char *plaintext)
{
uchar new_nt_p16[NT_HASH_LEN];
uchar zero_md5_nt_pw[SALTED_MD5_HASH_LEN];
const uint8 *nt_pw;
const uint8 *pwhistory;
- BOOL found = False;
+ bool found = False;
int i;
uint32 pwHisLen, curr_pwHisLen;
is correct before calling. JRA.
************************************************************/
-NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, BOOL as_root, uint32 *samr_reject_reason)
+NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason)
{
uint32 min_len;
uint32 refuse;
enum file_close_type close_type)
{
connection_struct *conn = fsp->conn;
- BOOL delete_file = False;
+ bool delete_file = False;
struct share_mode_lock *lck;
SMB_STRUCT_STAT sbuf;
NTSTATUS status = NT_STATUS_OK;
}
if (fsp->initial_delete_on_close && (lck->delete_token == NULL)) {
- BOOL became_user = False;
+ bool became_user = False;
/* Initial delete on close was set and no one else
* wrote a real delete on close. */
static NTSTATUS close_directory(files_struct *fsp, enum file_close_type close_type)
{
struct share_mode_lock *lck = 0;
- BOOL delete_dir = False;
+ bool delete_dir = False;
NTSTATUS status = NT_STATUS_OK;
/*
}
if (fsp->initial_delete_on_close) {
- BOOL became_user = False;
+ bool became_user = False;
/* Initial delete on close was set - for
* directories we don't care if anyone else
/****************************************************************************
check if a snum is in use
****************************************************************************/
-BOOL conn_snum_used(int snum)
+bool conn_snum_used(int snum)
{
connection_struct *conn;
for (conn=Connections;conn;conn=conn->next) {
Idle inactive connections.
****************************************************************************/
-BOOL conn_idle_all(time_t t)
+bool conn_idle_all(time_t t)
{
int deadtime = lp_deadtime()*60;
pipes_struct *plist = NULL;
Delete a connection record.
****************************************************************************/
-BOOL yield_connection(connection_struct *conn, const char *name)
+bool yield_connection(connection_struct *conn, const char *name)
{
struct db_record *rec;
NTSTATUS status;
pid_t mypid;
int curr_connections;
const char *name;
- BOOL Clear;
+ bool Clear;
};
/****************************************************************************
Claim an entry in the connections database.
****************************************************************************/
-int count_current_connections( const char *sharename, BOOL clear )
+int count_current_connections( const char *sharename, bool clear )
{
struct count_stat cs;
Claim an entry in the connections database.
****************************************************************************/
-BOOL claim_connection(connection_struct *conn, const char *name,
+bool claim_connection(connection_struct *conn, const char *name,
uint32 msg_flags)
{
struct db_record *rec;
return True;
}
-BOOL register_message_flags(BOOL doreg, uint32 msg_flags)
+bool register_message_flags(bool doreg, uint32 msg_flags)
{
struct db_record *rec;
struct connections_data *pcrec;
/*********************************************************************
*********************************************************************/
-BOOL store_pipe_opendb( smb_np_struct *p )
+bool store_pipe_opendb( smb_np_struct *p )
{
struct db_record *dbrec;
struct pipe_open_rec *prec;
TDB_DATA *key;
TDB_DATA data;
- BOOL ret = False;
+ bool ret = False;
if ( (prec = TALLOC_P( NULL, struct pipe_open_rec)) == NULL ) {
DEBUG(0,("store_pipe_opendb: talloc failed!\n"));
/*********************************************************************
*********************************************************************/
-BOOL delete_pipe_opendb( smb_np_struct *p )
+bool delete_pipe_opendb( smb_np_struct *p )
{
struct db_record *dbrec;
struct pipe_open_rec *prec;
TDB_DATA *key;
- BOOL ret = False;
+ bool ret = False;
if ( (prec = TALLOC_P( NULL, struct pipe_open_rec)) == NULL ) {
DEBUG(0,("store_pipe_opendb: talloc failed!\n"));
Normalise for DOS usage.
****************************************************************************/
-static void disk_norm(BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+static void disk_norm(bool small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
/* check if the disk is beyond the max disk size */
SMB_BIG_UINT maxdisksize = lp_maxdisksize();
Return number of 1K blocks available on a path and total number.
****************************************************************************/
-SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, BOOL small_query,
+SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query,
SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
SMB_BIG_UINT dfree_retval;
SMB_BIG_UINT get_dfree_info(connection_struct *conn,
const char *path,
- BOOL small_query,
+ bool small_query,
SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree,
SMB_BIG_UINT *dsize)
uint16 spid;
struct connection_struct *conn;
struct smb_Dir *dir_hnd;
- BOOL expect_close;
+ bool expect_close;
char *wcard;
uint32 attr;
char *path;
- BOOL has_wild; /* Set to true if the wcard entry has MS wildcard characters in it. */
- BOOL did_stat; /* Optimisation for non-wcard searches. */
+ bool has_wild; /* Set to true if the wcard entry has MS wildcard characters in it. */
+ bool did_stat; /* Optimisation for non-wcard searches. */
};
static struct bitmap *dptr_bmap;
Make a dir struct.
****************************************************************************/
-BOOL make_dir_struct(TALLOC_CTX *ctx,
+bool make_dir_struct(TALLOC_CTX *ctx,
char *buf,
const char *mask,
const char *fname,
SMB_OFF_T size,
uint32 mode,
time_t date,
- BOOL uc)
+ bool uc)
{
char *p;
char *mask2 = talloc_strdup(ctx, mask);
void init_dptrs(void)
{
- static BOOL dptrs_init=False;
+ static bool dptrs_init=False;
if (dptrs_init)
return;
Get the struct dptr_struct for a dir index.
****************************************************************************/
-static struct dptr_struct *dptr_get(int key, BOOL forclose)
+static struct dptr_struct *dptr_get(int key, bool forclose)
{
struct dptr_struct *dptr;
finished with that one.
****************************************************************************/
-static void dptr_close_oldest(BOOL old)
+static void dptr_close_oldest(bool old)
{
struct dptr_struct *dptr;
wcard must not be zero.
****************************************************************************/
-NTSTATUS dptr_create(connection_struct *conn, const char *path, BOOL old_handle, BOOL expect_close,uint16 spid,
- const char *wcard, BOOL wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret)
+NTSTATUS dptr_create(connection_struct *conn, const char *path, bool old_handle, bool expect_close,uint16 spid,
+ const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret)
{
struct dptr_struct *dptr = NULL;
struct smb_Dir *dir_hnd;
return TellDir(dptr->dir_hnd);
}
-BOOL dptr_has_wild(struct dptr_struct *dptr)
+bool dptr_has_wild(struct dptr_struct *dptr)
{
return dptr->has_wild;
}
Search for a file by name, skipping veto'ed and not visible files.
****************************************************************************/
-BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
+bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
{
SET_STAT_INVALID(*pst);
Fill the 5 byte server reserved dptr field.
****************************************************************************/
-BOOL dptr_fill(char *buf1,unsigned int key)
+bool dptr_fill(char *buf1,unsigned int key)
{
unsigned char *buf = (unsigned char *)buf1;
struct dptr_struct *dptr = dptr_get(key, False);
Check that a file matches a particular file type.
****************************************************************************/
-BOOL dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype)
+bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype)
{
uint32 mask;
return True;
}
-static BOOL mangle_mask_match(connection_struct *conn,
+static bool mangle_mask_match(connection_struct *conn,
const char *filename,
const char *mask)
{
Get an 8.3 directory entry.
****************************************************************************/
-BOOL get_dir_entry(TALLOC_CTX *ctx,
+bool get_dir_entry(TALLOC_CTX *ctx,
connection_struct *conn,
const char *mask,
uint32 dirtype,
SMB_OFF_T *size,
uint32 *mode,
time_t *date,
- BOOL check_descend)
+ bool check_descend)
{
const char *dname = NULL;
- BOOL found = False;
+ bool found = False;
SMB_STRUCT_STAT sbuf;
char *pathreal = NULL;
const char *filename = NULL;
- BOOL needslash;
+ bool needslash;
*pp_fname_out = NULL;
use it for anything security sensitive.
********************************************************************/
-static BOOL user_can_read_file(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
+static bool user_can_read_file(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
{
SEC_DESC *psd = NULL;
size_t sd_size;
use it for anything security sensitive.
********************************************************************/
-static BOOL user_can_write_file(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
+static bool user_can_write_file(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
{
SEC_DESC *psd = NULL;
size_t sd_size;
Is a file a "special" type ?
********************************************************************/
-static BOOL file_is_special(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
+static bool file_is_special(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
{
/*
* If user is a member of the Admin group
Should the file be seen by the client ?
********************************************************************/
-BOOL is_visible_file(connection_struct *conn, const char *dir_path, const char *name, SMB_STRUCT_STAT *pst, BOOL use_veto)
+bool is_visible_file(connection_struct *conn, const char *dir_path, const char *name, SMB_STRUCT_STAT *pst, bool use_veto)
{
- BOOL hide_unreadable = lp_hideunreadable(SNUM(conn));
- BOOL hide_unwriteable = lp_hideunwriteable_files(SNUM(conn));
- BOOL hide_special = lp_hide_special_files(SNUM(conn));
+ bool hide_unreadable = lp_hideunreadable(SNUM(conn));
+ bool hide_unwriteable = lp_hideunwriteable_files(SNUM(conn));
+ bool hide_special = lp_hide_special_files(SNUM(conn));
SET_STAT_INVALID(*pst);
Don't check for veto or invisible files.
********************************************************************/
-BOOL SearchDir(struct smb_Dir *dirp, const char *name, long *poffset)
+bool SearchDir(struct smb_Dir *dirp, const char *name, long *poffset)
{
int i;
const char *entry;
int dmapi_init_session(void) { return -1; }
uint32 dmapi_file_flags(const char * const path) { return 0; }
-BOOL dmapi_have_session(void) { return False; }
+bool dmapi_have_session(void) { return False; }
#else /* USE_DMAPI */
return 0;
}
-BOOL dmapi_have_session(void)
+bool dmapi_have_session(void)
{
return dmapi_session != DM_NO_SESSION;
}
Get DOS attributes from an EA.
****************************************************************************/
-static BOOL get_ea_dos_attribute(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf, uint32 *pattr)
+static bool get_ea_dos_attribute(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf, uint32 *pattr)
{
ssize_t sizeret;
fstring attrstr;
Set DOS attributes in an EA.
****************************************************************************/
-static BOOL set_ea_dos_attribute(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf, uint32 dosmode)
+static bool set_ea_dos_attribute(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf, uint32 dosmode)
{
fstring attrstr;
files_struct *fsp = NULL;
- BOOL ret = False;
+ bool ret = False;
if (!lp_store_dos_attributes(SNUM(conn))) {
return False;
Change a filetime - possibly allowing DOS semantics.
*******************************************************************/
-BOOL set_filetime(connection_struct *conn, const char *fname,
+bool set_filetime(connection_struct *conn, const char *fname,
const struct timespec mtime)
{
struct timespec ts[2];
return error_packet(outbuf,eclass,ecode,ntstatus,line,file);
}
-BOOL use_nt_status(void)
+bool use_nt_status(void)
{
return lp_nt_status_support() && (global_client_caps & CAP_STATUS32);
}
void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file)
{
- BOOL force_nt_status = False;
- BOOL force_dos_status = False;
+ bool force_nt_status = False;
+ bool force_dos_status = False;
if (eclass == (uint8)-1) {
force_nt_status = True;
#include "includes.h"
-static BOOL setup_write_cache(files_struct *, SMB_OFF_T);
+static bool setup_write_cache(files_struct *, SMB_OFF_T);
/****************************************************************************
Read from write cache if we can.
****************************************************************************/
-static BOOL read_from_write_cache(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
+static bool read_from_write_cache(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
{
write_cache *wcp = fsp->wcp;
*/
if (wcp->data_size) {
- BOOL cache_flush_needed = False;
+ bool cache_flush_needed = False;
if ((pos >= wcp->offset) && (pos <= wcp->offset + wcp->data_size)) {
Setup the write cache structure.
****************************************************************************/
-static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size)
+static bool setup_write_cache(files_struct *fsp, SMB_OFF_T file_size)
{
ssize_t alloc_size = lp_write_cache_size(SNUM(fsp->conn));
write_cache *wcp;
sync a file
********************************************************************/
-NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, BOOL write_through)
+NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_through)
{
if (fsp->fh->fd == -1)
return NT_STATUS_INVALID_HANDLE;
#include "includes.h"
-static BOOL scan_directory(connection_struct *conn, const char *path,
+static bool scan_directory(connection_struct *conn, const char *path,
char *name, char **found_name);
/****************************************************************************
Mangle the 2nd name and check if it is then equal to the first name.
****************************************************************************/
-static BOOL mangled_equal(const char *name1,
+static bool mangled_equal(const char *name1,
const char *name2,
const struct share_params *p)
{
****************************************************************************/
static NTSTATUS determine_path_error(const char *name,
- BOOL allow_wcard_last_component)
+ bool allow_wcard_last_component)
{
const char *p;
NTSTATUS unix_convert(TALLOC_CTX *ctx,
connection_struct *conn,
const char *orig_path,
- BOOL allow_wcard_last_component,
+ bool allow_wcard_last_component,
char **pp_conv_path,
char **pp_saved_last_component,
SMB_STRUCT_STAT *pst)
char *start, *end;
char *dirpath = NULL;
char *name = NULL;
- BOOL component_was_mangled = False;
- BOOL name_has_wildcard = False;
+ bool component_was_mangled = False;
+ bool name_has_wildcard = False;
NTSTATUS result;
SET_STAT_INVALID(*pst);
This needs to be careful about whether we are case sensitive.
****************************************************************************/
-static BOOL fname_equal(const char *name1, const char *name2,
- BOOL case_sensitive)
+static bool fname_equal(const char *name1, const char *name2,
+ bool case_sensitive)
{
/* Normal filename handling */
if (case_sensitive) {
If the name looks like a mangled name then try via the mangling functions
****************************************************************************/
-static BOOL scan_directory(connection_struct *conn, const char *path,
+static bool scan_directory(connection_struct *conn, const char *path,
char *name, char **found_name)
{
struct smb_Dir *cur_dir;
const char *dname;
- BOOL mangled;
+ bool mangled;
char *unmangled_name = NULL;
long curpos;
TALLOC_CTX *ctx = talloc_tos();
void send_trans_reply(struct smb_request *req,
char *rparam, int rparam_len,
char *rdata, int rdata_len,
- BOOL buffer_too_large)
+ bool buffer_too_large)
{
int this_ldata,this_lparam;
int tot_data_sent = 0;
static void api_rpc_trans_reply(struct smb_request *req, smb_np_struct *p)
{
- BOOL is_data_outstanding;
+ bool is_data_outstanding;
char *rdata = (char *)SMB_MALLOC(p->max_trans_reply);
int data_len;
int suwcnt, int tdscnt, int tpscnt,
int mdrcnt, int mprcnt)
{
- BOOL reply = False;
+ bool reply = False;
smb_np_struct *p = NULL;
int pnum;
int subcommand;
return val;
}
-static BOOL api_Unsupported(connection_struct *conn, uint16 vuid,
+static bool api_Unsupported(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt, int mprcnt,
char **rdata, char **rparam,
int *rdata_len, int *rparam_len);
-static BOOL api_TooSmall(connection_struct *conn, uint16 vuid, char *param, char *data,
+static bool api_TooSmall(connection_struct *conn, uint16 vuid, char *param, char *data,
int mdrcnt, int mprcnt,
char **rdata, char **rparam,
int *rdata_len, int *rparam_len);
Check a API string for validity when we only need to check the prefix.
******************************************************************/
-static BOOL prefix_ok(const char *str, const char *prefix)
+static bool prefix_ok(const char *str, const char *prefix)
{
return(strncmp(str,prefix,strlen(prefix)) == 0);
}
return n;
}
-static BOOL init_package(struct pack_desc *p, int count, int subcount)
+static bool init_package(struct pack_desc *p, int count, int subcount)
{
int n = p->buflen;
int i;
Returns True if from tdb, False otherwise.
********************************************************************/
-static BOOL get_driver_name(int snum, pstring drivername)
+static bool get_driver_name(int snum, pstring drivername)
{
NT_PRINTER_INFO_LEVEL *info = NULL;
- BOOL in_tdb = False;
+ bool in_tdb = False;
get_a_printer (NULL, &info, 2, lp_servicename(snum));
if (info != NULL) {
return result;
}
-static BOOL api_DosPrintQGetInfo(connection_struct *conn, uint16 vuid,
+static bool api_DosPrintQGetInfo(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
View list of all print jobs on all queues.
****************************************************************************/
-static BOOL api_DosPrintQEnum(connection_struct *conn, uint16 vuid,
+static bool api_DosPrintQEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt, int mprcnt,
Get info level for a server list query.
****************************************************************************/
-static BOOL check_server_info(int uLevel, char* id)
+static bool check_server_info(int uLevel, char* id)
{
switch( uLevel ) {
case 0:
uint32 type;
fstring comment;
fstring domain;
- BOOL server_added;
+ bool server_added;
};
/*******************************************************************
int count=0;
int alloced=0;
char **lines;
- BOOL local_list_only;
+ bool local_list_only;
int i;
lines = file_lines_load(lock_path(SERVER_LIST), NULL, 0);
fstring stype;
struct srv_info_struct *s;
const char *ptr = lines[i];
- BOOL ok = True;
+ bool ok = True;
if (!*ptr) {
continue;
}
-static BOOL srv_comp(struct srv_info_struct *s1,struct srv_info_struct *s2)
+static bool srv_comp(struct srv_info_struct *s1,struct srv_info_struct *s2)
{
return(strcmp(s1->name,s2->name));
}
extracted from lists saved by nmbd on the local host.
****************************************************************************/
-static BOOL api_RNetServerEnum(connection_struct *conn, uint16 vuid,
+static bool api_RNetServerEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt, int mprcnt, char **rdata,
int counted=0,total=0;
int i,missed;
fstring domain;
- BOOL domain_request;
- BOOL local_request;
+ bool domain_request;
+ bool local_request;
if (!str1 || !str2 || !p) {
return False;
command 0x34 - suspected of being a "Lookup Names" stub api
****************************************************************************/
-static BOOL api_RNetGroupGetUsers(connection_struct *conn, uint16 vuid,
+static bool api_RNetGroupGetUsers(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt, int mprcnt, char **rdata,
get info about a share
****************************************************************************/
-static BOOL check_share_info(int uLevel, char* id)
+static bool check_share_info(int uLevel, char* id)
{
switch( uLevel ) {
case 0:
return len;
}
-static BOOL api_RNetShareGetInfo(connection_struct *conn,uint16 vuid,
+static bool api_RNetShareGetInfo(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Share names longer than 12 bytes must be skipped.
****************************************************************************/
-static BOOL api_RNetShareEnum( connection_struct *conn, uint16 vuid,
+static bool api_RNetShareEnum( connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,
char *p2;
int count = 0;
int total=0,counted=0;
- BOOL missed = False;
+ bool missed = False;
int i;
int data_len, fixed_len, string_len;
int f_len = 0, s_len = 0;
Add a share
****************************************************************************/
-static BOOL api_RNetShareAdd(connection_struct *conn,uint16 vuid,
+static bool api_RNetShareAdd(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
view list of groups available
****************************************************************************/
-static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
+static bool api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Get groups that a user is a member of.
******************************************************************/
-static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid,
+static bool api_NetUserGetGroups(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
const char *level_string;
int count=0;
struct samu *sampw = NULL;
- BOOL ret = False;
+ bool ret = False;
DOM_SID *sids;
gid_t *gids;
size_t num_groups;
Get all users.
******************************************************************/
-static BOOL api_RNetUserEnum(connection_struct *conn, uint16 vuid,
+static bool api_RNetUserEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Get the time of day info.
****************************************************************************/
-static BOOL api_NetRemoteTOD(connection_struct *conn,uint16 vuid,
+static bool api_NetRemoteTOD(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Set the user password.
*****************************************************************************/
-static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid,
+static bool api_SetUserPassword(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Set the user password (SamOEM version - gets plaintext).
****************************************************************************/
-static BOOL api_SamOEMChangePassword(connection_struct *conn,uint16 vuid,
+static bool api_SamOEMChangePassword(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Form: <W> <>
****************************************************************************/
-static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid,
+static bool api_RDosPrintJobDel(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Purge a print queue - or pause or resume it.
****************************************************************************/
-static BOOL api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid,
+static bool api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return True;
}
-static BOOL api_PrintJobInfo(connection_struct *conn, uint16 vuid,
+static bool api_PrintJobInfo(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Get info about the server.
****************************************************************************/
-static BOOL api_RNetServerGetInfo(connection_struct *conn,uint16 vuid,
+static bool api_RNetServerGetInfo(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
Get info about the server.
****************************************************************************/
-static BOOL api_NetWkstaGetInfo(connection_struct *conn,uint16 vuid,
+static bool api_NetWkstaGetInfo(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
#define AF_OP_ACCOUNTS 3
-static BOOL api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
+static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return(True);
}
-static BOOL api_WWkstaUserLogon(connection_struct *conn,uint16 vuid,
+static bool api_WWkstaUserLogon(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
api_WAccessGetUserPerms
****************************************************************************/
-static BOOL api_WAccessGetUserPerms(connection_struct *conn,uint16 vuid,
+static bool api_WAccessGetUserPerms(connection_struct *conn,uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
api_WPrintJobEnumerate
****************************************************************************/
-static BOOL api_WPrintJobGetInfo(connection_struct *conn, uint16 vuid,
+static bool api_WPrintJobGetInfo(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return True;
}
-static BOOL api_WPrintJobEnumerate(connection_struct *conn, uint16 vuid,
+static bool api_WPrintJobEnumerate(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
}
}
-static BOOL api_WPrintDestGetInfo(connection_struct *conn, uint16 vuid,
+static bool api_WPrintDestGetInfo(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return True;
}
-static BOOL api_WPrintDestEnum(connection_struct *conn, uint16 vuid,
+static bool api_WPrintDestEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return True;
}
-static BOOL api_WPrintDriverEnum(connection_struct *conn, uint16 vuid,
+static bool api_WPrintDriverEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return True;
}
-static BOOL api_WPrintQProcEnum(connection_struct *conn, uint16 vuid,
+static bool api_WPrintQProcEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
return True;
}
-static BOOL api_WPrintPortEnum(connection_struct *conn, uint16 vuid,
+static bool api_WPrintPortEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
List open sessions
****************************************************************************/
-static BOOL api_RNetSessionEnum(connection_struct *conn, uint16 vuid,
+static bool api_RNetSessionEnum(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt,int mprcnt,
The buffer was too small.
****************************************************************************/
-static BOOL api_TooSmall(connection_struct *conn,uint16 vuid, char *param, char *data,
+static bool api_TooSmall(connection_struct *conn,uint16 vuid, char *param, char *data,
int mdrcnt, int mprcnt,
char **rdata, char **rparam,
int *rdata_len, int *rparam_len)
The request is not supported.
****************************************************************************/
-static BOOL api_Unsupported(connection_struct *conn, uint16 vuid,
+static bool api_Unsupported(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
int mdrcnt, int mprcnt,
static const struct {
const char *name;
int id;
- BOOL (*fn)(connection_struct *, uint16,
+ bool (*fn)(connection_struct *, uint16,
char *, int,
char *, int,
int,int,char **,char **,int *,int *);
- BOOL auth_user; /* Deny anonymous access? */
+ bool auth_user; /* Deny anonymous access? */
} api_commands[] = {
{"RNetShareEnum", RAP_WshareEnum, api_RNetShareEnum, True},
{"RNetShareGetInfo", RAP_WshareGetInfo, api_RNetShareGetInfo},
const char *name2 = NULL;
int rdata_len = 0;
int rparam_len = 0;
- BOOL reply=False;
+ bool reply=False;
int i;
if (!params) {
/*
see if a filename has come out of our mangling code
*/
-BOOL mangle_is_mangled(const char *s, const struct share_params *p)
+bool mangle_is_mangled(const char *s, const struct share_params *p)
{
return mangle_fns->is_mangled(s, p);
}
/*
see if a filename matches the rules of a 8.3 filename
*/
-BOOL mangle_is_8_3(const char *fname, BOOL check_case,
+bool mangle_is_8_3(const char *fname, bool check_case,
const struct share_params *p)
{
return mangle_fns->is_8_3(fname, check_case, False, p);
}
-BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case,
+bool mangle_is_8_3_wildcards(const char *fname, bool check_case,
const struct share_params *p)
{
return mangle_fns->is_8_3(fname, check_case, True, p);
}
-BOOL mangle_must_mangle(const char *fname,
+bool mangle_must_mangle(const char *fname,
const struct share_params *p)
{
if (!lp_manglednames(p)) {
looking for a matching name if it doesn't. It should succeed most of the time
or there will be a huge performance penalty
*/
-BOOL mangle_lookup_name_from_8_3(TALLOC_CTX *ctx,
+bool mangle_lookup_name_from_8_3(TALLOC_CTX *ctx,
const char *in,
char **out, /* talloced on the given context. */
const struct share_params *p)
JRA.
*/
-BOOL name_to_8_3(const char *in,
+bool name_to_8_3(const char *in,
char out[13],
- BOOL cache83,
+ bool cache83,
const struct share_params *p)
{
memset(out,'\0',13);
#define MANGLE_BASE (sizeof(basechars)/sizeof(char)-1)
static unsigned char chartest[256] = { 0 };
-static BOOL ct_initialized = False;
+static bool ct_initialized = False;
#define mangle(V) ((char)(basechars[(V) % MANGLE_BASE]))
#define BASECHAR_MASK 0xf0
/* -------------------------------------------------------------------- */
-static NTSTATUS has_valid_83_chars(const smb_ucs2_t *s, BOOL allow_wildcards)
+static NTSTATUS has_valid_83_chars(const smb_ucs2_t *s, bool allow_wildcards)
{
if (!*s) {
return NT_STATUS_INVALID_PARAMETER;
return NT_STATUS_OK;
}
-static NTSTATUS has_illegal_chars(const smb_ucs2_t *s, BOOL allow_wildcards)
+static NTSTATUS has_illegal_chars(const smb_ucs2_t *s, bool allow_wildcards)
{
if (!allow_wildcards && ms_has_wild_w(s)) {
return NT_STATUS_UNSUCCESSFUL;
*/
static NTSTATUS mangle_get_prefix(const smb_ucs2_t *ucs2_string, smb_ucs2_t **prefix,
- smb_ucs2_t **extension, BOOL allow_wildcards)
+ smb_ucs2_t **extension, bool allow_wildcards)
{
size_t ext_len;
smb_ucs2_t *p;
* ************************************************************************** **
*/
-static NTSTATUS is_valid_name(const smb_ucs2_t *fname, BOOL allow_wildcards, BOOL only_8_3)
+static NTSTATUS is_valid_name(const smb_ucs2_t *fname, bool allow_wildcards, bool only_8_3)
{
smb_ucs2_t *str, *p;
size_t num_ucs2_chars;
return ret;
}
-static NTSTATUS is_8_3_w(const smb_ucs2_t *fname, BOOL allow_wildcards)
+static NTSTATUS is_8_3_w(const smb_ucs2_t *fname, bool allow_wildcards)
{
smb_ucs2_t *pref = 0, *ext = 0;
size_t plen;
return ret;
}
-static BOOL is_8_3(const char *fname, BOOL check_case, BOOL allow_wildcards,
+static bool is_8_3(const char *fname, bool check_case, bool allow_wildcards,
const struct share_params *p)
{
const char *f;
* ************************************************************************** **
*/
-static BOOL is_mangled(const char *s, const struct share_params *p)
+static bool is_mangled(const char *s, const struct share_params *p)
{
char *magic;
* ************************************************************************** **
*/
-static BOOL lookup_name_from_8_3(TALLOC_CTX *ctx,
+static bool lookup_name_from_8_3(TALLOC_CTX *ctx,
const char *in,
char **out, /* talloced on the given context. */
const struct share_params *p)
Do the actual mangling to 8.3 format.
*****************************************************************************/
-static BOOL to_8_3(const char *in, char out[13], int default_case)
+static bool to_8_3(const char *in, char out[13], int default_case)
{
int csum;
char *p;
p = strrchr(s,'.');
if( p && (strlen(p+1) < (size_t)4) ) {
- BOOL all_normal = ( strisnormal(p+1, default_case) ); /* XXXXXXXXX */
+ bool all_normal = ( strisnormal(p+1, default_case) ); /* XXXXXXXXX */
if( all_normal && p[1] != 0 ) {
*p = 0;
return True;
}
-static BOOL must_mangle(const char *name,
+static bool must_mangle(const char *name,
const struct share_params *p)
{
smb_ucs2_t *name_ucs2 = NULL;
* ****************************************************************************
*/
-static BOOL hash_name_to_8_3(const char *in,
+static bool hash_name_to_8_3(const char *in,
char out[13],
- BOOL cache83,
+ bool cache83,
int default_case,
const struct share_params *p)
{
/*
initialise (ie. allocate) the prefix cache
*/
-static BOOL cache_init(void)
+static bool cache_init(void)
{
if (prefix_cache) {
return True;
In this algorithm, mangled names use only pure ascii characters (no
multi-byte) so we can avoid doing a UCS2 conversion
*/
-static BOOL is_mangled_component(const char *name, size_t len)
+static bool is_mangled_component(const char *name, size_t len)
{
unsigned int i;
directory separators. It should return true if any component is
mangled
*/
-static BOOL is_mangled(const char *name, const struct share_params *parm)
+static bool is_mangled(const char *name, const struct share_params *parm)
{
const char *p;
const char *s;
simplifies things greatly (it means that we know the string won't
get larger when converted from UNIX to DOS formats)
*/
-static BOOL is_8_3(const char *name, BOOL check_case, BOOL allow_wildcards, const struct share_params *p)
+static bool is_8_3(const char *name, bool check_case, bool allow_wildcards, const struct share_params *p)
{
int len, i;
char *dot_p;
try to find a 8.3 name in the cache, and if found then
replace the string with the original long name.
*/
-static BOOL lookup_name_from_8_3(TALLOC_CTX *ctx,
+static bool lookup_name_from_8_3(TALLOC_CTX *ctx,
const char *name,
char **pp_out, /* talloced on the given context. */
const struct share_params *p)
/*
look for a DOS reserved name
*/
-static BOOL is_reserved_name(const char *name)
+static bool is_reserved_name(const char *name)
{
if (FLAG_CHECK(name[0], FLAG_POSSIBLE1) &&
FLAG_CHECK(name[1], FLAG_POSSIBLE2) &&
A filename ending in ' ' is not legal either. See bug id #2769.
*/
-static BOOL is_legal_name(const char *name)
+static bool is_legal_name(const char *name)
{
const char *dot_pos = NULL;
- BOOL alldots = True;
+ bool alldots = True;
size_t numdots = 0;
while (*name) {
return True;
}
-static BOOL must_mangle(const char *name,
+static bool must_mangle(const char *name,
const struct share_params *p)
{
if (is_reserved_name(name)) {
if cache83 is not set then we don't cache the result
*/
-static BOOL hash2_name_to_8_3(const char *name,
+static bool hash2_name_to_8_3(const char *name,
char new_name[13],
- BOOL cache83,
+ bool cache83,
int default_case,
const struct share_params *p)
{
static void posix_mangle_reset(void)
{;}
-static BOOL posix_is_mangled(const char *s, const struct share_params *p)
+static bool posix_is_mangled(const char *s, const struct share_params *p)
{
return False;
}
-static BOOL posix_must_mangle(const char *s, const struct share_params *p)
+static bool posix_must_mangle(const char *s, const struct share_params *p)
{
return False;
}
-static BOOL posix_is_8_3(const char *fname,
- BOOL check_case,
- BOOL allow_wildcards,
+static bool posix_is_8_3(const char *fname,
+ bool check_case,
+ bool allow_wildcards,
const struct share_params *p)
{
return False;
}
-static BOOL posix_lookup_name_from_8_3(TALLOC_CTX *ctx,
+static bool posix_lookup_name_from_8_3(TALLOC_CTX *ctx,
const char *in,
char **out, /* talloced on the given context. */
const struct share_params *p)
return False;
}
-static BOOL posix_name_to_8_3(const char *in,
+static bool posix_name_to_8_3(const char *in,
char out[13],
- BOOL cache83,
+ bool cache83,
int default_case,
const struct share_params *p)
{
Returns True if username was changed, false otherwise.
********************************************************************/
-BOOL map_username(fstring user)
+bool map_username(fstring user)
{
- static BOOL initialised=False;
+ static bool initialised=False;
static fstring last_from,last_to;
XFILE *f;
char *mapfile = lp_username_map();
char *s;
pstring buf;
- BOOL mapped_user = False;
+ bool mapped_user = False;
char *cmd = lp_username_map_script();
if (!*user)
char *unixname = s;
char *dosname = strchr_m(unixname,'=');
char **dosuserlist;
- BOOL return_if_mapped = False;
+ bool return_if_mapped = False;
if (!dosname)
continue;
**********************************************************************/
static NTSTATUS parse_dfs_path(const char *pathname,
- BOOL allow_wcards,
+ bool allow_wcards,
struct dfs_path *pdp, /* MUST BE TALLOCED */
- BOOL *ppath_contains_wcard)
+ bool *ppath_contains_wcard)
{
char *pathname_local;
char *p,*temp;
server we're referring to understands posix paths.
**********************************************************************/
-static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx,
+static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
const char *target,
struct referral **preflist,
int *refcount)
returns the target string from inside the link.
**********************************************************************/
-static BOOL is_msdfs_link_internal(TALLOC_CTX *ctx,
+static bool is_msdfs_link_internal(TALLOC_CTX *ctx,
connection_struct *conn,
const char *path,
char **pp_link_target,
Returns true if the unix path is a valid msdfs symlink.
**********************************************************************/
-BOOL is_msdfs_link(connection_struct *conn,
+bool is_msdfs_link(connection_struct *conn,
const char *path,
SMB_STRUCT_STAT *sbufp)
{
const char *dfspath, /* Incoming complete dfs path */
const struct dfs_path *pdp, /* Parsed out
server+share+extrapath. */
- BOOL search_flag, /* Called from a findfirst ? */
+ bool search_flag, /* Called from a findfirst ? */
int *consumedcntp,
char **pp_targetpath)
{
static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
connection_struct *conn,
const char *path_in,
- BOOL search_wcard_flag,
+ bool search_wcard_flag,
char **pp_path_out,
- BOOL *ppath_contains_wcard)
+ bool *ppath_contains_wcard)
{
NTSTATUS status;
struct dfs_path *pdp = TALLOC_P(ctx, struct dfs_path);
const char *dfs_path,
struct junction_map *jucn,
int *consumedcntp,
- BOOL *self_referralp)
+ bool *self_referralp)
{
struct referral *ref;
const char *dfs_path,
struct junction_map *jucn,
int *consumedcntp,
- BOOL *self_referralp)
+ bool *self_referralp)
{
struct connection_struct conns;
struct connection_struct *conn = &conns;
char *targetpath = NULL;
int snum;
NTSTATUS status = NT_STATUS_NOT_FOUND;
- BOOL dummy;
+ bool dummy;
struct dfs_path *pdp = TALLOC_P(ctx, struct dfs_path);
if (!pdp) {
char **ppdata,
struct junction_map *junction,
int consumedcnt,
- BOOL self_referral)
+ bool self_referral)
{
char* pdata = *ppdata;
char **ppdata,
struct junction_map *junction,
int consumedcnt,
- BOOL self_referral)
+ bool self_referral)
{
char *pdata = *ppdata;
{
struct junction_map *junction = NULL;
int consumedcnt = 0;
- BOOL self_referral = False;
+ bool self_referral = False;
int reply_size = 0;
char *pathnamep = NULL;
char *local_dfs_path = NULL;
Creates a junction structure from a DFS pathname
**********************************************************************/
-BOOL create_junction(TALLOC_CTX *ctx,
+bool create_junction(TALLOC_CTX *ctx,
const char *dfs_path,
struct junction_map *jucn)
{
int snum;
- BOOL dummy;
+ bool dummy;
struct dfs_path *pdp = TALLOC_P(ctx,struct dfs_path);
NTSTATUS status;
Forms a valid Unix pathname from the junction
**********************************************************************/
-static BOOL junction_to_local_path(const struct junction_map *jucn,
+static bool junction_to_local_path(const struct junction_map *jucn,
char **pp_path_out,
connection_struct *conn_out)
{
return True;
}
-BOOL create_msdfs_link(const struct junction_map *jucn,
- BOOL exists)
+bool create_msdfs_link(const struct junction_map *jucn,
+ bool exists)
{
char *path = NULL;
char *msdfs_link = NULL;
connection_struct conns;
connection_struct *conn = &conns;
int i=0;
- BOOL insert_comma = False;
- BOOL ret = False;
+ bool insert_comma = False;
+ bool ret = False;
ZERO_STRUCT(conns);
return ret;
}
-BOOL remove_msdfs_link(const struct junction_map *jucn)
+bool remove_msdfs_link(const struct junction_map *jucn)
{
char *path = NULL;
connection_struct conns;
connection_struct *conn = &conns;
- BOOL ret = False;
+ bool ret = False;
ZERO_STRUCT(conns);
NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
connection_struct *conn,
- BOOL dfs_pathnames,
+ bool dfs_pathnames,
const char *name_in,
char **pp_name_out)
{
NTSTATUS status = NT_STATUS_OK;
- BOOL dummy;
+ bool dummy;
if (dfs_pathnames) {
status = dfs_redirect(ctx,
conn,
/******************************************************************************
Core function to resolve a dfs pathname possibly containing a wildcard.
- This function is identical to the above except for the BOOL param to
+ This function is identical to the above except for the bool param to
dfs_redirect but I need this to be separate so it's really clear when
we're allowing wildcards and when we're not. JRA.
******************************************************************************/
NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
connection_struct *conn,
- BOOL dfs_pathnames,
+ bool dfs_pathnames,
const char *name_in,
char **pp_name_out,
- BOOL *ppath_contains_wcard)
+ bool *ppath_contains_wcard)
{
NTSTATUS status = NT_STATUS_OK;
if (dfs_pathnames) {
extern enum protocol_types Protocol;
extern int max_recv;
-BOOL global_encrypted_passwords_negotiated = False;
-BOOL global_spnego_negotiated = False;
+bool global_encrypted_passwords_negotiated = False;
+bool global_spnego_negotiated = False;
struct auth_context *negprot_global_auth_context = NULL;
static void get_challenge(uint8 buff[8])
int secword=0;
char *p, *q;
- BOOL negotiate_spnego = False;
+ bool negotiate_spnego = False;
time_t t = time(NULL);
ssize_t ret;
char **cliprotos;
int i;
- static BOOL done_negprot = False;
+ static bool done_negprot = False;
START_PROFILE(SMBnegprot);
* Needed for auto generation of proto.h.
*/
-BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
(*bsize) = 512; /* This value should be ignored */
uint16 mid;
};
-static BOOL notify_change_record_identical(struct notify_change *c1,
+static bool notify_change_record_identical(struct notify_change *c1,
struct notify_change *c2)
{
/* Note this is deliberately case sensitive. */
return False;
}
-static BOOL notify_marshall_changes(int num_changes,
+static bool notify_marshall_changes(int num_changes,
uint32 max_offset,
struct notify_change *changes,
prs_struct *ps)
}
NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
- BOOL recursive)
+ bool recursive)
{
char *fullpath;
struct notify_entry e;
}
NTSTATUS change_notify_add_request(const uint8 *inbuf, uint32 max_param,
- uint32 filter, BOOL recursive,
+ uint32 filter, bool recursive,
struct files_struct *fsp)
{
struct notify_change_request *request = NULL;
see if a particular event from inotify really does match a requested
notify event in SMB
*/
-static BOOL filter_match(struct inotify_watch_context *w,
+static bool filter_match(struct inotify_watch_context *w,
struct inotify_event *e)
{
DEBUG(10, ("filter_match: e->mask=%x, w->mask=%x, w->filter=%x\n",
return ret;
}
-static BOOL allready_in_quota_list(SMB_NTQUOTA_LIST *qt_list, uid_t uid)
+static bool allready_in_quota_list(SMB_NTQUOTA_LIST *qt_list, uid_t uid)
{
SMB_NTQUOTA_LIST *tmp_list = NULL;
Is it an NTFS stream name ?
****************************************************************************/
-BOOL is_ntfs_stream_name(const char *fname)
+bool is_ntfs_stream_name(const char *fname)
{
if (lp_posix_pathnames()) {
return False;
struct case_semantics_state {
connection_struct *conn;
- BOOL case_sensitive;
- BOOL case_preserve;
- BOOL short_case_preserve;
+ bool case_sensitive;
+ bool case_preserve;
+ bool short_case_preserve;
};
/****************************************************************************
struct timespec c_timespec;
struct timespec a_timespec;
struct timespec m_timespec;
- BOOL extended_oplock_granted = False;
+ bool extended_oplock_granted = False;
NTSTATUS status;
struct case_semantics_state *case_state = NULL;
TALLOC_CTX *ctx = talloc_tos();
int info = 0;
files_struct *fsp = NULL;
char *p = NULL;
- BOOL extended_oplock_granted = False;
+ bool extended_oplock_granted = False;
uint32 flags;
uint32 access_mask;
uint32 file_attributes;
char *newname = NULL;
char *p;
NTSTATUS status;
- BOOL src_has_wcard = False;
- BOOL dest_has_wcard = False;
+ bool src_has_wcard = False;
+ bool dest_has_wcard = False;
uint32 attrs;
uint16 rename_type;
TALLOC_CTX *ctx = talloc_tos();
files_struct *fsp;
uint32 filter;
NTSTATUS status;
- BOOL recursive;
+ bool recursive;
if(setup_count < 6) {
reply_doserror(req, ERRDOS, ERRbadfunc);
char *params = *ppparams;
char *new_name = NULL;
files_struct *fsp = NULL;
- BOOL replace_if_exists = False;
- BOOL dest_has_wcard = False;
+ bool replace_if_exists = False;
+ bool dest_has_wcard = False;
NTSTATUS status;
TALLOC_CTX *ctx = talloc_tos();
files_struct *fsp;
uint8 isFSctl;
uint8 compfilter;
- static BOOL logged_message;
+ static bool logged_message;
char *pdata = *ppdata;
if (setup_count != 8) {
*/
SHADOW_COPY_DATA *shadow_data = NULL;
TALLOC_CTX *shadow_mem_ctx = NULL;
- BOOL labels = False;
+ bool labels = False;
uint32 labels_data_count = 0;
uint32 i;
char *cur_pdata;
uint16 level = 0;
size_t sid_len;
DOM_SID sid;
- BOOL start_enum = True;
+ bool start_enum = True;
SMB_NTQUOTA_STRUCT qt;
SMB_NTQUOTA_LIST *tmp_list;
SMB_NTQUOTA_HANDLE *qt_handle = NULL;
extern const struct generic_mapping file_generic_mapping;
extern struct current_user current_user;
extern userdom_struct current_user_info;
-extern BOOL global_client_failed_oplock_break;
+extern bool global_client_failed_oplock_break;
struct deferred_open_record {
- BOOL delayed_for_oplocks;
+ bool delayed_for_oplocks;
struct file_id id;
};
NTSTATUS status = NT_STATUS_OK;
int accmode = (flags & O_ACCMODE);
int local_flags = flags;
- BOOL file_existed = VALID_STAT(*psbuf);
+ bool file_existed = VALID_STAT(*psbuf);
fsp->fh->fd = -1;
errno = EPERM;
Return True if the filename is one of the special executable types.
********************************************************************/
-static BOOL is_executable(const char *fname)
+static bool is_executable(const char *fname)
{
if ((fname = strrchr_m(fname,'.'))) {
if (strequal(fname,".com") ||
Returns True if conflict, False if not.
****************************************************************************/
-static BOOL share_conflict(struct share_mode_entry *entry,
+static bool share_conflict(struct share_mode_entry *entry,
uint32 access_mask,
uint32 share_access)
{
}
#endif
-static BOOL is_stat_open(uint32 access_mask)
+static bool is_stat_open(uint32 access_mask)
{
return (access_mask &&
((access_mask & ~(SYNCHRONIZE_ACCESS| FILE_READ_ATTRIBUTES|
uint32 access_mask,
uint32 share_access,
uint32 create_options,
- BOOL *file_existed)
+ bool *file_existed)
{
int i;
return NT_STATUS_OK;
}
-static BOOL is_delete_request(files_struct *fsp) {
+static bool is_delete_request(files_struct *fsp) {
return ((fsp->access_mask == DELETE_ACCESS) &&
(fsp->oplock_type == NO_OPLOCK));
}
* 3) Only level2 around: Grant level2 and do nothing else.
*/
-static BOOL delay_for_oplocks(struct share_mode_lock *lck,
+static bool delay_for_oplocks(struct share_mode_lock *lck,
files_struct *fsp,
uint16 mid,
int pass_number,
{
int i;
struct share_mode_entry *exclusive = NULL;
- BOOL valid_entry = False;
- BOOL delay_it = False;
- BOOL have_level2 = False;
+ bool valid_entry = False;
+ bool delay_it = False;
+ bool have_level2 = False;
NTSTATUS status;
char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE];
return True;
}
-static BOOL request_timed_out(struct timeval request_time,
+static bool request_timed_out(struct timeval request_time,
struct timeval timeout)
{
struct timeval now, end_time;
On overwrite open ensure that the attributes match.
****************************************************************************/
-static BOOL open_match_attributes(connection_struct *conn,
+static bool open_match_attributes(connection_struct *conn,
const char *path,
uint32 old_dos_attr,
uint32 new_dos_attr,
Open a file with a share mode - old openX method - map into NTCreate.
****************************************************************************/
-BOOL map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func,
+bool map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func,
uint32 *paccess_mask,
uint32 *pshare_mode,
uint32 *pcreate_disposition,
{
int flags=0;
int flags2=0;
- BOOL file_existed = VALID_STAT(*psbuf);
- BOOL def_acl = False;
- BOOL posix_open = False;
- BOOL new_file_created = False;
+ bool file_existed = VALID_STAT(*psbuf);
+ bool def_acl = False;
+ bool posix_open = False;
+ bool new_file_created = False;
struct file_id id;
NTSTATUS fsp_open = NT_STATUS_ACCESS_DENIED;
files_struct *fsp = NULL;
if (!NT_STATUS_IS_OK(status)) {
uint32 can_access_mask;
- BOOL can_access = True;
+ bool can_access = True;
SMB_ASSERT(NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION));
files_struct **result)
{
files_struct *fsp = NULL;
- BOOL dir_existed = VALID_STAT(*psbuf) ? True : False;
+ bool dir_existed = VALID_STAT(*psbuf) ? True : False;
struct share_mode_lock *lck = NULL;
NTSTATUS status;
int info = 0;
/* Current number of oplocks we have outstanding. */
static int32 exclusive_oplocks_open = 0;
static int32 level_II_oplocks_open = 0;
-BOOL global_client_failed_oplock_break = False;
+bool global_client_failed_oplock_break = False;
extern uint32 global_client_caps;
extern int smb_read_error;
Return True if an oplock message is pending.
****************************************************************************/
-BOOL oplock_message_waiting(fd_set *fds)
+bool oplock_message_waiting(fd_set *fds)
{
if (koplocks && koplocks->msg_waiting(fds)) {
return True;
disabled (just sets flags). Returns True if oplock set.
****************************************************************************/
-BOOL set_file_oplock(files_struct *fsp, int oplock_type)
+bool set_file_oplock(files_struct *fsp, int oplock_type)
{
if (koplocks && !koplocks->set_oplock(fsp, oplock_type)) {
return False;
to none even if a "break-to-level II" was sent.
****************************************************************************/
-BOOL remove_oplock(files_struct *fsp)
+bool remove_oplock(files_struct *fsp)
{
- BOOL ret;
+ bool ret;
struct share_mode_lock *lck;
/* Remove the oplock flag from the sharemode. */
/*
* Deal with a reply when a break-to-level II was sent.
*/
-BOOL downgrade_oplock(files_struct *fsp)
+bool downgrade_oplock(files_struct *fsp)
{
- BOOL ret;
+ bool ret;
struct share_mode_lock *lck;
lck = get_share_mode_lock(NULL, fsp->file_id, NULL, NULL);
struct share_mode_entry msg;
files_struct *fsp;
char *break_msg;
- BOOL sign_state;
+ bool sign_state;
if (data->data == NULL) {
DEBUG(0, ("Got NULL buffer\n"));
struct share_mode_entry msg;
files_struct *fsp;
char *break_msg;
- BOOL break_to_level2 = False;
- BOOL sign_state;
+ bool break_to_level2 = False;
+ bool sign_state;
if (data->data == NULL) {
DEBUG(0, ("Got NULL buffer\n"));
unsigned long file_id;
files_struct *fsp;
char *break_msg;
- BOOL sign_state;
+ bool sign_state;
if (data->data == NULL) {
DEBUG(0, ("Got NULL buffer\n"));
Setup oplocks for this process.
****************************************************************************/
-BOOL init_oplocks(struct messaging_context *msg_ctx)
+bool init_oplocks(struct messaging_context *msg_ctx)
{
DEBUG(3,("init_oplocks: initializing messages.\n"));
Test to see if IRIX kernel oplocks work.
****************************************************************************/
-static BOOL irix_oplocks_available(void)
+static bool irix_oplocks_available(void)
{
int fd;
int pfd[2];
Attempt to set an kernel oplock on a file.
****************************************************************************/
-static BOOL irix_set_kernel_oplock(files_struct *fsp, int oplock_type)
+static bool irix_set_kernel_oplock(files_struct *fsp, int oplock_type)
{
if (sys_fcntl_long(fsp->fh->fd, F_OPLKREG, oplock_pipe_write) == -1) {
if(errno != EAGAIN) {
Note that fds MAY BE NULL ! If so we must do our own select.
****************************************************************************/
-static BOOL irix_oplock_msg_waiting(fd_set *fds)
+static bool irix_oplock_msg_waiting(fd_set *fds)
{
int selrtn;
fd_set myfds;
Attempt to set an kernel oplock on a file.
****************************************************************************/
-static BOOL linux_set_kernel_oplock(files_struct *fsp, int oplock_type)
+static bool linux_set_kernel_oplock(files_struct *fsp, int oplock_type)
{
if ( SMB_VFS_LINUX_SETLEASE(fsp,fsp->fh->fd, F_WRLCK) == -1) {
DEBUG(3,("linux_set_kernel_oplock: Refused oplock on file %s, "
See if a oplock message is waiting.
****************************************************************************/
-static BOOL linux_oplock_msg_waiting(fd_set *fds)
+static bool linux_oplock_msg_waiting(fd_set *fds)
{
return signals_received != 0;
}
See if the kernel supports oplocks.
****************************************************************************/
-static BOOL linux_oplocks_available(void)
+static bool linux_oplocks_available(void)
{
int fd, ret;
fd = open("/dev/null", O_RDONLY);
SERVER_ALLOCATED_REQUIRED_YES);
}
-BOOL is_partial_auth_vuid(uint16 vuid)
+bool is_partial_auth_vuid(uint16 vuid)
{
if (vuid == UID_FIELD_INVALID) {
return False;
try lower case.
****************************************************************************/
-BOOL user_in_netgroup(const char *user, const char *ngname)
+bool user_in_netgroup(const char *user, const char *ngname)
{
#ifdef HAVE_NETGROUP
static char *mydomain = NULL;
and netgroup lists.
****************************************************************************/
-BOOL user_in_list(const char *user,const char **list)
+bool user_in_list(const char *user,const char **list)
{
if (!list || !*list)
return False;
Check if a username is valid.
****************************************************************************/
-static BOOL user_ok(const char *user, int snum)
+static bool user_ok(const char *user, int snum)
{
char **valid, **invalid;
- BOOL ret;
+ bool ret;
valid = invalid = NULL;
ret = True;
Note this is *NOT* used when logging on using sessionsetup_and_X.
****************************************************************************/
-BOOL authorise_login(int snum, fstring user, DATA_BLOB password,
- BOOL *guest)
+bool authorise_login(int snum, fstring user, DATA_BLOB password,
+ bool *guest)
{
- BOOL ok = False;
+ bool ok = False;
#ifdef DEBUG_PASSWORD
DEBUG(100,("authorise_login: checking authorisation on "
size_t numtowrite = SVAL(req->inbuf,smb_vwv10);
int nwritten = -1;
int smb_doff = SVAL(req->inbuf, smb_vwv11);
- BOOL pipe_start_message_raw =
+ bool pipe_start_message_raw =
((SVAL(req->inbuf, smb_vwv7)
& (PIPE_START_MESSAGE|PIPE_RAW_MODE))
== (PIPE_START_MESSAGE|PIPE_RAW_MODE));
int smb_mincnt = SVAL(req->inbuf,smb_vwv6);
int nread = -1;
char *data;
- BOOL unused;
+ bool unused;
/* we don't use the offset given to use for pipe reads. This
is deliberate, instead we always return the next lump of
enum ace_owner owner_type;
enum ace_attribute attr;
posix_id unix_ug;
- BOOL inherited;
+ bool inherited;
} canon_ace;
#define ALL_ACE_PERMS (S_IRUSR|S_IWUSR|S_IXUSR)
};
struct pai_val {
- BOOL pai_protected;
+ bool pai_protected;
unsigned int num_entries;
struct pai_entry *entry_list;
unsigned int num_def_entries;
Create the on-disk format. Caller must free.
************************************************************************/
-static char *create_pai_buf(canon_ace *file_ace_list, canon_ace *dir_ace_list, BOOL pai_protected, size_t *store_size)
+static char *create_pai_buf(canon_ace *file_ace_list, canon_ace *dir_ace_list, bool pai_protected, size_t *store_size)
{
char *pai_buf = NULL;
canon_ace *ace_list = NULL;
************************************************************************/
static void store_inheritance_attributes(files_struct *fsp, canon_ace *file_ace_list,
- canon_ace *dir_ace_list, BOOL pai_protected)
+ canon_ace *dir_ace_list, bool pai_protected)
{
int ret;
size_t store_size;
Was this ACL protected ?
************************************************************************/
-static BOOL get_protected_flag(struct pai_val *pal)
+static bool get_protected_flag(struct pai_val *pal)
{
if (!pal)
return False;
Was this ACE inherited ?
************************************************************************/
-static BOOL get_inherited_flag(struct pai_val *pal, canon_ace *ace_entry, BOOL default_ace)
+static bool get_inherited_flag(struct pai_val *pal, canon_ace *ace_entry, bool default_ace)
{
struct pai_entry *paie;
Ensure an attribute just read is valid.
************************************************************************/
-static BOOL check_pai_ok(char *pai_buf, size_t pai_buf_data_size)
+static bool check_pai_ok(char *pai_buf, size_t pai_buf_data_size)
{
uint16 num_entries;
uint16 num_def_entries;
Is the identity in two ACEs equal ? Check both SID and uid/gid.
****************************************************************************/
-static BOOL identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2)
+static bool identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2)
{
if (sid_equal(&ace1->trustee, &ace2->trustee)) {
return True;
Check if we need to return NT4.x compatible ACL entries.
****************************************************************************/
-static BOOL nt4_compatible_acls(void)
+static bool nt4_compatible_acls(void)
{
int compat = lp_acl_compatibility();
static SEC_ACCESS map_canon_ace_perms(int snum,
int *pacl_type,
mode_t perms,
- BOOL directory_ace)
+ bool directory_ace)
{
SEC_ACCESS sa;
uint32 nt_mask = 0;
expensive and will need optimisation. A *lot* of optimisation :-). JRA.
****************************************************************************/
-static BOOL uid_entry_in_group( canon_ace *uid_ace, canon_ace *group_ace )
+static bool uid_entry_in_group( canon_ace *uid_ace, canon_ace *group_ace )
{
const char *u_name = NULL;
type.
****************************************************************************/
-static BOOL ensure_canon_entry_valid(canon_ace **pp_ace,
+static bool ensure_canon_entry_valid(canon_ace **pp_ace,
const files_struct *fsp,
const DOM_SID *pfile_owner_sid,
const DOM_SID *pfile_grp_sid,
SMB_STRUCT_STAT *pst,
- BOOL setting_acl)
+ bool setting_acl)
{
canon_ace *pace;
- BOOL got_user = False;
- BOOL got_grp = False;
- BOOL got_other = False;
+ bool got_user = False;
+ bool got_grp = False;
+ bool got_other = False;
canon_ace *pace_other = NULL;
for (pace = *pp_ace; pace; pace = pace->next) {
/* See if the owning user is in any of the other groups in
the ACE. If so, OR in the permissions from that group. */
- BOOL group_matched = False;
+ bool group_matched = False;
canon_ace *pace_iter;
for (pace_iter = *pp_ace; pace_iter; pace_iter = pace_iter->next) {
static void check_owning_objs(canon_ace *ace, DOM_SID *pfile_owner_sid, DOM_SID *pfile_grp_sid)
{
- BOOL got_user_obj, got_group_obj;
+ bool got_user_obj, got_group_obj;
canon_ace *current_ace;
int i, entries;
Unpack a SEC_DESC into two canonical ace lists.
****************************************************************************/
-static BOOL create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst,
+static bool create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst,
DOM_SID *pfile_owner_sid,
DOM_SID *pfile_grp_sid,
canon_ace **ppfile_ace, canon_ace **ppdir_ace,
SEC_ACL *dacl)
{
- BOOL all_aces_are_inherit_only = (fsp->is_directory ? True : False);
+ bool all_aces_are_inherit_only = (fsp->is_directory ? True : False);
canon_ace *file_ace = NULL;
canon_ace *dir_ace = NULL;
canon_ace *current_ace = NULL;
- BOOL got_dir_allow = False;
- BOOL got_file_allow = False;
+ bool got_dir_allow = False;
+ bool got_file_allow = False;
int i, j;
*ppfile_ace = NULL;
no user/group/world entries.
****************************************************************************/
-static mode_t create_default_mode(files_struct *fsp, BOOL interitable_mode)
+static mode_t create_default_mode(files_struct *fsp, bool interitable_mode)
{
int snum = SNUM(fsp->conn);
mode_t and_bits = (mode_t)0;
succeeding.
****************************************************************************/
-static BOOL unpack_canon_ace(files_struct *fsp,
+static bool unpack_canon_ace(files_struct *fsp,
SMB_STRUCT_STAT *pst,
DOM_SID *pfile_owner_sid,
DOM_SID *pfile_grp_sid,
Check if the current user group list contains a given group.
****************************************************************************/
-static BOOL current_user_in_group(gid_t gid)
+static bool current_user_in_group(gid_t gid)
{
int i;
and 'dos filemode'
****************************************************************************/
-static BOOL acl_group_override(connection_struct *conn, gid_t prim_gid)
+static bool acl_group_override(connection_struct *conn, gid_t prim_gid)
{
if ( (errno == EACCES || errno == EPERM)
&& (lp_acl_group_control(SNUM(conn)) || lp_dos_filemode(SNUM(conn)))
Attempt to apply an ACL to a file or directory.
****************************************************************************/
-static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL default_ace, gid_t prim_gid, BOOL *pacl_set_support)
+static bool set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, bool default_ace, gid_t prim_gid, bool *pacl_set_support)
{
connection_struct *conn = fsp->conn;
- BOOL ret = False;
+ bool ret = False;
SMB_ACL_T the_acl = SMB_VFS_SYS_ACL_INIT(conn, (int)count_canon_ace_list(the_ace) + 1);
canon_ace *p_ace;
int i;
SMB_ACL_ENTRY_T mask_entry;
- BOOL got_mask_entry = False;
+ bool got_mask_entry = False;
SMB_ACL_PERMSET_T mask_permset;
SMB_ACL_TYPE_T the_acl_type = (default_ace ? SMB_ACL_TYPE_DEFAULT : SMB_ACL_TYPE_ACCESS);
- BOOL needs_mask = False;
+ bool needs_mask = False;
mode_t mask_perms = 0;
#if defined(POSIX_ACL_NEEDS_MASK)
#define MAP_PERM(p,mask,result) (((p) & (mask)) ? (result) : 0 )
-static BOOL convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file_ace_list, mode_t *posix_perms)
+static bool convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file_ace_list, mode_t *posix_perms)
{
int snum = SNUM(fsp->conn);
size_t ace_count = count_canon_ace_list(file_ace_list);
for (j = i+1; j < num_aces; j++) {
uint32 i_flags_ni = (nt_ace_list[i].flags & ~SEC_ACE_FLAG_INHERITED_ACE);
uint32 j_flags_ni = (nt_ace_list[j].flags & ~SEC_ACE_FLAG_INHERITED_ACE);
- BOOL i_inh = (nt_ace_list[i].flags & SEC_ACE_FLAG_INHERITED_ACE) ? True : False;
- BOOL j_inh = (nt_ace_list[j].flags & SEC_ACE_FLAG_INHERITED_ACE) ? True : False;
+ bool i_inh = (nt_ace_list[i].flags & SEC_ACE_FLAG_INHERITED_ACE) ? True : False;
+ bool j_inh = (nt_ace_list[j].flags & SEC_ACE_FLAG_INHERITED_ACE) ? True : False;
/* We know the lower number ACE's are file entries. */
if ((nt_ace_list[i].type == nt_ace_list[j].type) &&
/* Case (2) / (3) */
if (lp_enable_privileges()) {
- BOOL has_take_ownership_priv = user_has_privileges(current_user.nt_user_token,
+ bool has_take_ownership_priv = user_has_privileges(current_user.nt_user_token,
&se_take_ownership);
- BOOL has_restore_priv = user_has_privileges(current_user.nt_user_token,
+ bool has_restore_priv = user_has_privileges(current_user.nt_user_token,
&se_restore);
/* Case (2) */
DOM_SID file_grp_sid;
canon_ace *file_ace_list = NULL;
canon_ace *dir_ace_list = NULL;
- BOOL acl_perms = False;
+ bool acl_perms = False;
mode_t orig_mode = (mode_t)0;
NTSTATUS status;
if((security_info_sent & DACL_SECURITY_INFORMATION) && (psd->dacl != NULL)) {
- BOOL acl_set_support = False;
- BOOL ret = False;
+ bool acl_set_support = False;
+ bool ret = False;
/*
* Try using the POSIX ACL set first. Fall back to chmod if
Check for an existing default POSIX ACL on a directory.
****************************************************************************/
-BOOL directory_has_default_acl(connection_struct *conn, const char *fname)
+bool directory_has_default_acl(connection_struct *conn, const char *fname)
{
SMB_ACL_T def_acl = SMB_VFS_SYS_ACL_GET_FILE( conn, fname, SMB_ACL_TYPE_DEFAULT);
- BOOL has_acl = False;
+ bool has_acl = False;
SMB_ACL_ENTRY_T entry;
if (def_acl != NULL && (SMB_VFS_SYS_ACL_GET_ENTRY(conn, def_acl, SMB_ACL_FIRST_ENTRY, &entry) == 1)) {
Map from wire type to permset.
****************************************************************************/
-static BOOL unix_ex_wire_to_permset(connection_struct *conn, unsigned char wire_perm, SMB_ACL_PERMSET_T *p_permset)
+static bool unix_ex_wire_to_permset(connection_struct *conn, unsigned char wire_perm, SMB_ACL_PERMSET_T *p_permset)
{
if (wire_perm & ~(SMB_POSIX_ACL_READ|SMB_POSIX_ACL_WRITE|SMB_POSIX_ACL_EXECUTE)) {
return False;
Map from wire type to tagtype.
****************************************************************************/
-static BOOL unix_ex_wire_to_tagtype(unsigned char wire_tt, SMB_ACL_TAG_T *p_tt)
+static bool unix_ex_wire_to_tagtype(unsigned char wire_tt, SMB_ACL_TAG_T *p_tt)
{
switch (wire_tt) {
case SMB_POSIX_ACL_USER_OBJ:
on the directory.
****************************************************************************/
-BOOL set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf,
+bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf,
uint16 num_def_acls, const char *pdata)
{
SMB_ACL_T def_acl = NULL;
FIXME ! How does the share mask/mode fit into this.... ?
****************************************************************************/
-static BOOL remove_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname)
+static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname)
{
SMB_ACL_T file_acl = NULL;
int entry_id = SMB_ACL_FIRST_ENTRY;
SMB_ACL_ENTRY_T entry;
- BOOL ret = False;
+ bool ret = False;
/* Create a new ACL with only 3 entries, u/g/w. */
SMB_ACL_T new_file_acl = SMB_VFS_SYS_ACL_INIT(conn, 3);
SMB_ACL_ENTRY_T user_ent = NULL;
except SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, SMB_ACL_OTHER.
****************************************************************************/
-BOOL set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata)
+bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata)
{
SMB_ACL_T file_acl = NULL;
int entry_id = SMB_ACL_FIRST_ENTRY;
SMB_ACL_ENTRY_T entry;
int i;
- BOOL seen_mask = False;
- BOOL seen_owning_group = False;
+ bool seen_mask = False;
+ bool seen_owning_group = False;
int ret = -1;
gid_t cu_gid;
this to successfully return ACCESS_DENIED on a file open for delete access.
****************************************************************************/
-BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname)
+bool can_delete_file_in_directory(connection_struct *conn, const char *fname)
{
SMB_STRUCT_STAT sbuf;
TALLOC_CTX *ctx = talloc_tos();
Note this doesn't take into account share write permissions.
****************************************************************************/
-BOOL can_access_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask)
+bool can_access_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask)
{
int ret;
Note this doesn't take into account share write permissions.
****************************************************************************/
-BOOL can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf)
+bool can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf)
{
return can_access_file(conn, fname, psbuf, FILE_WRITE_DATA);
}
extern int smb_read_error;
SIG_ATOMIC_T reload_after_sighup = 0;
SIG_ATOMIC_T got_sig_term = 0;
-extern BOOL global_machine_password_needs_changing;
+extern bool global_machine_password_needs_changing;
extern int max_send;
/*
for processing.
****************************************************************************/
-static BOOL push_queued_message(struct smb_request *req,
+static bool push_queued_message(struct smb_request *req,
struct timeval request_time,
struct timeval end_time,
char *private_data, size_t private_len)
Return true if this mid is on the deferred queue.
****************************************************************************/
-BOOL open_was_deferred(uint16 mid)
+bool open_was_deferred(uint16 mid)
{
struct pending_message_list *pml;
messages ready for processing.
****************************************************************************/
-BOOL push_deferred_smb_message(struct smb_request *req,
+bool push_deferred_smb_message(struct smb_request *req,
struct timeval request_time,
struct timeval timeout,
char *private_data, size_t priv_len)
struct timed_event *te;
struct timeval interval;
char *name;
- BOOL (*handler)(const struct timeval *now, void *private_data);
+ bool (*handler)(const struct timeval *now, void *private_data);
void *private_data;
};
TALLOC_CTX *mem_ctx,
struct timeval interval,
const char *name,
- BOOL (*handler)(const struct timeval *now,
+ bool (*handler)(const struct timeval *now,
void *private_data),
void *private_data)
{
The timeout is in milliseconds
****************************************************************************/
-static BOOL receive_message_or_smb(TALLOC_CTX *mem_ctx, char **buffer,
+static bool receive_message_or_smb(TALLOC_CTX *mem_ctx, char **buffer,
size_t *buffer_len, int timeout)
{
fd_set r_fds, w_fds;
* and it's time to schedule.
*/
if(deferred_open_queue != NULL) {
- BOOL pop_message = False;
+ bool pop_message = False;
struct pending_message_list *msg = deferred_open_queue;
if (timeval_is_zero(&msg->end_time)) {
Process any timeout housekeeping. Return False if the caller should exit.
****************************************************************************/
-static BOOL timeout_processing(int *select_timeout,
+static bool timeout_processing(int *select_timeout,
time_t *last_timeout_processing_time)
{
time_t t;
* Declare here, define at end: reduces likely "include" interaction problems.
* David Lee <T.D.Lee@durham.ac.uk>
*/
-BOOL disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+bool disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
#endif /* VXFS_QUOTA */
Try to get the disk space from disk quotas (LINUX version).
****************************************************************************/
-BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
int r;
SMB_STRUCT_STAT S;
try to get the disk space from disk quotas (CRAY VERSION)
****************************************************************************/
-BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
struct mntent *mnt;
FILE *fd;
}
/* Restricted to SUNOS5 for the moment, I haven`t access to others to test. */
-static BOOL nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
uid_t uid = euser_id;
struct dqblk D;
int len;
static struct timeval timeout = {2,0};
enum clnt_stat clnt_stat;
- BOOL ret = True;
+ bool ret = True;
*bsize = *dfree = *dsize = (SMB_BIG_UINT)0;
Quota code by Peter Urbanec (amiga@cse.unsw.edu.au).
****************************************************************************/
-BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
uid_t euser_id;
int ret;
#if defined(SUNOS5)
if ( strcmp( mnt.mnt_fstype, "nfs" ) == 0) {
- BOOL retval;
+ bool retval;
DEBUG(5,("disk_quotas: looking for mountpath (NFS) \"%s\"\n", mnt.mnt_special));
retval = nfs_quotas(mnt.mnt_special, euser_id, bsize, dfree, dsize);
unbecome_root();
set_effective_uid(euser_id);
DEBUG(5,("disk_quotas: mount type \"%s\"\n", mnt.mnt_fstype));
if ( 0 == strcmp ( mnt.mnt_fstype, "vxfs" )) {
- BOOL retval;
+ bool retval;
retval = disk_quotas_vxfs(name, path, bsize, dfree, dsize);
return(retval);
}
try to get the disk space from disk quotas - OSF1 version
****************************************************************************/
-BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
int r, save_errno;
struct dqblk D;
#include <sys/quota.h>
#include <mntent.h>
-BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
uid_t euser_id;
int r;
}
/* Works on FreeBSD, too. :-) */
-static BOOL nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
uid_t uid = euser_id;
struct dqblk D;
int len;
static struct timeval timeout = {2,0};
enum clnt_stat clnt_stat;
- BOOL ret = True;
+ bool ret = True;
*bsize = *dfree = *dsize = (SMB_BIG_UINT)0;
try to get the disk space from disk quotas - default version
****************************************************************************/
-BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
int r;
struct dqblk D;
#if defined(__FreeBSD__) || defined(__DragonFly__)
if (strcmp(mnts[i].f_fstypename,"nfs") == 0) {
- BOOL retval;
+ bool retval;
retval = nfs_quotas(mnts[i].f_mntfromname,euser_id,bsize,dfree,dsize);
unbecome_root();
return retval;
#include <sys/fs/vx_aioctl.h>
#include <sys/fs/vx_ioctl.h>
-BOOL disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
uid_t user_id, euser_id;
int ret;
#else /* WITH_QUOTAS */
-BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
(*bsize) = 512; /* This value should be ignored */
/* wrapper to the new sys_quota interface
this file should be removed later
*/
-BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
int r;
SMB_DISK_QUOTA D;
extern uint32 global_client_caps;
extern struct current_user current_user;
-extern BOOL global_encrypted_passwords_negotiated;
+extern bool global_encrypted_passwords_negotiated;
/****************************************************************************
Ensure we check the path in *exactly* the same way as W2K for a findfirst/findnext
#define IS_PATH_SEP(c,posix_only) ((c) == '/' || (!(posix_only) && (c) == '\\'))
static NTSTATUS check_path_syntax_internal(char *path,
- BOOL posix_path,
- BOOL *p_last_component_contains_wcard)
+ bool posix_path,
+ bool *p_last_component_contains_wcard)
{
char *d = path;
const char *s = path;
NTSTATUS ret = NT_STATUS_OK;
- BOOL start_of_name_component = True;
+ bool start_of_name_component = True;
*p_last_component_contains_wcard = False;
NTSTATUS check_path_syntax(char *path)
{
- BOOL ignore;
+ bool ignore;
return check_path_syntax_internal(path, False, &ignore);
}
a wildcard.
****************************************************************************/
-NTSTATUS check_path_syntax_wcard(char *path, BOOL *p_contains_wcard)
+NTSTATUS check_path_syntax_wcard(char *path, bool *p_contains_wcard)
{
return check_path_syntax_internal(path, False, p_contains_wcard);
}
NTSTATUS check_path_syntax_posix(char *path)
{
- BOOL ignore;
+ bool ignore;
return check_path_syntax_internal(path, True, &ignore);
}
size_t src_len,
int flags,
NTSTATUS *err,
- BOOL *contains_wcard)
+ bool *contains_wcard)
{
size_t ret;
Check if we have a correct fsp pointing to a file. Basic check for open fsp.
****************************************************************************/
-BOOL check_fsp_open(connection_struct *conn, struct smb_request *req,
+bool check_fsp_open(connection_struct *conn, struct smb_request *req,
files_struct *fsp, struct current_user *user)
{
if (!(fsp) || !(conn)) {
CHECK_FSP macro.
****************************************************************************/
-BOOL check_fsp(connection_struct *conn, struct smb_request *req,
+bool check_fsp(connection_struct *conn, struct smb_request *req,
files_struct *fsp, struct current_user *user)
{
if (!check_fsp_open(conn, req, fsp, user)) {
Check if we have a correct fsp. Replacement for the FSP_BELONGS_CONN macro
****************************************************************************/
-BOOL fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
+bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
files_struct *fsp, struct current_user *user)
{
if ((fsp) && (conn) && ((conn)==(fsp)->conn)
*/
char outbuf[smb_size];
- static BOOL already_got_session = False;
+ static bool already_got_session = False;
*name1 = *name2 = 0;
uint32 dirtype;
unsigned int numentries = 0;
unsigned int maxentries = 0;
- BOOL finished = False;
+ bool finished = False;
char *p;
int status_len;
char *path = NULL;
char status[21];
int dptr_num= -1;
- BOOL check_descend = False;
- BOOL expect_close = False;
+ bool check_descend = False;
+ bool expect_close = False;
NTSTATUS nt_status;
- BOOL mask_contains_wcard = False;
- BOOL allow_long_path_components = (req->flags2 & FLAGS2_LONG_PATH_COMPONENTS) ? True : False;
+ bool mask_contains_wcard = False;
+ bool allow_long_path_components = (req->flags2 & FLAGS2_LONG_PATH_COMPONENTS) ? True : False;
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBsearch);
char *p;
char *path = NULL;
NTSTATUS err;
- BOOL path_contains_wcard = False;
+ bool path_contains_wcard = False;
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBfclose);
****************************************************************************/
NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
- uint32 dirtype, const char *name_in, BOOL has_wild)
+ uint32 dirtype, const char *name_in, bool has_wild)
{
const char *directory = NULL;
char *mask = NULL;
char *name = NULL;
uint32 dirtype;
NTSTATUS status;
- BOOL path_contains_wcard = False;
+ bool path_contains_wcard = False;
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBunlink);
files_struct *fsp;
SMB_OFF_T startpos;
size_t smb_maxcnt;
- BOOL big_readX = False;
+ bool big_readX = False;
#if 0
size_t smb_mincnt = SVAL(req->inbuf,smb_vwv6);
#endif
size_t tcount;
SMB_OFF_T startpos;
char *data=NULL;
- BOOL write_through;
+ bool write_through;
files_struct *fsp;
NTSTATUS status;
files_struct *fsp;
SMB_OFF_T startpos;
size_t numtowrite;
- BOOL write_through;
+ bool write_through;
ssize_t nwritten;
unsigned int smb_doff;
unsigned int smblen;
char *data;
- BOOL large_writeX;
+ bool large_writeX;
NTSTATUS status;
START_PROFILE(SMBwriteX);
tree recursively. Return True on ok, False on fail.
****************************************************************************/
-static BOOL recursive_rmdir(TALLOC_CTX *ctx,
+static bool recursive_rmdir(TALLOC_CTX *ctx,
connection_struct *conn,
char *directory)
{
const char *dname = NULL;
- BOOL ret = True;
+ bool ret = True;
long offset = 0;
struct smb_Dir *dir_hnd = OpenDir(conn, directory, NULL, 0);
Resolve wildcards in a filename rename.
********************************************************************/
-static BOOL resolve_wildcards(TALLOC_CTX *ctx,
+static bool resolve_wildcards(TALLOC_CTX *ctx,
const char *name1,
const char *name2,
char **pp_newname)
const char *newname)
{
files_struct *fsp;
- BOOL did_rename = False;
+ bool did_rename = False;
for(fsp = file_find_di_first(lck->id); fsp;
fsp = file_find_di_next(fsp)) {
report from <AndyLiebman@aol.com>.
****************************************************************************/
-static BOOL rename_path_prefix_equal(const char *src, const char *dest)
+static bool rename_path_prefix_equal(const char *src, const char *dest)
{
const char *psrc = src;
const char *pdst = dest;
* Do the notify calls from a rename
*/
-static void notify_rename(connection_struct *conn, BOOL is_dir,
+static void notify_rename(connection_struct *conn, bool is_dir,
const char *oldpath, const char *newpath)
{
char *olddir, *newdir;
char *newname,
const char *newname_last_component,
uint32 attrs,
- BOOL replace_if_exists)
+ bool replace_if_exists)
{
TALLOC_CTX *ctx = talloc_tos();
SMB_STRUCT_STAT sbuf, sbuf1;
NTSTATUS status = NT_STATUS_OK;
struct share_mode_lock *lck = NULL;
- BOOL dst_exists;
+ bool dst_exists;
ZERO_STRUCT(sbuf);
const char *name_in,
const char *newname_in,
uint32 attrs,
- BOOL replace_if_exists,
- BOOL src_has_wild,
- BOOL dest_has_wild)
+ bool replace_if_exists,
+ bool src_has_wild,
+ bool dest_has_wild)
{
char *directory = NULL;
char *mask = NULL;
/*
* No wildcards - just process the one file.
*/
- BOOL is_short_name = mangle_is_8_3(name, True, conn->params);
+ bool is_short_name = mangle_is_8_3(name, True, conn->params);
/* Add a terminating '/' to the directory name. */
directory = talloc_asprintf_append(directory,
files_struct *fsp = NULL;
char *fname = NULL;
char *destname = NULL;
- BOOL sysdir_entry = False;
+ bool sysdir_entry = False;
/* Quick check for "." and ".." */
if (ISDOT(dname) || ISDOTDOT(dname)) {
char *p;
uint32 attrs;
NTSTATUS status;
- BOOL src_has_wcard = False;
- BOOL dest_has_wcard = False;
+ bool src_has_wcard = False;
+ bool dest_has_wcard = False;
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBmv);
const char *dest1,
int ofun,
int count,
- BOOL target_is_directory)
+ bool target_is_directory)
{
SMB_STRUCT_STAT src_sbuf, sbuf2;
SMB_OFF_T ret=-1;
int tid2;
int ofun;
int flags;
- BOOL target_is_directory=False;
- BOOL source_has_wild = False;
- BOOL dest_has_wild = False;
+ bool target_is_directory=False;
+ bool source_has_wild = False;
+ bool dest_has_wild = False;
SMB_STRUCT_STAT sbuf1, sbuf2;
NTSTATUS status;
TALLOC_CTX *ctx = talloc_tos();
Get a lock pid, dealing with large count requests.
****************************************************************************/
-uint32 get_lock_pid( char *data, int data_offset, BOOL large_file_format)
+uint32 get_lock_pid( char *data, int data_offset, bool large_file_format)
{
if(!large_file_format)
return (uint32)SVAL(data,SMB_LPID_OFFSET(data_offset));
Get a lock count, dealing with large count requests.
****************************************************************************/
-SMB_BIG_UINT get_lock_count( char *data, int data_offset, BOOL large_file_format)
+SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format)
{
SMB_BIG_UINT count = 0;
Get a lock offset, dealing with large offset requests.
****************************************************************************/
-SMB_BIG_UINT get_lock_offset( char *data, int data_offset, BOOL large_file_format, BOOL *err)
+SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err)
{
SMB_BIG_UINT offset = 0;
int32 lock_timeout;
int i;
char *data;
- BOOL large_file_format;
- BOOL err;
+ bool large_file_format;
+ bool err;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
START_PROFILE(SMBlockingX);
*/
if ((locktype & LOCKING_ANDX_OPLOCK_RELEASE)) {
/* Client can insist on breaking to none. */
- BOOL break_to_none = (oplocklevel == 0);
- BOOL result;
+ bool break_to_none = (oplocklevel == 0);
+ bool result;
DEBUG(5,("reply_lockingX: oplock break reply (%u) from client "
"for fnum = %d\n", (unsigned int)oplocklevel,
offset,
WINDOWS_LOCK);
} else {
- BOOL blocking_lock = lock_timeout ? True : False;
- BOOL defer_lock = False;
+ bool blocking_lock = lock_timeout ? True : False;
+ bool defer_lock = False;
struct byte_range_lock *br_lck;
uint32 block_smbpid;
Become the specified uid.
****************************************************************************/
-static BOOL become_uid(uid_t uid)
+static bool become_uid(uid_t uid)
{
/* Check for dodgy uid values */
Become the specified gid.
****************************************************************************/
-static BOOL become_gid(gid_t gid)
+static bool become_gid(gid_t gid)
{
/* Check for dodgy gid values */
Become the specified uid and gid.
****************************************************************************/
-static BOOL become_id(uid_t uid, gid_t gid)
+static bool become_id(uid_t uid, gid_t gid)
{
return become_gid(gid) && become_uid(uid);
}
one. User changes are done using the set_sec_ctx() function.
****************************************************************************/
-BOOL push_sec_ctx(void)
+bool push_sec_ctx(void)
{
struct sec_ctx *ctx_p;
Pop a security context from the stack.
****************************************************************************/
-BOOL pop_sec_ctx(void)
+bool pop_sec_ctx(void)
{
struct sec_ctx *ctx_p;
struct sec_ctx *prev_ctx_p;
Open the socket communication - inetd.
****************************************************************************/
-static BOOL open_sockets_inetd(void)
+static bool open_sockets_inetd(void)
{
/* Started from inetd. fd 0 is the socket. */
/* We will abort gracefully when the client or remote system
Have we reached the process limit ?
****************************************************************************/
-static BOOL allowable_number_of_smbd_processes(void)
+static bool allowable_number_of_smbd_processes(void)
{
int max_processes = lp_max_smbd_processes();
Open the socket communication.
****************************************************************************/
-static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_ports)
+static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ports)
{
int num_interfaces = iface_count();
int num_sockets = 0;
Reload the services file.
**************************************************************************/
-BOOL reload_services(BOOL test)
+bool reload_services(bool test)
{
- BOOL ret;
+ bool ret;
if (lp_loaded()) {
pstring fname;
Initialise connect, service and file structs.
****************************************************************************/
-static BOOL init_structs(void )
+static bool init_structs(void )
{
/*
* Set the machine NETBIOS name if not already
/*
* Send keepalive packets to our client
*/
-static BOOL keepalive_fn(const struct timeval *now, void *private_data)
+static bool keepalive_fn(const struct timeval *now, void *private_data)
{
if (!send_keepalive(smbd_server_fd())) {
DEBUG( 2, ( "Keepalive failed - exiting.\n" ) );
/*
* Do the recurring check if we're idle
*/
-static BOOL deadtime_fn(const struct timeval *now, void *private_data)
+static bool deadtime_fn(const struct timeval *now, void *private_data)
{
if ((conn_num_open() == 0)
|| (conn_idle_all(now->tv_sec))) {
mkproto.h. Mixing $(builddir) and $(srcdir) source files in the current
prototype generation system is too complicated. */
-extern void build_options(BOOL screen);
+extern void build_options(bool screen);
int main(int argc,const char *argv[])
{
/* shall I run as a daemon */
- static BOOL is_daemon = False;
- static BOOL interactive = False;
- static BOOL Fork = True;
- static BOOL no_process_group = False;
- static BOOL log_stdout = False;
+ static bool is_daemon = False;
+ static bool interactive = False;
+ static bool Fork = True;
+ static bool no_process_group = False;
+ static bool log_stdout = False;
static char *ports = NULL;
static char *profile_level = NULL;
int opt;
poptContext pc;
- BOOL print_build_options = False;
+ bool print_build_options = False;
struct poptOption long_options[] = {
POPT_AUTOHELP
extern userdom_struct current_user_info;
-static BOOL canonicalize_path(connection_struct *conn, pstring path)
+static bool canonicalize_path(connection_struct *conn, pstring path)
{
#ifdef REALPATH_TAKES_NULL
char *resolved_name = SMB_VFS_REALPATH(conn,path,NULL);
pstring destname;
char *d = destname;
const char *s = connectpath;
- BOOL start_of_name_component = True;
+ bool start_of_name_component = True;
*d++ = '/'; /* Always start with root. */
Load parameters specific to a connection/service.
****************************************************************************/
-BOOL set_current_service(connection_struct *conn, uint16 flags, BOOL do_chdir)
+bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir)
{
static connection_struct *last_conn;
static uint16 last_flags;
return NT_STATUS_OK;
}
-static NTSTATUS find_forced_user(connection_struct *conn, BOOL vuser_is_guest, fstring username)
+static NTSTATUS find_forced_user(connection_struct *conn, bool vuser_is_guest, fstring username)
{
int snum = conn->params->service;
char *fuser, *found_username;
* one found.
*/
-static NTSTATUS find_forced_group(BOOL force_user,
+static NTSTATUS find_forced_group(bool force_user,
int snum, const char *username,
DOM_SID *pgroup_sid,
gid_t *pgid)
DOM_SID group_sid;
enum lsa_SidType type;
char *groupname;
- BOOL user_must_be_member = False;
+ bool user_must_be_member = False;
gid_t gid;
ZERO_STRUCTP(pgroup_sid);
NTSTATUS *status)
{
struct passwd *pass = NULL;
- BOOL guest = False;
+ bool guest = False;
connection_struct *conn;
SMB_STRUCT_STAT st;
fstring user;
* insensitive for now. */
conn->case_sensitive = False;
} else {
- conn->case_sensitive = (BOOL)lp_casesensitive(snum);
+ conn->case_sensitive = (bool)lp_casesensitive(snum);
}
conn->case_preserve = lp_preservecase(snum);
*/
{
- BOOL can_write = False;
+ bool can_write = False;
NT_USER_TOKEN *token = conn->nt_user_token ?
conn->nt_user_token :
(vuser ? vuser->nt_user_token : NULL);
return ctx;
}
-BOOL session_init(void)
+bool session_init(void)
{
if (session_db_ctx() == NULL) {
DEBUG(1,("session_init: failed to open sessionid tdb\n"));
called when a session is created
********************************************************************/
-BOOL session_claim(user_struct *vuser)
+bool session_claim(user_struct *vuser)
{
TDB_DATA key, data;
int i = 0;
/********************************************************************
********************************************************************/
-static BOOL session_traverse(int (*fn)(struct db_record *db,
+static bool session_traverse(int (*fn)(struct db_record *db,
void *private_data),
void *private_data)
{
#include "includes.h"
extern struct auth_context *negprot_global_auth_context;
-extern BOOL global_encrypted_passwords_negotiated;
-extern BOOL global_spnego_negotiated;
+extern bool global_encrypted_passwords_negotiated;
+extern bool global_spnego_negotiated;
extern enum protocol_types Protocol;
extern int max_send;
Cerate a clock skew error blob for a Windows client.
****************************************************************************/
-static BOOL make_krb5_skew_error(DATA_BLOB *pblob_out)
+static bool make_krb5_skew_error(DATA_BLOB *pblob_out)
{
krb5_context context = NULL;
krb5_error_code kerr = 0;
krb5_data reply;
krb5_principal host_princ = NULL;
char *host_princ_s = NULL;
- BOOL ret = False;
+ bool ret = False;
*pblob_out = data_blob_null;
struct smb_request *req,
DATA_BLOB *secblob,
uint16 vuid,
- BOOL *p_invalidate_vuid)
+ bool *p_invalidate_vuid)
{
TALLOC_CTX *mem_ctx;
DATA_BLOB ticket;
uint8 tok_id[2];
DATA_BLOB nullblob = data_blob_null;
fstring real_username;
- BOOL map_domainuser_to_guest = False;
- BOOL username_was_mapped;
+ bool map_domainuser_to_guest = False;
+ bool username_was_mapped;
PAC_LOGON_INFO *logon_info = NULL;
ZERO_STRUCT(ticket);
* -- Looks like this only happens with a KDC. JRA.
*/
- BOOL ok = make_krb5_skew_error(&ap_rep);
+ bool ok = make_krb5_skew_error(&ap_rep);
if (!ok) {
talloc_destroy(mem_ctx);
return ERROR_NT(nt_status_squash(
uint16 vuid,
AUTH_NTLMSSP_STATE **auth_ntlmssp_state,
DATA_BLOB *ntlmssp_blob, NTSTATUS nt_status,
- BOOL wrap)
+ bool wrap)
{
DATA_BLOB response;
struct auth_serversupplied_info *server_info = NULL;
****************************************************************************/
NTSTATUS parse_spnego_mechanisms(DATA_BLOB blob_in, DATA_BLOB *pblob_out,
- BOOL *p_is_krb5)
+ bool *p_is_krb5)
{
char *OIDs[ASN1_MAX_OIDS];
int i;
{
DATA_BLOB secblob;
DATA_BLOB chal;
- BOOL got_kerberos_mechanism = False;
+ bool got_kerberos_mechanism = False;
NTSTATUS status;
status = parse_spnego_mechanisms(blob1, &secblob,
#ifdef HAVE_KRB5
if ( got_kerberos_mechanism && ((lp_security()==SEC_ADS) ||
lp_use_kerberos_keytab()) ) {
- BOOL destroy_vuid = True;
+ bool destroy_vuid = True;
reply_spnego_kerberos(conn, req, &secblob, vuid,
&destroy_vuid);
data_blob_free(&secblob);
if (auth.data[0] == ASN1_APPLICATION(0)) {
/* Might be a second negTokenTarg packet */
- BOOL got_krb5_mechanism = False;
+ bool got_krb5_mechanism = False;
status = parse_spnego_mechanisms(auth, &secblob,
&got_krb5_mechanism);
if (NT_STATUS_IS_OK(status)) {
#ifdef HAVE_KRB5
if ( got_krb5_mechanism && ((lp_security()==SEC_ADS) ||
lp_use_kerberos_keytab()) ) {
- BOOL destroy_vuid = True;
+ bool destroy_vuid = True;
reply_spnego_kerberos(conn, req, &secblob,
vuid, &destroy_vuid);
data_blob_free(&secblob);
fstring native_os;
fstring native_lanman;
fstring primary_domain;
- static BOOL done_sesssetup = False;
+ static bool done_sesssetup = False;
auth_usersupplied_info *user_info = NULL;
auth_serversupplied_info *server_info = NULL;
uint16 smb_flag2 = req->flags2;
NTSTATUS nt_status;
- BOOL doencrypt = global_encrypted_passwords_negotiated;
+ bool doencrypt = global_encrypted_passwords_negotiated;
DATA_BLOB session_key;
nt_resp = data_blob(p+passlen1, passlen2);
} else {
pstring pass;
- BOOL unic= smb_flag2 & FLAGS2_UNICODE_STRINGS;
+ bool unic= smb_flag2 & FLAGS2_UNICODE_STRINGS;
#if 0
/* This was the previous fix. Not sure if it's still
extern userdom_struct current_user_info;
-static BOOL do_group_checks(const char **name, const char **pattern)
+static bool do_group_checks(const char **name, const char **pattern)
{
if ((*name)[0] == '@') {
*pattern = "&+";
return False;
}
-static BOOL token_contains_name(TALLOC_CTX *mem_ctx,
+static bool token_contains_name(TALLOC_CTX *mem_ctx,
const char *username,
const char *sharename,
const struct nt_user_token *token,
* The other use is the netgroup check when using @group or &group.
*/
-BOOL token_contains_name_in_list(const char *username,
+bool token_contains_name_in_list(const char *username,
const char *sharename,
const struct nt_user_token *token,
const char **list)
* The other use is the netgroup check when using @group or &group.
*/
-BOOL user_ok_token(const char *username, struct nt_user_token *token, int snum)
+bool user_ok_token(const char *username, struct nt_user_token *token, int snum)
{
if (lp_invalid_users(snum) != NULL) {
if (token_contains_name_in_list(username, lp_servicename(snum),
* The other use is the netgroup check when using @group or &group.
*/
-BOOL is_share_read_only_for_token(const char *username,
+bool is_share_read_only_for_token(const char *username,
struct nt_user_token *token, int snum)
{
- BOOL result = lp_readonly(snum);
+ bool result = lp_readonly(snum);
if (lp_readlist(snum) != NULL) {
if (token_contains_name_in_list(username,
void stat_cache_add( const char *full_orig_name,
char *translated_path,
- BOOL case_sensitive)
+ bool case_sensitive)
{
size_t translated_path_length;
TDB_DATA data_val;
*
*/
-BOOL stat_cache_lookup(connection_struct *conn,
+bool stat_cache_lookup(connection_struct *conn,
char **pp_name,
char **pp_dirpath,
char **pp_start,
{
char *chk_name;
size_t namelen;
- BOOL sizechanged = False;
+ bool sizechanged = False;
unsigned int num_components = 0;
char *translated_path;
size_t translated_path_length;
Initializes or clears the stat cache.
**************************************************************************/
-BOOL reset_stat_cache( void )
+bool reset_stat_cache( void )
{
if (!lp_stat_cache())
return True;
Refuse to allow clients to overwrite our private xattrs.
****************************************************************************/
-static BOOL samba_private_attr_name(const char *unix_ea_name)
+static bool samba_private_attr_name(const char *unix_ea_name)
{
static const char *prohibited_ea_names[] = {
SAMBA_POSIX_INHERITANCE_EA_NAME,
Get one EA value. Fill in a struct ea_struct.
****************************************************************************/
-static BOOL get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn, files_struct *fsp,
+static bool get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn, files_struct *fsp,
const char *fname, char *ea_name, struct ea_struct *pea)
{
/* Get the value of this xattr. Max size is 64k. */
int params_sent_thistime, data_sent_thistime, total_sent_thistime;
int alignment_offset = 1; /* JRA. This used to be 3. Set to 1 to make netmon parse ok. */
int data_alignment_offset = 0;
- BOOL overflow = False;
+ bool overflow = False;
/* Modify the data_to_send and datasize and set the error if
we're trying to send more than max_data_bytes. We still send
char *pdata = *ppdata;
int deny_mode;
int32 open_attr;
- BOOL oplock_request;
+ bool oplock_request;
#if 0
- BOOL return_additional_info;
+ bool return_additional_info;
int16 open_sattr;
time_t open_time;
#endif
Case can be significant or not.
**********************************************************/
-static BOOL exact_match(connection_struct *conn,
+static bool exact_match(connection_struct *conn,
const char *str,
const char *mask)
{
Get a level dependent lanman2 dir entry.
****************************************************************************/
-static BOOL get_lanman2_dir_entry(TALLOC_CTX *ctx,
+static bool get_lanman2_dir_entry(TALLOC_CTX *ctx,
connection_struct *conn,
uint16 flags2,
const char *path_mask,
uint32 dirtype,
int info_level,
int requires_resume_key,
- BOOL dont_descend,
+ bool dont_descend,
char **ppdata,
char *base_data,
char *end_data,
int space_remaining,
- BOOL *out_of_space,
- BOOL *got_exact_match,
+ bool *out_of_space,
+ bool *got_exact_match,
int *last_entry_off,
struct ea_list *name_list)
{
const char *dname;
- BOOL found = False;
+ bool found = False;
SMB_STRUCT_STAT sbuf;
const char *mask = NULL;
char *pathreal = NULL;
time_t mdate = (time_t)0, adate = (time_t)0, create_date = (time_t)0;
char *nameptr;
char *last_entry_ptr;
- BOOL was_8_3;
+ bool was_8_3;
uint32 nt_extmode; /* Used for NT connections instead of mode */
- BOOL needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/');
- BOOL check_mangled_names = lp_manglednames(conn->params);
+ bool needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/');
+ bool check_mangled_names = lp_manglednames(conn->params);
char mangled_name[13]; /* mangled 8.3 name. */
*out_of_space = False;
}
while (!found) {
- BOOL got_match;
- BOOL ms_dfs_link = False;
+ bool got_match;
+ bool ms_dfs_link = False;
/* Needed if we run out of space */
long curr_dirpos = prev_dirpos = dptr_TellDir(conn->dirptr);
}
if (got_match) {
- BOOL isdots = (ISDOT(dname) || ISDOTDOT(dname));
+ bool isdots = (ISDOT(dname) || ISDOTDOT(dname));
if (dont_descend && !isdots) {
continue;
uint32 dirtype;
int maxentries;
uint16 findfirst_flags;
- BOOL close_after_first;
- BOOL close_if_end;
- BOOL requires_resume_key;
+ bool close_after_first;
+ bool close_if_end;
+ bool requires_resume_key;
int info_level;
char *directory = NULL;
const char *mask = NULL;
int dptr_num = -1;
int numentries = 0;
int i;
- BOOL finished = False;
- BOOL dont_descend = False;
- BOOL out_of_space = False;
+ bool finished = False;
+ bool dont_descend = False;
+ bool out_of_space = False;
int space_remaining;
- BOOL mask_contains_wcard = False;
+ bool mask_contains_wcard = False;
SMB_STRUCT_STAT sbuf;
struct ea_list *ea_list = NULL;
NTSTATUS ntstatus = NT_STATUS_OK;
out_of_space = False;
for (i=0;(i<maxentries) && !finished && !out_of_space;i++) {
- BOOL got_exact_match = False;
+ bool got_exact_match = False;
/* this is a heuristic to avoid seeking the dirptr except when
absolutely necessary. It allows for a filename of about 40 chars */
uint16 info_level;
uint32 resume_key;
uint16 findnext_flags;
- BOOL close_after_request;
- BOOL close_if_end;
- BOOL requires_resume_key;
- BOOL continue_bit;
- BOOL mask_contains_wcard = False;
+ bool close_after_request;
+ bool close_if_end;
+ bool requires_resume_key;
+ bool continue_bit;
+ bool mask_contains_wcard = False;
char *resume_name = NULL;
const char *mask = NULL;
const char *directory = NULL;
uint16 dirtype;
int numentries = 0;
int i, last_entry_off=0;
- BOOL finished = False;
- BOOL dont_descend = False;
- BOOL out_of_space = False;
+ bool finished = False;
+ bool dont_descend = False;
+ bool out_of_space = False;
int space_remaining;
struct ea_list *ea_list = NULL;
NTSTATUS ntstatus = NT_STATUS_OK;
} /* end if resume_name && !continue_bit */
for (i=0;(i<(int)maxentries) && !finished && !out_of_space ;i++) {
- BOOL got_exact_match = False;
+ bool got_exact_match = False;
/* this is a heuristic to avoid seeking the dirptr except when
absolutely necessary. It allows for a filename of about 40 chars */
Utility function to marshall a POSIX acl into wire format.
****************************************************************************/
-static BOOL marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_STAT *pst, SMB_ACL_T posix_acl)
+static bool marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_STAT *pst, SMB_ACL_T posix_acl)
{
int entry_id = SMB_ACL_FIRST_ENTRY;
SMB_ACL_ENTRY_T entry;
#endif /* HAVE_STAT_ST_FLAGS */
}
-static BOOL map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
+static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
const uint32 smb_fflags,
const uint32 smb_fmask,
int *stat_fflags)
char *base_name;
char *p;
SMB_OFF_T pos = 0;
- BOOL delete_pending = False;
+ bool delete_pending = False;
int len;
time_t create_time, mtime, atime;
struct timespec create_time_ts, mtime_ts, atime_ts;
SMB_STRUCT_STAT *psbuf)
{
NTSTATUS status = NT_STATUS_OK;
- BOOL delete_on_close;
+ bool delete_on_close;
uint32 dosmode = 0;
if (total_data < 1) {
files_struct *fsp,
const char *fname)
{
- BOOL overwrite;
+ bool overwrite;
uint32 root_fid;
uint32 len;
char *newname = NULL;
char *base_name = NULL;
- BOOL dest_has_wcard = False;
+ bool dest_has_wcard = False;
NTSTATUS status = NT_STATUS_OK;
char *p;
TALLOC_CTX *ctx = talloc_tos();
uint16 posix_acl_version;
uint16 num_file_acls;
uint16 num_def_acls;
- BOOL valid_file_acls = True;
- BOOL valid_def_acls = True;
+ bool valid_file_acls = True;
+ bool valid_def_acls = True;
if (total_data < SMB_POSIX_ACL_HEADER_SIZE) {
return NT_STATUS_INVALID_PARAMETER;
SMB_BIG_UINT count;
SMB_BIG_UINT offset;
uint32 lock_pid;
- BOOL blocking_lock = False;
+ bool blocking_lock = False;
enum brl_type lock_type;
NTSTATUS status = NT_STATUS_OK;
uid_t set_owner = (uid_t)SMB_UID_NO_CHANGE;
gid_t set_grp = (uid_t)SMB_GID_NO_CHANGE;
NTSTATUS status = NT_STATUS_OK;
- BOOL delete_on_fail = False;
+ bool delete_on_fail = False;
enum perm_type ptype;
if (total_data < 100) {
SMB_STRUCT_STAT *psbuf,
int *pdata_return_size)
{
- BOOL extended_oplock_granted = False;
+ bool extended_oplock_granted = False;
char *pdata = *ppdata;
uint32 flags = 0;
uint32 wire_open_mode = 0;
Become the guest user without changing the security context stack.
****************************************************************************/
-BOOL change_to_guest(void)
+bool change_to_guest(void)
{
static struct passwd *pass=NULL;
Check if a username is OK.
********************************************************************/
-static BOOL check_user_ok(connection_struct *conn, user_struct *vuser,int snum)
+static bool check_user_ok(connection_struct *conn, user_struct *vuser,int snum)
{
unsigned int i;
struct vuid_cache_entry *ent = NULL;
- BOOL readonly_share;
+ bool readonly_share;
NT_USER_TOKEN *token;
for (i=0;i<conn->vuid_cache.entries && i< VUID_CACHE_SIZE;i++) {
stack, but modify the current_user entries.
****************************************************************************/
-BOOL change_to_user(connection_struct *conn, uint16 vuid)
+bool change_to_user(connection_struct *conn, uint16 vuid)
{
user_struct *vuser = get_valid_user_struct(vuid);
int snum;
gid_t gid;
uid_t uid;
char group_c;
- BOOL must_free_token = False;
+ bool must_free_token = False;
NT_USER_TOKEN *token = NULL;
int num_groups = 0;
gid_t *group_list = NULL;
but modify the current_user entries.
****************************************************************************/
-BOOL change_to_root_user(void)
+bool change_to_root_user(void)
{
set_root_sec_ctx();
user. Doesn't modify current_user.
****************************************************************************/
-BOOL become_authenticated_pipe_user(pipes_struct *p)
+bool become_authenticated_pipe_user(pipes_struct *p)
{
if (!push_sec_ctx())
return False;
current_user.
****************************************************************************/
-BOOL unbecome_authenticated_pipe_user(void)
+bool unbecome_authenticated_pipe_user(void)
{
return pop_sec_ctx();
}
Saves and restores the connection context.
****************************************************************************/
-BOOL become_user(connection_struct *conn, uint16 vuid)
+bool become_user(connection_struct *conn, uint16 vuid)
{
if (!push_sec_ctx())
return False;
return True;
}
-BOOL unbecome_user(void)
+bool unbecome_user(void)
{
pop_sec_ctx();
pop_conn_ctx();
Update utmp file directly. No subroutine interface: probably a BSD system.
****************************************************************************/
-static void pututline_my(pstring uname, struct utmp *u, BOOL claim)
+static void pututline_my(pstring uname, struct utmp *u, bool claim)
{
DEBUG(1,("pututline_my: not yet implemented\n"));
/* BSD implementor: may want to consider (or not) adjusting "lastlog" */
Credit: Michail Vidiassov <master@iaas.msu.ru>
****************************************************************************/
-static void updwtmp_my(pstring wname, struct utmp *u, BOOL claim)
+static void updwtmp_my(pstring wname, struct utmp *u, bool claim)
{
int fd;
struct stat buf;
Update via utmp/wtmp (not utmpx/wtmpx).
****************************************************************************/
-static void utmp_nox_update(struct utmp *u, BOOL claim)
+static void utmp_nox_update(struct utmp *u, bool claim)
{
pstring uname, wname;
#if defined(PUTUTLINE_RETURNS_UTMP)
Update via utmpx/wtmpx (preferred) or via utmp/wtmp.
****************************************************************************/
-static void sys_utmp_update(struct utmp *u, const char *hostname, BOOL claim)
+static void sys_utmp_update(struct utmp *u, const char *hostname, bool claim)
{
#if !defined(HAVE_UTMPX_H)
/* No utmpx stuff. Drop to non-x stuff */
/*
fill a system utmp structure given all the info we can gather
*/
-static BOOL sys_utmp_fill(struct utmp *u,
+static bool sys_utmp_fill(struct utmp *u,
const char *username, const char *hostname,
const char *ip_addr_str,
const char *id_str, int id_num)
((void **)(void *)&vfs->ops)[which] = op;
}
-BOOL vfs_init_custom(connection_struct *conn, const char *vfs_object)
+bool vfs_init_custom(connection_struct *conn, const char *vfs_object)
{
vfs_op_tuple *ops;
char *module_name = NULL;
Generic VFS init.
******************************************************************/
-BOOL smbd_vfs_init(connection_struct *conn)
+bool smbd_vfs_init(connection_struct *conn)
{
const char **vfs_objects;
unsigned int i = 0;
Check if directory exists.
********************************************************************/
-BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st)
+bool vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st)
{
SMB_STRUCT_STAT st2;
- BOOL ret;
+ bool ret;
if (!st)
st = &st2;
Check if an object exists in the vfs.
********************************************************************/
-BOOL vfs_object_exist(connection_struct *conn,const char *fname,SMB_STRUCT_STAT *sbuf)
+bool vfs_object_exist(connection_struct *conn,const char *fname,SMB_STRUCT_STAT *sbuf)
{
SMB_STRUCT_STAT st;
Check if a file exists in the vfs.
********************************************************************/
-BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf)
+bool vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf)
{
SMB_STRUCT_STAT st;
SMB_DEV_T dev; /* These *must* be compatible with the types returned in a stat() call. */
SMB_INO_T inode; /* These *must* be compatible with the types returned in a stat() call. */
char *path; /* The pathname. */
- BOOL valid;
+ bool valid;
} ino_list[MAX_GETWDCACHE];
-extern BOOL use_getwd_cache;
+extern bool use_getwd_cache;
/****************************************************************************
Prompte a ptr (to make it recently used)
#else
pstring s;
#endif
- static BOOL getwd_cache_init = False;
+ static bool getwd_cache_init = False;
SMB_STRUCT_STAT st, st2;
int i;
char *ret = NULL;
NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
{
#ifdef REALPATH_TAKES_NULL
- BOOL free_resolved_name = True;
+ bool free_resolved_name = True;
#else
#ifdef PATH_MAX
char resolved_name_buf[PATH_MAX+1];
#else
pstring resolved_name_buf;
#endif
- BOOL free_resolved_name = False;
+ bool free_resolved_name = False;
#endif
char *resolved_name = NULL;
size_t con_path_len = strlen(conn->connectpath);
static NTSTATUS cmd_lock(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
- BOOL ret;
+ bool ret;
int fd;
int op;
long offset;
#include "includes.h"
-extern BOOL torture_showall;
+extern bool torture_showall;
enum deny_result {A_0=0, A_X=1, A_R=2, A_W=3, A_RW=5};
/*
this produces a matrix of deny mode behaviour for 1 connection
*/
-BOOL torture_denytest1(int dummy)
+bool torture_denytest1(int dummy)
{
struct cli_state *cli1;
int fnum1, fnum2;
int i;
- BOOL correct = True;
+ bool correct = True;
const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"};
if (!torture_open_connection(&cli1, 0)) {
/*
this produces a matrix of deny mode behaviour with 2 connections
*/
-BOOL torture_denytest2(int dummy)
+bool torture_denytest2(int dummy)
{
static struct cli_state *cli1, *cli2;
int fnum1, fnum2;
int i;
- BOOL correct = True;
+ bool correct = True;
const char *fnames[2] = {"\\denytest2.dat", "\\denytest2.exe"};
if (!torture_open_connection(&cli1, 0) || !torture_open_connection(&cli2, 1)) {
static fstring username[2];
static int got_user;
static int got_pass;
-static BOOL use_kerberos;
+static bool use_kerberos;
static int numops = 1000;
-static BOOL showall;
-static BOOL analyze;
-static BOOL hide_unlock_fails;
-static BOOL use_oplocks;
+static bool showall;
+static bool analyze;
+static bool hide_unlock_fails;
+static bool use_oplocks;
static unsigned lock_range = 100;
static unsigned lock_base = 0;
static unsigned min_length = 0;
-static BOOL exact_error_codes;
-static BOOL zero_zero;
+static bool exact_error_codes;
+static bool zero_zero;
extern char *optarg;
extern int optind;
-static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
+static bool test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
int fnum[NSERVERS][NCONNECTIONS][NFILES],
struct record *rec)
{
SMB_BIG_UINT len = rec->len;
enum brl_type op = rec->lock_type;
int server;
- BOOL ret[NSERVERS];
+ bool ret[NSERVERS];
NTSTATUS status[NSERVERS];
switch (rec->lock_op) {
static fstring username;
static int got_pass;
static int numops = 1000;
-static BOOL showall;
-static BOOL analyze;
-static BOOL hide_unlock_fails;
-static BOOL use_oplocks;
+static bool showall;
+static bool analyze;
+static bool hide_unlock_fails;
+static bool use_oplocks;
extern char *optarg;
extern int optind;
return -1;
}
-static BOOL try_close(struct cli_state *c, int fstype, int fd)
+static bool try_close(struct cli_state *c, int fstype, int fd)
{
switch (fstype) {
case FSTYPE_SMB:
return False;
}
-static BOOL try_lock(struct cli_state *c, int fstype,
+static bool try_lock(struct cli_state *c, int fstype,
int fd, unsigned start, unsigned len,
enum brl_type op)
{
return False;
}
-static BOOL try_unlock(struct cli_state *c, int fstype,
+static bool try_unlock(struct cli_state *c, int fstype,
int fd, unsigned start, unsigned len)
{
struct flock lock;
-static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
+static bool test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
char *nfs[NSERVERS],
int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES],
struct record *rec)
unsigned r2 = rec->r2;
enum brl_type op;
int server;
- BOOL ret[NSERVERS];
+ bool ret[NSERVERS];
if (r1 < READ_PCT) {
op = READ_LOCK;
static unsigned total, collisions, failures;
-static BOOL test_one(struct cli_state *cli, const char *name)
+static bool test_one(struct cli_state *cli, const char *name)
{
int fnum;
fstring shortname;
}
-BOOL torture_mangle(int dummy)
+bool torture_mangle(int dummy)
{
static struct cli_state *cli;
int i;
- BOOL ret = True;
+ bool ret = True;
printf("starting mangle test\n");
static fstring username;
static int got_pass;
static int max_protocol = PROTOCOL_NT1;
-static BOOL showall = False;
-static BOOL old_list = False;
+static bool showall = False;
+static bool old_list = False;
static const char *maskchars = "<>\"?*abc.";
static const char *filechars = "abcdefghijklm.";
static int verbose;
extern char *optarg;
extern int optind;
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
/* a test fn for LANMAN mask support */
static int ms_fnmatch_lanman_core(const char *pattern, const char *string)
return ms_fnmatch_lanman_core(pattern, string);
}
-static BOOL reg_match_one(struct cli_state *cli, const char *pattern, const char *file)
+static bool reg_match_one(struct cli_state *cli, const char *pattern, const char *file)
{
/* oh what a weird world this is */
if (old_list && strcmp(pattern, "*.*") == 0) return True;
#include "includes.h"
-static BOOL samu_correct(struct samu *s1, struct samu *s2)
+static bool samu_correct(struct samu *s1, struct samu *s2)
{
- BOOL ret = True;
+ bool ret = True;
uint32 s1_len, s2_len;
const char *s1_buf, *s2_buf;
const uint8 *d1_buf, *d2_buf;
NTSTATUS rv;
int i;
struct timeval tv;
- BOOL error = False;
+ bool error = False;
struct passwd *pwd;
uint8 *buf;
uint32 expire, min_age, history;
/****************************************************************************
make smb client connection
****************************************************************************/
-static BOOL rpcclient_connect(struct client_info *info)
+static bool rpcclient_connect(struct client_info *info)
{
struct nmb_name calling;
struct nmb_name called;
extern char *optarg;
extern int optind;
pstring term_code;
- BOOL got_pass = False;
+ bool got_pass = False;
char *cmd_str="";
enum client_action cli_action = CLIENT_NONE;
int nprocs = 1;
/****************************************************************************
check for existance of a trans2 call
****************************************************************************/
-static BOOL scan_trans2(struct cli_state *cli, int op, int level,
+static bool scan_trans2(struct cli_state *cli, int op, int level,
int fnum, int dnum, const char *fname)
{
int data_len = 0;
}
-BOOL torture_trans2_scan(int dummy)
+bool torture_trans2_scan(int dummy)
{
static struct cli_state *cli;
int op, level;
/****************************************************************************
check for existance of a nttrans call
****************************************************************************/
-static BOOL scan_nttrans(struct cli_state *cli, int op, int level,
+static bool scan_nttrans(struct cli_state *cli, int op, int level,
int fnum, int dnum, const char *fname)
{
int data_len = 0;
}
-BOOL torture_nttrans_scan(int dummy)
+bool torture_nttrans_scan(int dummy)
{
static struct cli_state *cli;
int op, level;
{
int i = 0;
int val;
- BOOL ok = True;
+ bool ok = True;
for (i=0; tests[i].data != NULL; i++) {
ASN1_DATA data;
static int procnum; /* records process count number when forking */
static struct cli_state *current_cli;
static fstring randomfname;
-static BOOL use_oplocks;
-static BOOL use_level_II_oplocks;
+static bool use_oplocks;
+static bool use_level_II_oplocks;
static const char *client_txt = "client_oplocks.txt";
-static BOOL use_kerberos;
+static bool use_kerberos;
static fstring multishare_conn_fname;
-static BOOL use_multishare_conn = False;
+static bool use_multishare_conn = False;
-BOOL torture_showall = False;
+bool torture_showall = False;
-static double create_procs(BOOL (*fn)(int), BOOL *result);
+static double create_procs(bool (*fn)(int), bool *result);
static struct timeval tp1,tp2;
/*
parse a //server/share type UNC name
*/
-BOOL smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
+bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
char **hostname, char **sharename)
{
char *p;
return False;
}
-static BOOL torture_open_connection_share(struct cli_state **c,
+static bool torture_open_connection_share(struct cli_state **c,
const char *hostname,
const char *sharename)
{
- BOOL retry;
+ bool retry;
int flags = 0;
NTSTATUS status;
}
}
-BOOL torture_open_connection(struct cli_state **c, int conn_index)
+bool torture_open_connection(struct cli_state **c, int conn_index)
{
char **unc_list = NULL;
int num_unc_names = 0;
- BOOL result;
+ bool result;
if (use_multishare_conn==True) {
char *h, *s;
return torture_open_connection_share(c, host, share);
}
-BOOL torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid)
+bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid)
{
uint16 old_vuid = cli->vuid;
fstring old_user_name;
size_t passlen = strlen(password);
- BOOL ret;
+ bool ret;
fstrcpy(old_user_name, cli->user_name);
cli->vuid = 0;
}
-BOOL torture_close_connection(struct cli_state *c)
+bool torture_close_connection(struct cli_state *c)
{
- BOOL ret = True;
+ bool ret = True;
if (!cli_tdis(c)) {
printf("tdis failed (%s)\n", cli_errstr(c));
ret = False;
/* check if the server produced the expected error code */
-static BOOL check_error(int line, struct cli_state *c,
+static bool check_error(int line, struct cli_state *c,
uint8 eclass, uint32 ecode, NTSTATUS nterr)
{
if (cli_is_dos_error(c)) {
}
-static BOOL wait_lock(struct cli_state *c, int fnum, uint32 offset, uint32 len)
+static bool wait_lock(struct cli_state *c, int fnum, uint32 offset, uint32 len)
{
while (!cli_lock(c, fnum, offset, len, -1, WRITE_LOCK)) {
if (!check_error(__LINE__, c, ERRDOS, ERRlock, NT_STATUS_LOCK_NOT_GRANTED)) return False;
}
-static BOOL rw_torture(struct cli_state *c)
+static bool rw_torture(struct cli_state *c)
{
const char *lockfname = "\\torture.lck";
fstring fname;
pid_t pid2, pid = getpid();
int i, j;
char buf[1024];
- BOOL correct = True;
+ bool correct = True;
memset(buf, '\0', sizeof(buf));
return correct;
}
-static BOOL run_torture(int dummy)
+static bool run_torture(int dummy)
{
struct cli_state *cli;
- BOOL ret;
+ bool ret;
cli = current_cli;
return ret;
}
-static BOOL rw_torture3(struct cli_state *c, char *lockfname)
+static bool rw_torture3(struct cli_state *c, char *lockfname)
{
int fnum = -1;
unsigned int i = 0;
unsigned count;
unsigned countprev = 0;
ssize_t sent = 0;
- BOOL correct = True;
+ bool correct = True;
srandom(1);
for (i = 0; i < sizeof(buf); i += sizeof(uint32))
return correct;
}
-static BOOL rw_torture2(struct cli_state *c1, struct cli_state *c2)
+static bool rw_torture2(struct cli_state *c1, struct cli_state *c2)
{
const char *lockfname = "\\torture2.lck";
int fnum1;
int i;
char buf[131072];
char buf_rd[131072];
- BOOL correct = True;
+ bool correct = True;
ssize_t bytes_read;
if (!cli_unlink(c1, lockfname)) {
return correct;
}
-static BOOL run_readwritetest(int dummy)
+static bool run_readwritetest(int dummy)
{
static struct cli_state *cli1, *cli2;
- BOOL test1, test2 = False;
+ bool test1, test2 = False;
if (!torture_open_connection(&cli1, 0) || !torture_open_connection(&cli2, 1)) {
return False;
return (test1 && test2);
}
-static BOOL run_readwritemulti(int dummy)
+static bool run_readwritemulti(int dummy)
{
struct cli_state *cli;
- BOOL test;
+ bool test;
cli = current_cli;
return test;
}
-static BOOL run_readwritelarge(int dummy)
+static bool run_readwritelarge(int dummy)
{
static struct cli_state *cli1;
int fnum1;
const char *lockfname = "\\large.dat";
SMB_OFF_T fsize;
char buf[126*1024];
- BOOL correct = True;
+ bool correct = True;
if (!torture_open_connection(&cli1, 0)) {
return False;
#define ival(s) strtol(s, NULL, 0)
/* run a test that simulates an approximate netbench client load */
-static BOOL run_netbench(int client)
+static bool run_netbench(int client)
{
struct cli_state *cli;
int i;
char cname[20];
FILE *f;
const char *params[20];
- BOOL correct = True;
+ bool correct = True;
cli = current_cli;
/* run a test that simulates an approximate netbench client load */
-static BOOL run_nbench(int dummy)
+static bool run_nbench(int dummy)
{
double t;
- BOOL correct = True;
+ bool correct = True;
nbio_shmem(nprocs);
must not use posix semantics)
2) support for lock timeouts
*/
-static BOOL run_locktest1(int dummy)
+static bool run_locktest1(int dummy)
{
struct cli_state *cli1, *cli2;
const char *fname = "\\lockt1.lck";
this checks to see if a secondary tconx can use open files from an
earlier tconx
*/
-static BOOL run_tcon_test(int dummy)
+static bool run_tcon_test(int dummy)
{
static struct cli_state *cli;
const char *fname = "\\tcontest.tmp";
uint16 cnum1, cnum2, cnum3;
uint16 vuid1, vuid2;
char buf[4];
- BOOL ret = True;
+ bool ret = True;
memset(buf, '\0', sizeof(buf));
/*
checks for old style tcon support
*/
-static BOOL run_tcon2_test(int dummy)
+static bool run_tcon2_test(int dummy)
{
static struct cli_state *cli;
uint16 cnum, max_xmit;
return True;
}
-static BOOL tcon_devtest(struct cli_state *cli,
+static bool tcon_devtest(struct cli_state *cli,
const char *myshare, const char *devtype,
const char *return_devtype,
NTSTATUS expected_error)
{
- BOOL status;
- BOOL ret;
+ bool status;
+ bool ret;
status = cli_send_tconX(cli, myshare, devtype,
password, strlen(password)+1);
/*
checks for correct tconX support
*/
-static BOOL run_tcon_devtype_test(int dummy)
+static bool run_tcon_devtype_test(int dummy)
{
static struct cli_state *cli1 = NULL;
- BOOL retry;
+ bool retry;
int flags = 0;
NTSTATUS status;
- BOOL ret = True;
+ bool ret = True;
status = cli_full_connection(&cli1, myname,
host, NULL, port_to_use,
3) the server denies unlock requests by an incorrect client PID
*/
-static BOOL run_locktest2(int dummy)
+static bool run_locktest2(int dummy)
{
static struct cli_state *cli;
const char *fname = "\\lockt2.lck";
int fnum1, fnum2, fnum3;
- BOOL correct = True;
+ bool correct = True;
if (!torture_open_connection(&cli, 0)) {
return False;
1) the server supports the full offset range in lock requests
*/
-static BOOL run_locktest3(int dummy)
+static bool run_locktest3(int dummy)
{
static struct cli_state *cli1, *cli2;
const char *fname = "\\lockt3.lck";
int fnum1, fnum2, i;
uint32 offset;
- BOOL correct = True;
+ bool correct = True;
#define NEXT_OFFSET offset += (~(uint32)0) / torture_numops
/*
looks at overlapping locks
*/
-static BOOL run_locktest4(int dummy)
+static bool run_locktest4(int dummy)
{
static struct cli_state *cli1, *cli2;
const char *fname = "\\lockt4.lck";
int fnum1, fnum2, f;
- BOOL ret;
+ bool ret;
char buf[1000];
- BOOL correct = True;
+ bool correct = True;
if (!torture_open_connection(&cli1, 0) || !torture_open_connection(&cli2, 1)) {
return False;
/*
looks at lock upgrade/downgrade.
*/
-static BOOL run_locktest5(int dummy)
+static bool run_locktest5(int dummy)
{
static struct cli_state *cli1, *cli2;
const char *fname = "\\lockt5.lck";
int fnum1, fnum2, fnum3;
- BOOL ret;
+ bool ret;
char buf[1000];
- BOOL correct = True;
+ bool correct = True;
if (!torture_open_connection(&cli1, 0) || !torture_open_connection(&cli2, 1)) {
return False;
/*
tries the unusual lockingX locktype bits
*/
-static BOOL run_locktest6(int dummy)
+static bool run_locktest6(int dummy)
{
static struct cli_state *cli;
const char *fname[1] = { "\\lock6.txt" };
return True;
}
-static BOOL run_locktest7(int dummy)
+static bool run_locktest7(int dummy)
{
struct cli_state *cli1;
const char *fname = "\\lockt7.lck";
int fnum1;
char buf[200];
- BOOL correct = False;
+ bool correct = False;
if (!torture_open_connection(&cli1, 0)) {
return False;
test whether fnums and tids open on one VC are available on another (a major
security hole)
*/
-static BOOL run_fdpasstest(int dummy)
+static bool run_fdpasstest(int dummy)
{
struct cli_state *cli1, *cli2;
const char *fname = "\\fdpass.tst";
return True;
}
-static BOOL run_fdsesstest(int dummy)
+static bool run_fdsesstest(int dummy)
{
struct cli_state *cli;
uint16 new_vuid;
int fnum1;
int fnum2;
pstring buf;
- BOOL ret = True;
+ bool ret = True;
if (!torture_open_connection(&cli, 0))
return False;
1) the server does not allow an unlink on a file that is open
*/
-static BOOL run_unlinktest(int dummy)
+static bool run_unlinktest(int dummy)
{
struct cli_state *cli;
const char *fname = "\\unlink.tst";
int fnum;
- BOOL correct = True;
+ bool correct = True;
if (!torture_open_connection(&cli, 0)) {
return False;
/*
test how many open files this server supports on the one socket
*/
-static BOOL run_maxfidtest(int dummy)
+static bool run_maxfidtest(int dummy)
{
struct cli_state *cli;
const char *ftemplate = "\\maxfid.%d.%d";
fstring fname;
int fnums[0x11000], i;
int retries=4;
- BOOL correct = True;
+ bool correct = True;
cli = current_cli;
}
/* send smb negprot commands, not reading the response */
-static BOOL run_negprot_nowait(int dummy)
+static bool run_negprot_nowait(int dummy)
{
int i;
static struct cli_state *cli;
- BOOL correct = True;
+ bool correct = True;
printf("starting negprot nowait test\n");
/* send random IPC commands */
-static BOOL run_randomipc(int dummy)
+static bool run_randomipc(int dummy)
{
char *rparam = NULL;
char *rdata = NULL;
pstring param;
int api, param_len, i;
struct cli_state *cli;
- BOOL correct = True;
+ bool correct = True;
int count = 50000;
printf("starting random ipc test\n");
This test checks the browse list code
*/
-static BOOL run_browsetest(int dummy)
+static bool run_browsetest(int dummy)
{
static struct cli_state *cli;
- BOOL correct = True;
+ bool correct = True;
printf("starting browse test\n");
/*
This checks how the getatr calls works
*/
-static BOOL run_attrtest(int dummy)
+static bool run_attrtest(int dummy)
{
struct cli_state *cli;
int fnum;
time_t t, t2;
const char *fname = "\\attrib123456789.tst";
- BOOL correct = True;
+ bool correct = True;
printf("starting attrib test\n");
/*
This checks a couple of trans2 calls
*/
-static BOOL run_trans2test(int dummy)
+static bool run_trans2test(int dummy)
{
struct cli_state *cli;
int fnum;
const char *dname = "\\trans2";
const char *fname2 = "\\trans2\\trans2.tst";
pstring pname;
- BOOL correct = True;
+ bool correct = True;
printf("starting trans2 test\n");
This checks new W2K calls.
*/
-static BOOL new_trans(struct cli_state *pcli, int fnum, int level)
+static bool new_trans(struct cli_state *pcli, int fnum, int level)
{
char *buf = NULL;
uint32 len;
- BOOL correct = True;
+ bool correct = True;
if (!cli_qfileinfo_test(pcli, fnum, level, &buf, &len)) {
printf("ERROR: qfileinfo (%d) failed (%s)\n", level, cli_errstr(pcli));
return correct;
}
-static BOOL run_w2ktest(int dummy)
+static bool run_w2ktest(int dummy)
{
struct cli_state *cli;
int fnum;
const char *fname = "\\w2ktest\\w2k.tst";
int level;
- BOOL correct = True;
+ bool correct = True;
printf("starting w2k test\n");
/*
this is a harness for some oplock tests
*/
-static BOOL run_oplock1(int dummy)
+static bool run_oplock1(int dummy)
{
struct cli_state *cli1;
const char *fname = "\\lockt1.lck";
int fnum1;
- BOOL correct = True;
+ bool correct = True;
printf("starting oplock test 1\n");
return correct;
}
-static BOOL run_oplock2(int dummy)
+static bool run_oplock2(int dummy)
{
struct cli_state *cli1, *cli2;
const char *fname = "\\lockt2.lck";
int fnum1, fnum2;
int saved_use_oplocks = use_oplocks;
char buf[4];
- BOOL correct = True;
- volatile BOOL *shared_correct;
+ bool correct = True;
+ volatile bool *shared_correct;
- shared_correct = (volatile BOOL *)shm_setup(sizeof(BOOL));
+ shared_correct = (volatile bool *)shm_setup(sizeof(bool));
*shared_correct = True;
use_level_II_oplocks = True;
}
/* handler for oplock 3 tests */
-static BOOL oplock3_handler(struct cli_state *cli, int fnum, unsigned char level)
+static bool oplock3_handler(struct cli_state *cli, int fnum, unsigned char level)
{
printf("got oplock break fnum=%d level=%d\n",
fnum, level);
return cli_oplock_ack(cli, fnum, level);
}
-static BOOL run_oplock3(int dummy)
+static bool run_oplock3(int dummy)
{
struct cli_state *cli;
const char *fname = "\\oplockt3.dat";
int fnum;
char buf[4] = "abcd";
- BOOL correct = True;
- volatile BOOL *shared_correct;
+ bool correct = True;
+ volatile bool *shared_correct;
- shared_correct = (volatile BOOL *)shm_setup(sizeof(BOOL));
+ shared_correct = (volatile bool *)shm_setup(sizeof(bool));
*shared_correct = True;
printf("starting oplock test 3\n");
/*
Test delete on close semantics.
*/
-static BOOL run_deletetest(int dummy)
+static bool run_deletetest(int dummy)
{
struct cli_state *cli1 = NULL;
struct cli_state *cli2 = NULL;
const char *fname = "\\delete.file";
int fnum1 = -1;
int fnum2 = -1;
- BOOL correct = True;
+ bool correct = True;
printf("starting delete test\n");
/*
print out server properties
*/
-static BOOL run_properties(int dummy)
+static bool run_properties(int dummy)
{
static struct cli_state *cli;
- BOOL correct = True;
+ bool correct = True;
printf("starting properties test\n");
/*
Test ntcreate calls made by xcopy
*/
-static BOOL run_xcopy(int dummy)
+static bool run_xcopy(int dummy)
{
static struct cli_state *cli1;
const char *fname = "\\test.txt";
- BOOL correct = True;
+ bool correct = True;
int fnum1, fnum2;
printf("starting xcopy test\n");
/*
Test rename on files open with share delete and no share delete.
*/
-static BOOL run_rename(int dummy)
+static bool run_rename(int dummy)
{
static struct cli_state *cli1;
const char *fname = "\\test.txt";
const char *fname1 = "\\test1.txt";
- BOOL correct = True;
+ bool correct = True;
int fnum1;
printf("starting rename test\n");
return correct;
}
-static BOOL run_pipe_number(int dummy)
+static bool run_pipe_number(int dummy)
{
struct cli_state *cli1;
const char *pipe_name = "\\SPOOLSS";
/*
Test open mode returns on read-only files.
*/
-static BOOL run_opentest(int dummy)
+static bool run_opentest(int dummy)
{
static struct cli_state *cli1;
static struct cli_state *cli2;
int fnum1, fnum2;
char buf[20];
SMB_OFF_T fsize;
- BOOL correct = True;
+ bool correct = True;
char *tmp_path;
printf("starting open test\n");
{ 249, FILE_ATTRIBUTE_SYSTEM, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM }
};
-static BOOL run_openattrtest(int dummy)
+static bool run_openattrtest(int dummy)
{
static struct cli_state *cli1;
const char *fname = "\\openattr.file";
int fnum1;
- BOOL correct = True;
+ bool correct = True;
uint16 attr;
unsigned int i, j, k, l;
/*
test directory listing speed
*/
-static BOOL run_dirtest(int dummy)
+static bool run_dirtest(int dummy)
{
int i;
static struct cli_state *cli;
int fnum;
double t1;
- BOOL correct = True;
+ bool correct = True;
printf("starting directory test\n");
/*
sees what IOCTLs are supported
*/
-BOOL torture_ioctl_test(int dummy)
+bool torture_ioctl_test(int dummy)
{
static struct cli_state *cli;
uint16 device, function;
/*
tries varients of chkpath
*/
-BOOL torture_chkpath_test(int dummy)
+bool torture_chkpath_test(int dummy)
{
static struct cli_state *cli;
int fnum;
- BOOL ret;
+ bool ret;
if (!torture_open_connection(&cli, 0)) {
return False;
return ret;
}
-static BOOL run_eatest(int dummy)
+static bool run_eatest(int dummy)
{
static struct cli_state *cli;
const char *fname = "\\eatest.txt";
- BOOL correct = True;
+ bool correct = True;
int fnum, i;
size_t num_eas;
struct ea_struct *ea_list = NULL;
return correct;
}
-static BOOL run_dirtest1(int dummy)
+static bool run_dirtest1(int dummy)
{
int i;
static struct cli_state *cli;
int fnum, num_seen;
- BOOL correct = True;
+ bool correct = True;
printf("starting directory test\n");
return correct;
}
-static BOOL run_error_map_extract(int dummy) {
+static bool run_error_map_extract(int dummy) {
static struct cli_state *c_dos;
static struct cli_state *c_nt;
return result;
}
-static BOOL run_local_substitute(int dummy)
+static bool run_local_substitute(int dummy)
{
bool ok = true;
return ok;
}
-static BOOL run_local_gencache(int dummy)
+static bool run_local_gencache(int dummy)
{
char *val;
time_t tm;
return True;
}
-static double create_procs(BOOL (*fn)(int), BOOL *result)
+static double create_procs(bool (*fn)(int), bool *result)
{
int i, status;
volatile pid_t *child_status;
- volatile BOOL *child_status_out;
+ volatile bool *child_status_out;
int synccount;
int tries = 8;
return -1;
}
- child_status_out = (volatile BOOL *)shm_setup(sizeof(BOOL)*nprocs);
+ child_status_out = (volatile bool *)shm_setup(sizeof(bool)*nprocs);
if (!child_status_out) {
printf("Failed to setup result status shared memory\n");
return -1;
static struct {
const char *name;
- BOOL (*fn)(int);
+ bool (*fn)(int);
unsigned flags;
} torture_ops[] = {
{"FDPASS", run_fdpasstest, 0},
/****************************************************************************
run a specified test or "ALL"
****************************************************************************/
-static BOOL run_test(const char *name)
+static bool run_test(const char *name)
{
- BOOL ret = True;
- BOOL result = True;
- BOOL found = False;
+ bool ret = True;
+ bool result = True;
+ bool found = False;
int i;
double t;
if (strequal(name,"ALL")) {
char *p;
int gotuser = 0;
int gotpass = 0;
- BOOL correct = True;
+ bool correct = True;
dbf = x_stdout;
#include "includes.h"
-BOOL torture_utable(int dummy)
+bool torture_utable(int dummy)
{
struct cli_state *cli;
fstring fname, alt_name;
return fname;
}
-BOOL torture_casetable(int dummy)
+bool torture_casetable(int dummy)
{
static struct cli_state *cli;
char *fname;
static NTSTATUS process_cmd(struct vfs_state *vfs, char *cmd)
{
struct cmd_list *temp_list;
- BOOL found = False;
+ bool found = False;
pstring buf;
const char *p = cmd;
NTSTATUS result = NT_STATUS_OK;
Reload the services file.
**************************************************************************/
-BOOL reload_services(BOOL test)
+bool reload_services(bool test)
{
- BOOL ret;
+ bool ret;
if (lp_loaded()) {
pstring fname;
printf( "\t<None specified>\n");
}
-static int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoAddSourceCommand( int argc, char **argv, bool debugflag, char *exename )
{
if ( argc < 3 ) {
return 0;
}
-static int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoWriteCommand( int argc, char **argv, bool debugflag, char *exename )
{
FILE *f1;
char *argfname;
/* fixed constants are bad bad bad */
pstring linein;
- BOOL is_eor;
+ bool is_eor;
Eventlog_entry ee;
int rcnum;
const char *opt_host = NULL;
const char *opt_password = NULL;
const char *opt_user_name = NULL;
-BOOL opt_user_specified = False;
+bool opt_user_specified = False;
const char *opt_workgroup = NULL;
int opt_long_list_entries = 0;
int opt_reboot = 0;
int opt_timeout = 0;
const char *opt_target_workgroup = NULL;
int opt_machine_pass = 0;
-BOOL opt_localgroup = False;
-BOOL opt_domaingroup = False;
-static BOOL do_talloc_report=False;
+bool opt_localgroup = False;
+bool opt_domaingroup = False;
+static bool do_talloc_report=False;
const char *opt_newntname = "";
int opt_rid = 0;
int opt_acls = 0;
int opt_timestamps = 0;
const char *opt_exclude = NULL;
const char *opt_destination = NULL;
-BOOL opt_testmode = False;
+bool opt_testmode = False;
-BOOL opt_have_ip = False;
+bool opt_have_ip = False;
struct in_addr opt_dest_ip;
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
uint32 get_sec_channel_type(const char *param)
{
return 0;
}
-BOOL net_find_server(const char *domain, unsigned flags, struct in_addr *server_ip, char **server_name)
+bool net_find_server(const char *domain, unsigned flags, struct in_addr *server_ip, char **server_name)
{
const char *d = domain ? domain : opt_target_workgroup;
}
-BOOL net_find_pdc(struct in_addr *server_ip, fstring server_name, const char *domain_name)
+bool net_find_pdc(struct in_addr *server_ip, fstring server_name, const char *domain_name)
{
if (get_pdc_ip(domain_name, server_ip)) {
if (is_zero_ip_v4(*server_ip))
#endif /* WITH_FAKE_KASERVER */
-static BOOL search_maxrid(struct pdb_search *search, const char *type,
+static bool search_maxrid(struct pdb_search *search, const char *type,
uint32 *max_rid)
{
struct samr_displayentry *entries;
extern const char *opt_host;
extern const char *opt_user_name;
extern const char *opt_password;
-extern BOOL opt_user_specified;
+extern bool opt_user_specified;
-extern BOOL opt_localgroup;
-extern BOOL opt_domaingroup;
+extern bool opt_localgroup;
+extern bool opt_domaingroup;
extern const char *opt_newntname;
extern int opt_rid;
extern int opt_acls;
extern int opt_timestamps;
extern const char *opt_exclude;
extern const char *opt_destination;
-extern BOOL opt_testmode;
+extern bool opt_testmode;
-extern BOOL opt_have_ip;
+extern bool opt_have_ip;
extern struct in_addr opt_dest_ip;
extern const char *share_type[];
setenv(KRB5_ENV_CCNAME, "MEMORY:net_ads", 1);
}
-static ADS_STATUS ads_startup_int(BOOL only_own_domain, uint32 auth_flags, ADS_STRUCT **ads_ret)
+static ADS_STATUS ads_startup_int(bool only_own_domain, uint32 auth_flags, ADS_STRUCT **ads_ret)
{
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
- BOOL need_password = False;
- BOOL second_time = False;
+ bool need_password = False;
+ bool second_time = False;
char *cp;
const char *realm = NULL;
- BOOL tried_closest_dc = False;
+ bool tried_closest_dc = False;
/* lp_realm() should be handled by a command line param,
However, the join requires that realm be set in smb.conf
return status;
}
-ADS_STATUS ads_startup(BOOL only_own_domain, ADS_STRUCT **ads)
+ADS_STATUS ads_startup(bool only_own_domain, ADS_STRUCT **ads)
{
return ads_startup_int(only_own_domain, 0, ads);
}
-ADS_STATUS ads_startup_nobind(BOOL only_own_domain, ADS_STRUCT **ads)
+ADS_STATUS ads_startup_nobind(bool only_own_domain, ADS_STRUCT **ads)
{
return ads_startup_int(only_own_domain, ADS_AUTH_NO_BIND, ads);
}
-static BOOL usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *data_area)
+static bool usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *data_area)
{
char **disp_fields = (char **) data_area;
char *ou_str = NULL;
char *dn = NULL;
LDAPMessage *res = NULL;
- BOOL moved;
+ bool moved;
ou_str = ads_ou_string(ads, ou);
if (asprintf(&dn, "%s,%s", ou_str, ads->config.bind_path) == -1) {
/************************************************************************
************************************************************************/
-static BOOL net_derive_salting_principal( TALLOC_CTX *ctx, ADS_STRUCT *ads )
+static bool net_derive_salting_principal( TALLOC_CTX *ctx, ADS_STRUCT *ads )
{
uint32 domain_func;
ADS_STATUS status;
char *tmp_password, *password;
TALLOC_CTX *ctx = NULL;
DOM_SID *domain_sid = NULL;
- BOOL createupn = False;
+ bool createupn = False;
const char *machineupn = NULL;
const char *create_in_ou = NULL;
int i;
/*
* check if a subkey of KEY_SMBCONF of a given name exists
*/
-static BOOL smbconf_key_exists(TALLOC_CTX *ctx, const char *subkeyname)
+static bool smbconf_key_exists(TALLOC_CTX *ctx, const char *subkeyname)
{
- BOOL ret = False;
+ bool ret = False;
WERROR werr = WERR_OK;
TALLOC_CTX *mem_ctx;
struct registry_key *key;
return ret;
}
-static BOOL smbconf_value_exists(TALLOC_CTX *ctx, struct registry_key *key,
+static bool smbconf_value_exists(TALLOC_CTX *ctx, struct registry_key *key,
const char *param)
{
- BOOL ret = False;
+ bool ret = False;
WERROR werr = WERR_OK;
struct registry_value *value = NULL;
valstr = talloc_asprintf(ctx, "%s", (char *)ptr);
break;
case P_BOOL:
- valstr = talloc_asprintf(ctx, "%s", BOOLSTR(*(BOOL *)ptr));
+ valstr = talloc_asprintf(ctx, "%s", BOOLSTR(*(bool *)ptr));
break;
case P_BOOLREV:
- valstr = talloc_asprintf(ctx, "%s", BOOLSTR(!*(BOOL *)ptr));
+ valstr = talloc_asprintf(ctx, "%s", BOOLSTR(!*(bool *)ptr));
break;
case P_ENUM:
for (i = 0; parm->enum_list[i].name; i++) {
}
/* return True iff there are nondefault globals */
-static BOOL globals_exist(void)
+static bool globals_exist(void)
{
int i = 0;
struct parm_struct *parm;
int ret = -1;
const char *filename = NULL;
const char *servicename = NULL;
- BOOL service_found = False;
+ bool service_found = False;
TALLOC_CTX *ctx;
struct share_iterator *shares;
struct share_params *share;
Figure out if the input was an NT group or a SID string.
Return the SID.
**********************************************************/
-static BOOL get_sid_from_input(DOM_SID *sid, char *input)
+static bool get_sid_from_input(DOM_SID *sid, char *input)
{
GROUP_MAP map;
Dump a GROUP_MAP entry to stdout (long or short listing)
**********************************************************/
-static void print_map_entry ( GROUP_MAP map, BOOL long_list )
+static void print_map_entry ( GROUP_MAP map, bool long_list )
{
if (!long_list)
d_printf("%s (%s) -> %s\n", map.nt_name,
static int net_groupmap_list(int argc, const char **argv)
{
size_t entries;
- BOOL long_list = False;
+ bool long_list = False;
size_t i;
fstring ntgroup = "";
fstring sid_string = "";
const char *ntgroup = NULL;
struct group *grp = NULL;
GROUP_MAP map;
- BOOL have_map = False;
+ bool have_map = False;
if ((argc < 1) || (argc > 2)) {
d_printf("Usage: net groupmap set \"NT Group\" "
return 0;
}
-static BOOL print_alias_memberships(TALLOC_CTX *mem_ctx,
+static bool print_alias_memberships(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
const DOM_SID *member)
{
d_printf("Not Implemented yet\n");
return -1;
}
-BOOL idmap_store_secret(const char *backend, bool alloc,
+bool idmap_store_secret(const char *backend, bool alloc,
const char *domain, const char *identity,
const char *secret)
{
char *tmp;
int r;
- BOOL ret;
+ bool ret;
if (alloc) {
r = asprintf(&tmp, "IDMAP_ALLOC_%s", backend);
char *domain;
char *backend;
char *opt = NULL;
- BOOL ret;
+ bool ret;
if (argc != 2) {
return net_help_idmap(argc, argv);
const char *domain = NULL;
char *sitename = NULL;
int count, i;
- BOOL sec_ads = (lp_security() == SEC_ADS);
+ bool sec_ads = (lp_security() == SEC_ADS);
if (sec_ads) {
domain = lp_realm();
const char *username;
const char *oldval = "unknown";
uint32 oldflags, newflags;
- BOOL newval;
+ bool newval;
if ((argc > 1) ||
((argc == 1) && !strequal(argv[0], "yes") &&
const char **argv)
{
POLICY_HND connect_pol, domain_pol, group_pol, user_pol;
- BOOL group_is_primary = False;
+ bool group_is_primary = False;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 *group_rids, num_rids, *name_types, num_members,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 start_idx=0, max_entries=250, num_entries, i, loop_count = 0;
struct acct_info *groups;
- BOOL global = False;
- BOOL local = False;
- BOOL builtin = False;
+ bool global = False;
+ bool local = False;
+ bool builtin = False;
if (argc == 0) {
global = True;
return run_rpc_command(NULL, PI_SRVSVC, 0, rpc_share_list_internals, argc, argv);
}
-static BOOL check_share_availability(struct cli_state *cli, const char *netname)
+static bool check_share_availability(struct cli_state *cli, const char *netname)
{
if (!cli_send_tconX(cli, netname, "A:", "", 0)) {
d_printf("skipping [%s]: not a file share.\n", netname);
return True;
}
-static BOOL check_share_sanity(struct cli_state *cli, fstring netname, uint32 type)
+static bool check_share_sanity(struct cli_state *cli, fstring netname, uint32 type)
{
/* only support disk shares */
if (! ( type == STYPE_DISKTREE || type == (STYPE_DISKTREE | STYPE_HIDDEN)) ) {
*
* @return Boolean result
**/
-BOOL sync_files(struct copy_clistate *cp_clistate, pstring mask)
+bool sync_files(struct copy_clistate *cp_clistate, pstring mask)
{
struct cli_state *targetcli;
pstring targetpath;
* Should set up ACL inheritance.
**/
-BOOL copy_top_level_perms(struct copy_clistate *cp_clistate,
+bool copy_top_level_perms(struct copy_clistate *cp_clistate,
const char *sharename)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
uint32 i;
uint32 level = 502;
struct copy_clistate cp_clistate;
- BOOL got_src_share = False;
- BOOL got_dst_share = False;
+ bool got_src_share = False;
+ bool got_dst_share = False;
pstring mask = "\\*";
char *dst = NULL;
SAFE_FREE(token->user_sids);
}
-static BOOL is_sid_in_token(NT_USER_TOKEN *token, DOM_SID *sid)
+static bool is_sid_in_token(NT_USER_TOKEN *token, DOM_SID *sid)
{
int i;
}
}
-static BOOL is_alias_member(DOM_SID *sid, struct full_alias *alias)
+static bool is_alias_member(DOM_SID *sid, struct full_alias *alias)
{
int i;
}
}
-static BOOL get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *token)
+static bool get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *token)
{
struct winbindd_request request;
struct winbindd_response response;
* Get a list of all user tokens we want to look at
**/
-static BOOL get_user_tokens(int *num_tokens, struct user_token **user_tokens)
+static bool get_user_tokens(int *num_tokens, struct user_token **user_tokens)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-static BOOL get_user_tokens_from_file(FILE *f,
+static bool get_user_tokens_from_file(FILE *f,
int *num_tokens,
struct user_token **tokens)
{
const char **argv)
{
int ret;
- BOOL r;
+ bool r;
ENUM_HND hnd;
uint32 i;
FILE *f;
* Check if a server will take rpc commands
* @param flags Type of server to connect to (PDC, DMB, localhost)
* if the host is not explicitly specified
- * @return BOOL (true means rpc supported)
+ * @return bool (true means rpc supported)
*/
-BOOL net_rpc_check(unsigned flags)
+bool net_rpc_check(unsigned flags)
{
struct cli_state *cli;
- BOOL ret = False;
+ bool ret = False;
struct in_addr server_ip;
char *server_name = NULL;
NTSTATUS status;
TALLOC_CTX *mem_ctx,
int argc,
const char **argv,
- BOOL enable)
+ bool enable)
{
POLICY_HND pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
fstring defaultdatatype = "";
int length=0;
- BOOL valid = True;
+ bool valid = True;
if (i1 == NULL)
return;
struct cli_state *cli_share_src,
struct cli_state *cli_share_dst,
const char *src_name, const char *dst_name,
- BOOL copy_acls, BOOL copy_attrs,
- BOOL copy_timestamps, BOOL is_file)
+ bool copy_acls, bool copy_attrs,
+ bool copy_timestamps, bool is_file)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int fnum_src = 0;
struct cli_state *cli_share_src,
struct cli_state *cli_share_dst,
const char *src_name, const char *dst_name,
- BOOL copy_acls, BOOL copy_attrs,
- BOOL copy_timestamps, BOOL is_file)
+ bool copy_acls, bool copy_attrs,
+ bool copy_timestamps, bool is_file)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int fnum_src = 0;
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int length = 0;
- BOOL valid = True;
+ bool valid = True;
fstring name = "";
fstring driverpath = "";
*
**/
-static BOOL net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
char *name,
uint32 flags,
return True;
}
-static BOOL net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
const char *printername,
uint32 access_required,
return True;
}
-static BOOL net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
uint32 level,
return True;
}
-static BOOL net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
uint32 level,
}
-static BOOL net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
REGISTRY_VALUE *value)
}
-static BOOL net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
const char *keyname,
return True;
}
-static BOOL net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
uint32 offered,
POLICY_HND *hnd,
}
-static BOOL net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
char *keyname,
return True;
}
-static BOOL net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
int level,
return True;
}
-static BOOL net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
uint32 level, const char *env,
uint32 *num_drivers,
return True;
}
-static BOOL net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, uint32 level,
const char *env, int version,
}
-static BOOL net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx, uint32 level,
PRINTER_DRIVER_CTR *ctr)
{
* for a single printer or for all printers depending on argc/argv
**/
-static BOOL get_printer_info(struct rpc_pipe_client *pipe_hnd,
+static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
int level,
int argc,
pstring printername, sharename;
PRINTER_INFO_CTR ctr, ctr_pub;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
WERROR result;
const char *action_str;
pstring guid;
PRINTER_INFO_CTR ctr, ctr_pub;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
int state;
if (!get_printer_info(pipe_hnd, mem_ctx, 2, argc, argv, &num_printers, &ctr))
uint32 num_printers;
uint32 level = 2;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_src, ctr_dst, ctr_enum;
uint32 num_printers;
uint32 level = 1;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_enum, ctr_dst;
uint32 num_printers;
uint32 level = 3;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
- BOOL got_src_driver_share = False;
- BOOL got_dst_driver_share = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
+ bool got_src_driver_share = False;
+ bool got_dst_driver_share = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_DRIVER_CTR drv_ctr_src, drv_ctr_dst;
struct cli_state *cli_dst = NULL;
POLICY_HND hnd_dst, hnd_src;
pstring printername, sharename;
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
DEBUG(3,("copying printers\n"));
uint32 num_printers, val_needed, data_needed;
uint32 level = 2;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_enum, ctr_dst, ctr_dst_publish;
#include "regfio.h"
#include "reg_objects.h"
-static BOOL reg_hive_key(const char *fullname, uint32 *reg_type,
+static bool reg_hive_key(const char *fullname, uint32 *reg_type,
const char **key_name)
{
const char *sep;
/********************************************************************
********************************************************************/
-static BOOL dump_registry_tree( REGF_FILE *file, REGF_NK_REC *nk, const char *parent )
+static bool dump_registry_tree( REGF_FILE *file, REGF_NK_REC *nk, const char *parent )
{
REGF_NK_REC *key;
pstring regpath;
/********************************************************************
********************************************************************/
-static BOOL write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
+static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
REGF_NK_REC *parent, REGF_FILE *outfile,
const char *parentpath )
{
DOM_SID group_sid;
fstring sid_string;
GROUP_MAP map;
- BOOL insert = True;
+ bool insert = True;
unistr2_to_ascii(name, &delta->uni_grp_name, sizeof(name));
unistr2_to_ascii(comment, &delta->uni_grp_desc, sizeof(comment));
unix_members = grp->gr_mem;
while (*unix_members) {
- BOOL is_nt_member = False;
+ bool is_nt_member = False;
for (i=0; i<delta->num_members; i++) {
if (nt_members[i] == NULL) {
/* This was a primary group */
}
for (i=0; i<delta->num_members; i++) {
- BOOL is_unix_member = False;
+ bool is_unix_member = False;
if (nt_members[i] == NULL) {
/* This was the primary group */
DOM_SID alias_sid;
fstring sid_string;
GROUP_MAP map;
- BOOL insert = True;
+ bool insert = True;
unistr2_to_ascii(name, &delta->uni_als_name, sizeof(name));
unistr2_to_ascii(comment, &delta->uni_als_desc, sizeof(comment));
va_list ap;
char *value, *p, *base64;
DATA_BLOB base64_blob;
- BOOL do_base64 = False;
+ bool do_base64 = False;
int res;
va_start(ap, fmt);
}
if (!do_base64) {
- BOOL only_whitespace = True;
+ bool only_whitespace = True;
for (p=value; *p; p++) {
/*
* I know that this not multibyte safe, but we break
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv,
- BOOL (*fn)(TALLOC_CTX *mem_ctx,
+ int (*fn)(TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
SAM_UNK_INFO_1 *i1,
SAM_UNK_INFO_3 *i3,
ADD_TO_ARRAY(NULL, char *, SMB_STRDUP(text), &cmds, &n_cmds);
for (c = this_ctx->cmds; c->name != NULL; c++) {
- BOOL match = (strncmp(text, c->name, strlen(text)) == 0);
+ bool match = (strncmp(text, c->name, strlen(text)) == 0);
if (match) {
ADD_TO_ARRAY(NULL, char *, SMB_STRDUP(c->name),
return status;
}
-static BOOL net_sh_process(struct rpc_sh_ctx *ctx,
+static bool net_sh_process(struct rpc_sh_ctx *ctx,
int argc, const char **argv)
{
struct rpc_sh_cmd *c;
*/
static int net_sam_userset(int argc, const char **argv, const char *field,
- BOOL (*fn)(struct samu *, const char *,
+ bool (*fn)(struct samu *, const char *,
enum pdb_value_state))
{
struct samu *sam_acct = NULL;
static int net_sam_do_list(int argc, const char **argv,
struct pdb_search *search, const char *what)
{
- BOOL verbose = (argc == 1);
+ bool verbose = (argc == 1);
if ((argc > 1) ||
((argc == 1) && !strequal(argv[0], "verbose"))) {
static int show_session(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf,
void *state)
{
- BOOL *parseable = (BOOL *)state;
+ bool *parseable = (bool *)state;
struct sessionid sessionid;
if (dbuf.dsize != sizeof(sessionid))
static int net_status_sessions(int argc, const char **argv)
{
TDB_CONTEXT *tdb;
- BOOL parseable;
+ bool parseable;
if (argc == 0) {
parseable = False;
{
struct sessionids *ids = (struct sessionids *)state;
int i;
- BOOL guest = True;
+ bool guest = True;
if (crec->cnum == -1)
return 0;
/***************************************************************************
***************************************************************************/
-static int get_share_list(TALLOC_CTX *ctx, const char *wcard, BOOL only_ours)
+static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
{
SMB_STRUCT_DIR *dp;
SMB_STRUCT_DIRENT *de;
int num_aces;
char sep_str[2];
enum usershare_err us_err;
- BOOL guest_ok = False;
+ bool guest_ok = False;
sep_str[0] = *lp_winbind_separator();
sep_str[1] = '\0';
static int net_usershare_info(int argc, const char **argv)
{
fstring wcard;
- BOOL only_ours = True;
+ bool only_ours = True;
int ret = -1;
struct us_priv_info pi;
TALLOC_CTX *ctx;
const char *pacl;
size_t to_write;
uid_t myeuid = geteuid();
- BOOL guest_ok = False;
+ bool guest_ok = False;
int num_usershares;
us_comment = "";
static int net_usershare_list(int argc, const char **argv)
{
fstring wcard;
- BOOL only_ours = True;
+ bool only_ours = True;
int ret = -1;
struct us_priv_info pi;
TALLOC_CTX *ctx;
#include "includes.h"
#include "utils/net.h"
-BOOL is_valid_policy_hnd(const POLICY_HND *hnd)
+bool is_valid_policy_hnd(const POLICY_HND *hnd)
{
POLICY_HND tmp;
ZERO_STRUCT(tmp);
********************************************************/
struct con_struct {
- BOOL failed_connect;
+ bool failed_connect;
NTSTATUS err;
struct cli_state *cli;
struct rpc_pipe_client *lsapipe;
#include "includes.h"
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
-static BOOL give_flags = False;
-static BOOL use_bcast = True;
-static BOOL got_bcast = False;
+static bool give_flags = False;
+static bool use_bcast = True;
+static bool got_bcast = False;
static struct in_addr bcast_addr;
-static BOOL recursion_desired = False;
-static BOOL translate_addresses = False;
+static bool recursion_desired = False;
+static bool translate_addresses = False;
static int ServerFD= -1;
static int RootPort = False;
-static BOOL find_status=False;
+static bool find_status=False;
/****************************************************************************
open the socket communication
**************************************************************************/
-static BOOL open_sockets(void)
+static bool open_sockets(void)
{
ServerFD = open_socket_in( SOCK_DGRAM,
(RootPort ? 137 : 0),
/****************************************************************************
send out one query
****************************************************************************/
-static BOOL query_one(const char *lookup, unsigned int lookup_type)
+static bool query_one(const char *lookup, unsigned int lookup_type)
{
int j, count, flags = 0;
struct in_addr *ip_list=NULL;
int opt;
unsigned int lookup_type = 0x0;
fstring lookup;
- static BOOL find_master=False;
- static BOOL lookup_by_ip = False;
+ static bool find_master=False;
+ static bool lookup_by_ip = False;
poptContext pc;
TALLOC_CTX *frame = talloc_stackframe();
static char winbind_separator(void)
{
struct winbindd_response response;
- static BOOL got_sep;
+ static bool got_sep;
static char sep;
if (got_sep)
/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
form DOMAIN/user into a domain and a user */
-static BOOL parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
+static bool parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
fstring user)
{
return True;
}
-static BOOL get_require_membership_sid(void) {
+static bool get_require_membership_sid(void) {
struct winbindd_request request;
struct winbindd_response response;
}
/* Authenticate a user with a plaintext password */
-static BOOL check_plaintext_auth(const char *user, const char *pass,
- BOOL stdout_diagnostics)
+static bool check_plaintext_auth(const char *user, const char *pass,
+ bool stdout_diagnostics)
{
struct winbindd_request request;
struct winbindd_response response;
static NTLMSSP_STATE *ntlmssp_state = NULL;
static char* want_feature_list = NULL;
static uint32 neg_flags = 0;
- static BOOL have_session_key = False;
+ static bool have_session_key = False;
static DATA_BLOB session_key;
DATA_BLOB request, reply;
NTSTATUS nt_status;
static DATA_BLOB initial_message;
static char* want_feature_list = NULL;
static uint32 neg_flags = 0;
- static BOOL have_session_key = False;
+ static bool have_session_key = False;
static DATA_BLOB session_key;
DATA_BLOB request, reply;
NTSTATUS nt_status;
- BOOL first = False;
+ bool first = False;
if (!opt_username || !*opt_username) {
x_fprintf(x_stderr, "username must be specified!\n\n");
static NTLMSSP_STATE *client_ntlmssp_state = NULL;
-static BOOL manage_client_ntlmssp_init(SPNEGO_DATA spnego)
+static bool manage_client_ntlmssp_init(SPNEGO_DATA spnego)
{
NTSTATUS status;
DATA_BLOB null_blob = data_blob_null;
#ifdef HAVE_KRB5
-static BOOL manage_client_krb5_init(SPNEGO_DATA spnego)
+static bool manage_client_krb5_init(SPNEGO_DATA spnego)
{
char *principal;
DATA_BLOB tkt, to_server;
static char *username;
static char *domain;
static char *plaintext_password;
- static BOOL ntlm_server_1_user_session_key;
- static BOOL ntlm_server_1_lm_session_key;
+ static bool ntlm_server_1_user_session_key;
+ static bool ntlm_server_1_lm_session_key;
if (strequal(buf, ".")) {
if (!full_username && !username) {
char buf[SQUID_BUFFER_SIZE+1];
int length;
char *c;
- static BOOL err;
+ static bool err;
/* this is not a typo - x_fgets doesn't work too well under squid */
if (fgets(buf, sizeof(buf)-1, stdin) == NULL) {
/* Authenticate a user with a challenge/response */
-static BOOL check_auth_crap(void)
+static bool check_auth_crap(void)
{
NTSTATUS nt_status;
uint32 flags = 0;
* Test the normal 'LM and NTLM' combination
*/
-static BOOL test_lm_ntlm_broken(enum ntlm_break break_which)
+static bool test_lm_ntlm_broken(enum ntlm_break break_which)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB lm_response = data_blob(NULL, 24);
* Test LM authentication, no NT response supplied
*/
-static BOOL test_lm(void)
+static bool test_lm(void)
{
return test_lm_ntlm_broken(NO_NT);
* Test the NTLM response only, no LM.
*/
-static BOOL test_ntlm(void)
+static bool test_ntlm(void)
{
return test_lm_ntlm_broken(NO_LM);
}
* Test the NTLM response only, but in the LM field.
*/
-static BOOL test_ntlm_in_lm(void)
+static bool test_ntlm_in_lm(void)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB nt_response = data_blob(NULL, 24);
* Test the NTLM response only, but in the both the NT and LM fields.
*/
-static BOOL test_ntlm_in_both(void)
+static bool test_ntlm_in_both(void)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB nt_response = data_blob(NULL, 24);
* Test the NTLMv2 and LMv2 responses
*/
-static BOOL test_lmv2_ntlmv2_broken(enum ntlm_break break_which)
+static bool test_lmv2_ntlmv2_broken(enum ntlm_break break_which)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB ntlmv2_response = data_blob_null;
* Test the NTLMv2 and LMv2 responses
*/
-static BOOL test_lmv2_ntlmv2(void)
+static bool test_lmv2_ntlmv2(void)
{
return test_lmv2_ntlmv2_broken(BREAK_NONE);
}
* Test the LMv2 response only
*/
-static BOOL test_lmv2(void)
+static bool test_lmv2(void)
{
return test_lmv2_ntlmv2_broken(NO_NT);
}
* Test the NTLMv2 response only
*/
-static BOOL test_ntlmv2(void)
+static bool test_ntlmv2(void)
{
return test_lmv2_ntlmv2_broken(NO_LM);
}
-static BOOL test_lm_ntlm(void)
+static bool test_lm_ntlm(void)
{
return test_lm_ntlm_broken(BREAK_NONE);
}
-static BOOL test_ntlm_lm_broken(void)
+static bool test_ntlm_lm_broken(void)
{
return test_lm_ntlm_broken(BREAK_LM);
}
-static BOOL test_ntlm_ntlm_broken(void)
+static bool test_ntlm_ntlm_broken(void)
{
return test_lm_ntlm_broken(BREAK_NT);
}
-static BOOL test_ntlmv2_lmv2_broken(void)
+static bool test_ntlmv2_lmv2_broken(void)
{
return test_lmv2_ntlmv2_broken(BREAK_LM);
}
-static BOOL test_ntlmv2_ntlmv2_broken(void)
+static bool test_ntlmv2_ntlmv2_broken(void)
{
return test_lmv2_ntlmv2_broken(BREAK_NT);
}
-static BOOL test_plaintext(enum ntlm_break break_which)
+static bool test_plaintext(enum ntlm_break break_which)
{
NTSTATUS nt_status;
uint32 flags = 0;
return break_which != BREAK_NT;
}
-static BOOL test_plaintext_none_broken(void) {
+static bool test_plaintext_none_broken(void) {
return test_plaintext(BREAK_NONE);
}
-static BOOL test_plaintext_lm_broken(void) {
+static bool test_plaintext_lm_broken(void) {
return test_plaintext(BREAK_LM);
}
-static BOOL test_plaintext_nt_broken(void) {
+static bool test_plaintext_nt_broken(void) {
return test_plaintext(BREAK_NT);
}
-static BOOL test_plaintext_nt_only(void) {
+static bool test_plaintext_nt_only(void) {
return test_plaintext(NO_LM);
}
-static BOOL test_plaintext_lm_only(void) {
+static bool test_plaintext_lm_only(void) {
return test_plaintext(NO_NT);
}
*/
static const struct ntlm_tests {
- BOOL (*fn)(void);
+ bool (*fn)(void);
const char *name;
} test_table[] = {
{test_lm, "LM"},
{NULL, NULL}
};
-BOOL diagnose_ntlm_auth(void)
+bool diagnose_ntlm_auth(void)
{
unsigned int i;
- BOOL pass = True;
+ bool pass = True;
for (i=0; test_table[i].fn; i++) {
if (!test_table[i].fn()) {
Used if the '-s' (smbpasswd) or '-t' (pdbedit) option is set
to silently get passwords to enable scripting.
*************************************************************/
-char *get_pass( const char *prompt, BOOL stdin_get)
+char *get_pass( const char *prompt, bool stdin_get)
{
char *p;
if (stdin_get) {
Print info from sam structure
**********************************************************/
-static int print_sam_info (struct samu *sam_pwent, BOOL verbosity, BOOL smbpwdstyle)
+static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdstyle)
{
uid_t uid;
time_t tmp;
Get an Print User Info
**********************************************************/
-static int print_user_info (struct pdb_methods *in, const char *username, BOOL verbosity, BOOL smbpwdstyle)
+static int print_user_info (struct pdb_methods *in, const char *username, bool verbosity, bool smbpwdstyle)
{
struct samu *sam_pwent=NULL;
- BOOL ret;
+ bool ret;
if ( (sam_pwent = samu_new( NULL )) == NULL ) {
return -1;
/*********************************************************
List Users
**********************************************************/
-static int print_users_list (struct pdb_methods *in, BOOL verbosity, BOOL smbpwdstyle)
+static int print_users_list (struct pdb_methods *in, bool verbosity, bool smbpwdstyle)
{
struct samu *sam_pwent=NULL;
- BOOL check;
+ bool check;
check = NT_STATUS_IS_OK(in->setsampwent(in, False, 0));
if (!check) {
static int fix_users_list (struct pdb_methods *in)
{
struct samu *sam_pwent=NULL;
- BOOL check;
+ bool check;
check = NT_STATUS_IS_OK(in->setsampwent(in, False, 0));
if (!check) {
const char *drive, const char *script,
const char *profile, const char *account_control,
const char *user_sid, const char *user_domain,
- const BOOL badpw, const BOOL hours)
+ const bool badpw, const bool hours)
{
- BOOL updated_autolock = False, updated_badpw = False;
+ bool updated_autolock = False, updated_badpw = False;
struct samu *sam_pwent=NULL;
- BOOL ret;
+ bool ret;
if ( (sam_pwent = samu_new( NULL )) == NULL ) {
return 1;
static int new_user (struct pdb_methods *in, const char *username,
const char *fullname, const char *homedir,
const char *drive, const char *script,
- const char *profile, char *user_sid, BOOL stdin_get)
+ const char *profile, char *user_sid, bool stdin_get)
{
struct samu *sam_pwent;
char *password1, *password2;
int main (int argc, char **argv)
{
- static BOOL list_users = False;
- static BOOL verbose = False;
- static BOOL spstyle = False;
- static BOOL machine = False;
- static BOOL add_user = False;
- static BOOL delete_user = False;
- static BOOL modify_user = False;
+ static bool list_users = False;
+ static bool verbose = False;
+ static bool spstyle = False;
+ static bool machine = False;
+ static bool add_user = False;
+ static bool delete_user = False;
+ static bool modify_user = False;
uint32 setparms, checkparms;
int opt;
static char *full_name = NULL;
static char *backend = NULL;
static char *backend_in = NULL;
static char *backend_out = NULL;
- static BOOL transfer_groups = False;
- static BOOL transfer_account_policies = False;
- static BOOL reset_account_policies = False;
- static BOOL force_initialised_password = False;
+ static bool transfer_groups = False;
+ static bool transfer_account_policies = False;
+ static bool reset_account_policies = False;
+ static bool force_initialised_password = False;
static char *logon_script = NULL;
static char *profile_path = NULL;
static char *user_domain = NULL;
static char *account_policy = NULL;
static char *user_sid = NULL;
static long int account_policy_value = 0;
- BOOL account_policy_value_set = False;
- static BOOL badpw_reset = False;
- static BOOL hours_reset = False;
+ bool account_policy_value_set = False;
+ static bool badpw_reset = False;
+ static bool hours_reset = False;
static char *pwd_time_format = NULL;
- static BOOL pw_from_stdin = False;
+ static bool pw_from_stdin = False;
struct pdb_methods *bin, *bout, *bdef;
char *configfile = NULL;
TALLOC_CTX *frame = talloc_stackframe();
DOM_SID old_sid, new_sid;
int change = 0, new_val = 0;
-BOOL opt_verbose = False;
+bool opt_verbose = False;
/********************************************************************
********************************************************************/
/********************************************************************
********************************************************************/
-static BOOL swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
+static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
{
SEC_ACL *acl;
int i;
- BOOL update = False;
+ bool update = False;
verbose_output(" Owner SID: %s\n", sid_string_static(sd->owner_sid));
if ( sid_equal( sd->owner_sid, s1 ) ) {
/********************************************************************
********************************************************************/
-static BOOL copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
+static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
REGF_NK_REC *parent, REGF_FILE *outfile,
const char *parentpath )
{
parse an ACE in the same format as print_ace()
********************************************************************/
-static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
+static bool parse_ace(SEC_ACE *ace, const char *orig_str)
{
char *p;
const char *cp;
p = tok;
while(*p) {
- BOOL found = False;
+ bool found = False;
for (v = special_values; v->perm; v++) {
if (v->perm[0] == *p) {
}
/* add an ACE to a list of ACEs in a SEC_ACL */
-static BOOL add_ace(TALLOC_CTX *mem_ctx, SEC_ACL **the_acl, SEC_ACE *ace)
+static bool add_ace(TALLOC_CTX *mem_ctx, SEC_ACL **the_acl, SEC_ACE *ace)
{
SEC_ACL *new_ace;
SEC_ACE *aces;
return 0;
case SMB_ACL_DELETE:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->aces[i], &old->dacl->aces[j])) {
break;
case SMB_ACL_MODIFY:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sid_equal(&sd->dacl->aces[i].trustee,
enum acl_mode mode = SMB_ACL_SET;
static char *the_acl = NULL;
fstring sharename;
- BOOL force_acl = False;
+ bool force_acl = False;
int snum;
poptContext pc;
- BOOL initialize_sid = False;
+ bool initialize_sid = False;
struct poptOption long_options[] = {
POPT_AUTOHELP
{ "remove", 'r', POPT_ARG_STRING, &the_acl, 'r', "Delete an ACE", "ACL" },
/* numeric is set when the user wants numeric SIDs and ACEs rather
than going via LSA calls to resolve them */
-static BOOL numeric = False;
+static bool numeric = False;
enum acl_mode {SMB_ACL_SET, SMB_ACL_DELETE, SMB_ACL_MODIFY, SMB_ACL_ADD };
enum chown_mode {REQUEST_NONE, REQUEST_CHOWN, REQUEST_CHGRP};
static struct cli_state *global_hack_cli;
static struct rpc_pipe_client *global_pipe_hnd;
static POLICY_HND pol;
-static BOOL got_policy_hnd;
+static bool got_policy_hnd;
static struct cli_state *connect_one(const char *share);
/* Open cli connection and policy handle */
-static BOOL cacls_open_policy_hnd(void)
+static bool cacls_open_policy_hnd(void)
{
/* Initialise cli LSA connection */
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL StringToSid(DOM_SID *sid, const char *str)
+static bool StringToSid(DOM_SID *sid, const char *str)
{
enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
- BOOL result = True;
+ bool result = True;
if (strncmp(str, "S-", 2) == 0) {
return string_to_sid(sid, str);
/* parse an ACE in the same format as print_ace() */
-static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
+static bool parse_ace(SEC_ACE *ace, const char *orig_str)
{
char *p;
const char *cp;
p = tok;
while(*p) {
- BOOL found = False;
+ bool found = False;
for (v = special_values; v->perm; v++) {
if (v->perm[0] == *p) {
}
/* add an ACE to a list of ACEs in a SEC_ACL */
-static BOOL add_ace(SEC_ACL **the_acl, SEC_ACE *ace)
+static bool add_ace(SEC_ACL **the_acl, SEC_ACE *ace)
{
SEC_ACL *new_ace;
SEC_ACE *aces;
switch (mode) {
case SMB_ACL_DELETE:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->aces[i],
case SMB_ACL_MODIFY:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sid_equal(&sd->dacl->aces[i].trustee,
/* Send a message to a destination pid. Zero means broadcast smbd. */
-static BOOL send_message(struct messaging_context *msg_ctx,
+static bool send_message(struct messaging_context *msg_ctx,
struct server_id pid, int msg_type,
const void *buf, int len)
{
- BOOL ret;
+ bool ret;
int n_sent = 0;
if (procid_to_pid(&pid) != 0)
const struct timeval *now,
void *private_data)
{
- BOOL *timed_out = (BOOL *)private_data;
+ bool *timed_out = (bool *)private_data;
TALLOC_FREE(te);
*timed_out = True;
}
/* Wait for one or more reply messages */
static void wait_replies(struct messaging_context *msg_ctx,
- BOOL multiple_replies)
+ bool multiple_replies)
{
struct timed_event *te;
- BOOL timed_out = False;
+ bool timed_out = False;
if (!(te = event_add_timed(messaging_event_context(msg_ctx), NULL,
timeval_current_ofs(timeout, 0),
/* Send no message. Useful for testing. */
-static BOOL do_noop(struct messaging_context *msg_ctx,
+static bool do_noop(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Send a debug string */
-static BOOL do_debug(struct messaging_context *msg_ctx,
+static bool do_debug(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return 0;
}
-static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
+static bool do_daemon_stack_trace(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
#else /* defined(HAVE_LIBUNWIND_PTRACE) && defined(HAVE_LINUX_PTRACE) */
-static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
+static bool do_daemon_stack_trace(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Inject a fault (fatal signal) into a running smbd */
-static BOOL do_inject_fault(struct messaging_context *msg_ctx,
+static bool do_inject_fault(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Force a browser election */
-static BOOL do_election(struct messaging_context *msg_ctx,
+static bool do_election(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
num_replies++;
}
-static BOOL do_ping(struct messaging_context *msg_ctx,
+static bool do_ping(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Set profiling options */
-static BOOL do_profile(struct messaging_context *msg_ctx,
+static bool do_profile(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
send_message(msg_ctx, pid, MSG_PROFILELEVEL, &v, sizeof(int));
}
-static BOOL do_profilelevel(struct messaging_context *msg_ctx,
+static bool do_profilelevel(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Display debug level settings */
-static BOOL do_debuglevel(struct messaging_context *msg_ctx,
+static bool do_debuglevel(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Send a print notify message */
-static BOOL do_printnotify(struct messaging_context *msg_ctx,
+static bool do_printnotify(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Close a share */
-static BOOL do_closeshare(struct messaging_context *msg_ctx,
+static bool do_closeshare(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* force a blocking lock retry */
-static BOOL do_lockretry(struct messaging_context *msg_ctx,
+static bool do_lockretry(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* force a validation of all brl entries, including re-sends. */
-static BOOL do_brl_revalidate(struct messaging_context *msg_ctx,
+static bool do_brl_revalidate(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Force a SAM synchronisation */
-static BOOL do_samsync(struct messaging_context *msg_ctx,
+static bool do_samsync(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Force a SAM replication */
-static BOOL do_samrepl(struct messaging_context *msg_ctx,
+static bool do_samrepl(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Display talloc pool usage */
-static BOOL do_poolusage(struct messaging_context *msg_ctx,
+static bool do_poolusage(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Perform a dmalloc mark */
-static BOOL do_dmalloc_mark(struct messaging_context *msg_ctx,
+static bool do_dmalloc_mark(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Perform a dmalloc changed */
-static BOOL do_dmalloc_changed(struct messaging_context *msg_ctx,
+static bool do_dmalloc_changed(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Shutdown a server process */
-static BOOL do_shutdown(struct messaging_context *msg_ctx,
+static bool do_shutdown(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Notify a driver upgrade */
-static BOOL do_drvupgrade(struct messaging_context *msg_ctx,
+static bool do_drvupgrade(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
strlen(argv[1]) + 1);
}
-static BOOL do_winbind_online(struct messaging_context *msg_ctx,
+static bool do_winbind_online(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return send_message(msg_ctx, pid, MSG_WINBIND_ONLINE, NULL, 0);
}
-static BOOL do_winbind_offline(struct messaging_context *msg_ctx,
+static bool do_winbind_offline(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
TDB_CONTEXT *tdb;
- BOOL ret = False;
+ bool ret = False;
int retry = 0;
if (argc != 1) {
return ret;
}
-static BOOL do_winbind_onlinestatus(struct messaging_context *msg_ctx,
+static bool do_winbind_onlinestatus(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return num_replies;
}
-static BOOL do_dump_event_list(struct messaging_context *msg_ctx,
+static bool do_dump_event_list(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
num_replies++;
}
-static BOOL do_winbind_validate_cache(struct messaging_context *msg_ctx,
+static bool do_winbind_validate_cache(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return num_replies;
}
-static BOOL do_reload_config(struct messaging_context *msg_ctx,
+static bool do_reload_config(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
push_ascii(n->scope, global_scope(), 64, STR_TERMINATE);
}
-static BOOL do_nodestatus(struct messaging_context *msg_ctx,
+static bool do_nodestatus(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
static const struct {
const char *name; /* Option name */
- BOOL (*fn)(struct messaging_context *msg_ctx,
+ bool (*fn)(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv);
const char *help; /* Short help text */
/* Execute smbcontrol command */
-static BOOL do_command(struct messaging_context *msg_ctx,
+static bool do_command(struct messaging_context *msg_ctx,
int argc, const char **argv)
{
const char *dest = argv[0], *command = argv[1];
/* numeric is set when the user wants numeric SIDs and ACEs rather
than going via LSA calls to resolve them */
-static BOOL numeric;
-static BOOL verbose;
+static bool numeric;
+static bool verbose;
enum todo_values {NOOP_QUOTA=0,FS_QUOTA,USER_QUOTA,LIST_QUOTA,SET_QUOTA};
enum exit_values {EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR};
static struct cli_state *cli_ipc;
static struct rpc_pipe_client *global_pipe_hnd;
static POLICY_HND pol;
-static BOOL got_policy_hnd;
+static bool got_policy_hnd;
static struct cli_state *connect_one(const char *share);
/* Open cli connection and policy handle */
-static BOOL cli_open_policy_hnd(void)
+static bool cli_open_policy_hnd(void)
{
/* Initialise cli LSA connection */
}
/* convert a SID to a string, either numeric or username/group */
-static void SidToString(fstring str, DOM_SID *sid, BOOL _numeric)
+static void SidToString(fstring str, DOM_SID *sid, bool _numeric)
{
char **domains = NULL;
char **names = NULL;
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL StringToSid(DOM_SID *sid, const char *str)
+static bool StringToSid(DOM_SID *sid, const char *str)
{
enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
- BOOL result = True;
+ bool result = True;
if (strncmp(str, "S-", 2) == 0) {
return string_to_sid(sid, str);
{
char *p = set_str,*p2;
int todo;
- BOOL stop = False;
- BOOL enable = False;
- BOOL deny = False;
+ bool stop = False;
+ bool enable = False;
+ bool deny = False;
if (strnequal(set_str,"UQLIM:",6)) {
p += 6;
pstring set_str = {0};
enum SMB_QUOTA_TYPE qtype = SMB_INVALID_QUOTA_TYPE;
int cmd = 0;
- static BOOL test_args = False;
+ static bool test_args = False;
struct cli_state *cli;
- BOOL fix_user = False;
+ bool fix_user = False;
SMB_NTQUOTA_STRUCT qt;
TALLOC_CTX *frame = talloc_stackframe();
poptContext pc;
#include "includes.h"
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
/*
* Next two lines needed for SunOS and don't
extern int optind;
/* forced running in root-mode */
-static BOOL got_username = False;
-static BOOL stdin_passwd_get = False;
+static bool got_username = False;
+static bool stdin_passwd_get = False;
static fstring user_name;
static char *new_passwd = NULL;
static const char *remote_machine = NULL;
/*************************************************************
Utility function to prompt for new password.
*************************************************************/
-static char *prompt_for_new_password(BOOL stdin_get)
+static char *prompt_for_new_password(bool stdin_get)
{
char *p;
fstring new_pw;
/*******************************************************************
Store the LDAP admin password in secrets.tdb
******************************************************************/
-static BOOL store_ldap_admin_pw (char* pw)
+static bool store_ldap_admin_pw (char* pw)
{
if (!pw)
return False;
#include "includes.h"
-static BOOL use_bcast;
+static bool use_bcast;
/* How low can we go? */
/****************************************************************************
display tree of smb workgroups, servers and shares
****************************************************************************/
-static BOOL get_workgroups(struct user_auth_info *user_info)
+static bool get_workgroups(struct user_auth_info *user_info)
{
struct cli_state *cli;
struct in_addr server_ip;
/* Retrieve the list of servers for a given workgroup */
-static BOOL get_servers(char *workgroup, struct user_auth_info *user_info)
+static bool get_servers(char *workgroup, struct user_auth_info *user_info)
{
struct cli_state *cli;
struct in_addr server_ip;
return True;
}
-static BOOL get_rpc_shares(struct cli_state *cli,
+static bool get_rpc_shares(struct cli_state *cli,
void (*fn)(const char *, uint32, const char *, void *),
void *state)
{
}
-static BOOL get_shares(char *server_name, struct user_auth_info *user_info)
+static bool get_shares(char *server_name, struct user_auth_info *user_info)
{
struct cli_state *cli;
return True;
}
-static BOOL print_tree(struct user_auth_info *user_info)
+static bool print_tree(struct user_auth_info *user_info)
{
struct name_list *wg, *sv, *sh;
static int verbose, brief;
static int shares_only = 0; /* Added by RJS */
static int locks_only = 0; /* Added by RJS */
-static BOOL processes_only=False;
+static bool processes_only=False;
static int show_brl;
-static BOOL numeric_only = False;
+static bool numeric_only = False;
const char *username = NULL;
-extern BOOL status_profile_dump(BOOL be_verbose);
-extern BOOL status_profile_rates(BOOL be_verbose);
+extern bool status_profile_dump(bool be_verbose);
+extern bool status_profile_rates(bool be_verbose);
/* added by OH */
static void Ucrit_addUid(uid_t uid)
return 0;
}
-static BOOL Ucrit_addPid( struct server_id pid )
+static bool Ucrit_addPid( struct server_id pid )
{
if ( !Ucrit_IsActive )
return True;
{
int c;
int profile_only = 0;
- BOOL show_processes, show_locks, show_shares;
+ bool show_processes, show_locks, show_shares;
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
#include "includes.h"
-BOOL status_profile_dump(BOOL be_verbose);
-BOOL status_profile_rates(BOOL be_verbose);
+bool status_profile_dump(bool be_verbose);
+bool status_profile_rates(bool be_verbose);
#ifdef WITH_PROFILE
static void profile_separator(const char * title)
/*******************************************************************
dump the elements of the profile structure
******************************************************************/
-BOOL status_profile_dump(BOOL verbose)
+bool status_profile_dump(bool verbose)
{
#ifdef WITH_PROFILE
if (!profile_setup(NULL, True)) {
static struct profile_stats sample_data[2];
static SMB_BIG_UINT sample_time[2];
-BOOL status_profile_rates(BOOL verbose)
+bool status_profile_rates(bool verbose)
{
SMB_BIG_UINT remain_usec;
SMB_BIG_UINT next_usec;
#else /* WITH_PROFILE */
-BOOL status_profile_rates(BOOL verbose)
+bool status_profile_rates(bool verbose)
{
fprintf(stderr, "Profile data unavailable\n");
return False;
#include "includes.h"
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
/***********************************************
Here we do a set of 'hard coded' checks for bad
{
const char *config_file = dyn_CONFIGFILE;
int s;
- static BOOL silent_mode = False;
- static BOOL show_all_parameters = False;
+ static bool silent_mode = False;
+ static bool show_all_parameters = False;
int ret = 0;
poptContext pc;
static const char *term_code = "";
getc(stdin);
}
if (parameter_name || section_name) {
- BOOL isGlobal = False;
+ bool isGlobal = False;
s = GLOBAL_SECTION_SNUM;
if (!section_name) {
static const char *baseurl;
static char *pathinfo;
static char *C_user;
-static BOOL inetd_server;
-static BOOL got_request;
+static bool inetd_server;
+static bool got_request;
static char *grab_line(FILE *f, int *cl)
{
/***************************************************************************
handle a http authentication line
***************************************************************************/
-static BOOL cgi_handle_authorization(char *line)
+static bool cgi_handle_authorization(char *line)
{
char *p;
fstring user, user_pass;
/***************************************************************************
is this root?
***************************************************************************/
-BOOL am_root(void)
+bool am_root(void)
{
if (geteuid() == 0) {
return( True);
**/
void cgi_setup(const char *rootdir, int auth_required)
{
- BOOL authenticated = False;
+ bool authenticated = False;
char line[1024];
char *url=NULL;
char *p;
/***************************************************************************
return True if the request was a POST
***************************************************************************/
-BOOL cgi_waspost(void)
+bool cgi_waspost(void)
{
if (inetd_server) {
return request_post;
/* check to see if winbind is running by pinging it */
-BOOL winbindd_running(void)
+bool winbindd_running(void)
{
return winbind_ping();
}
/* check to see if nmbd is running on localhost by looking for a __SAMBA__
response */
-BOOL nmbd_running(void)
+bool nmbd_running(void)
{
struct in_addr loopback_ip;
int fd, count, flags;
/* check to see if smbd is running on localhost by trying to open a connection
then closing it */
-BOOL smbd_running(void)
+bool smbd_running(void)
{
struct in_addr loopback_ip;
NTSTATUS status;
int autorefresh=0;
int refresh_interval=30;
int nr_running=0;
- BOOL waitup = False;
+ bool waitup = False;
smbd_pid = pid_to_procid(pidfile_pid("smbd"));
#include "includes.h"
#include "web/swat_proto.h"
-static BOOL demo_mode = False;
-static BOOL passwd_only = False;
-static BOOL have_write_access = False;
-static BOOL have_read_access = False;
+static bool demo_mode = False;
+static bool passwd_only = False;
+static bool have_write_access = False;
+static bool have_read_access = False;
static int iNumNonAutoPrintServices = 0;
/*
case P_BOOL:
printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
- printf("<option %s>Yes", (*(BOOL *)ptr)?"selected":"");
- printf("<option %s>No", (*(BOOL *)ptr)?"":"selected");
+ printf("<option %s>Yes", (*(bool *)ptr)?"selected":"");
+ printf("<option %s>No", (*(bool *)ptr)?"":"selected");
printf("</select>");
printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
- _("Set Default"), make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?0:1);
+ _("Set Default"), make_parm_name(parm->label),(bool)(parm->def.bvalue)?0:1);
break;
case P_BOOLREV:
printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
- printf("<option %s>Yes", (*(BOOL *)ptr)?"":"selected");
- printf("<option %s>No", (*(BOOL *)ptr)?"selected":"");
+ printf("<option %s>Yes", (*(bool *)ptr)?"":"selected");
+ printf("<option %s>No", (*(bool *)ptr)?"selected":"");
printf("</select>");
printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
- _("Set Default"), make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?1:0);
+ _("Set Default"), make_parm_name(parm->label),(bool)(parm->def.bvalue)?1:0);
break;
case P_INTEGER:
case P_BOOL:
case P_BOOLREV:
- if (*(BOOL *)ptr == (BOOL)(parm->def.bvalue)) continue;
+ if (*(bool *)ptr == (bool)(parm->def.bvalue)) continue;
break;
case P_INTEGER:
/****************************************************************************
load the smb.conf file into loadparm.
****************************************************************************/
-static BOOL load_config(BOOL save_def)
+static bool load_config(bool save_def)
{
lp_resetnumservices();
return lp_load(dyn_CONFIGFILE,False,save_def,False,True);
/****************************************************************************
write a config file
****************************************************************************/
-static void write_config(FILE *f, BOOL show_defaults)
+static void write_config(FILE *f, bool show_defaults)
{
fprintf(f, "# Samba config file created using SWAT\n");
fprintf(f, "# from %s (%s)\n", cgi_remote_host(), cgi_remote_addr());
/*************************************************************
change a password either locally or remotely
*************************************************************/
-static BOOL change_password(const char *remote_machine, const char *user_name,
+static bool change_password(const char *remote_machine, const char *user_name,
const char *old_passwd, const char *new_passwd,
int local_flags)
{
static void chg_passwd(void)
{
const char *host;
- BOOL rslt;
+ bool rslt;
int local_flags = 0;
/* Make sure users name has been specified */
struct idmap_alloc_context {
const char *params;
struct idmap_alloc_methods *methods;
- BOOL initialized;
+ bool initialized;
};
static TALLOC_CTX *idmap_ctx = NULL;
return NULL;
}
-BOOL idmap_is_offline(void)
+bool idmap_is_offline(void)
{
return ( lp_winbind_offline_logon() &&
get_global_winbindd_state_offline() );
const char **dom_list = NULL;
const char *default_domain = NULL;
char *alloc_backend = NULL;
- BOOL default_already_defined = False;
- BOOL pri_dom_is_in_list = False;
+ bool default_already_defined = False;
+ bool pri_dom_is_in_list = False;
int compat = 0;
int i;
{
ADS_STRUCT *ads;
ADS_STATUS status;
- BOOL local = False;
+ bool local = False;
fstring dc_name;
struct in_addr dc_ip;
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
-BOOL idmap_cache_is_negative(const char *val)
+bool idmap_cache_is_negative(const char *val)
{
if ( ! strcmp("IDMAP/NEGATIVE", val)) {
return True;
char *suffix;
char *user_dn;
uint32_t filter_low_id, filter_high_id; /* Filter range */
- BOOL anon;
+ bool anon;
};
struct idmap_ldap_alloc_context {
char *secret = NULL;
const char *tmp = NULL;
char *user_dn = NULL;
- BOOL anon = False;
+ bool anon = False;
/* assume anonymous if we don't have a specified user */
const char *gidNumber;
const char **attr_list;
char *filter = NULL;
- BOOL multi = False;
+ bool multi = False;
int idx = 0;
int bidx = 0;
int count;
const char *gidNumber;
const char **attr_list;
char *filter = NULL;
- BOOL multi = False;
+ bool multi = False;
int idx = 0;
int bidx = 0;
int count;
struct group *gr;
const char *name;
enum lsa_SidType type;
- BOOL ret;
+ bool ret;
switch (ids[i]->xid.type) {
case ID_TYPE_UID:
enum lsa_SidType type;
const char *dom_name = NULL;
const char *name = NULL;
- BOOL ret;
+ bool ret;
/* by default calls to winbindd are disabled
the following call will not recurse so this is safe */
fstring keystr;
fstring dom_name;
TDB_DATA key2;
- BOOL *failed = (BOOL *)state;
+ bool *failed = (bool *)state;
DEBUG(10,("Converting %s\n", (const char *)key.dptr));
Convert the idmap database from an older version.
*****************************************************************************/
-static BOOL idmap_tdb_upgrade(const char *idmap_name)
+static bool idmap_tdb_upgrade(const char *idmap_name)
{
int32 vers;
- BOOL bigendianheader;
- BOOL failed = False;
+ bool bigendianheader;
+ bool failed = False;
TDB_CONTEXT *idmap_tdb;
DEBUG(0, ("Upgrading winbindd_idmap.tdb from an old version\n"));
SMB_STRUCT_STAT stbuf;
char *tdbfile = NULL;
int32 version;
- BOOL tdb_is_new = False;
+ bool tdb_is_new = False;
if (idmap_tdb_open_ref_count) { /* the tdb has already been opened */
idmap_tdb_open_ref_count++;
/* NEVER use tdb_close() except for the conversion routines that are guaranteed
* to run only when the database is opened the first time, always use this function. */
-BOOL idmap_tdb_tdb_close(TDB_CONTEXT *tdbctx)
+bool idmap_tdb_tdb_close(TDB_CONTEXT *tdbctx)
{
if (tdbctx != idmap_tdb_common_ctx) {
DEBUG(0, ("ERROR: Invalid tdb context!"));
static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
{
- BOOL ret;
+ bool ret;
const char *hwmkey;
const char *hwmtype;
uint32_t high_hwm;
/********************************************************************
*******************************************************************/
-static BOOL parse_nss_parm( const char *config, char **backend, char **domain )
+static bool parse_nss_parm( const char *config, char **backend, char **domain )
{
char *p;
char *q;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-BOOL opt_nocache = False;
-static BOOL interactive = False;
+bool opt_nocache = False;
+static bool interactive = False;
-extern BOOL override_logfile;
+extern bool override_logfile;
struct event_context *winbind_event_context(void)
{
/* Reload configuration */
-static BOOL reload_services_file(void)
+static bool reload_services_file(void)
{
- BOOL ret;
+ bool ret;
if (lp_loaded()) {
pstring fname;
exit(0);
}
-static BOOL do_sigterm;
+static bool do_sigterm;
static void termination_handler(int signum)
{
sys_select_signal(signum);
}
-static BOOL do_sigusr2;
+static bool do_sigusr2;
static void sigusr2_handler(int signum)
{
sys_select_signal(SIGUSR2);
}
-static BOOL do_sighup;
+static bool do_sighup;
static void sighup_handler(int signum)
{
sys_select_signal(SIGHUP);
}
-static BOOL do_sigchld;
+static bool do_sigchld;
static void sigchld_handler(int signum)
{
*/
void setup_async_read(struct fd_event *event, void *data, size_t length,
- void (*finished)(void *private_data, BOOL success),
+ void (*finished)(void *private_data, bool success),
void *private_data)
{
SMB_ASSERT(event->flags == 0);
}
void setup_async_write(struct fd_event *event, void *data, size_t length,
- void (*finished)(void *private_data, BOOL success),
+ void (*finished)(void *private_data, bool success),
void *private_data)
{
SMB_ASSERT(event->flags == 0);
* to call request_finished which schedules sending the response.
*/
-static void request_len_recv(void *private_data, BOOL success);
-static void request_recv(void *private_data, BOOL success);
-static void request_main_recv(void *private_data, BOOL success);
+static void request_len_recv(void *private_data, bool success);
+static void request_recv(void *private_data, bool success);
+static void request_main_recv(void *private_data, bool success);
static void request_finished(struct winbindd_cli_state *state);
-void request_finished_cont(void *private_data, BOOL success);
-static void response_main_sent(void *private_data, BOOL success);
-static void response_extra_sent(void *private_data, BOOL success);
+void request_finished_cont(void *private_data, bool success);
+static void response_main_sent(void *private_data, bool success);
+static void response_extra_sent(void *private_data, bool success);
-static void response_extra_sent(void *private_data, BOOL success)
+static void response_extra_sent(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
request_len_recv, state);
}
-static void response_main_sent(void *private_data, BOOL success)
+static void response_main_sent(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
request_finished(state);
}
-void request_finished_cont(void *private_data, BOOL success)
+void request_finished_cont(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
request_error(state);
}
-static void request_len_recv(void *private_data, BOOL success)
+static void request_len_recv(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
request_main_recv, state);
}
-static void request_main_recv(void *private_data, BOOL success)
+static void request_main_recv(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
state->request.extra_len, request_recv, state);
}
-static void request_recv(void *private_data, BOOL success)
+static void request_recv(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
/* Process a new connection by adding it to the client connection list */
-static void new_connection(int listen_sock, BOOL privileged)
+static void new_connection(int listen_sock, bool privileged)
{
struct sockaddr_un sunaddr;
struct winbindd_cli_state *state;
/* Shutdown client connection which has been idle for the longest time */
-static BOOL remove_idle_client(void)
+static bool remove_idle_client(void)
{
struct winbindd_cli_state *state, *remove_state = NULL;
time_t last_access = 0;
int main(int argc, char **argv, char **envp)
{
pstring logfile;
- static BOOL is_daemon = False;
- static BOOL Fork = True;
- static BOOL log_stdout = False;
- static BOOL no_process_group = False;
+ static bool is_daemon = False;
+ static bool Fork = True;
+ static bool log_stdout = False;
+ static bool no_process_group = False;
struct poptOption long_options[] = {
POPT_AUTOHELP
{ "stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },
void (*handler)(struct fd_event *fde, int flags);
void *data;
size_t length, done;
- void (*finished)(void *private_data, BOOL success);
+ void (*finished)(void *private_data, bool success);
void *private_data;
};
struct sid_ctr {
DOM_SID *sid;
- BOOL finished;
+ bool finished;
const char *domain;
const char *name;
enum lsa_SidType type;
int sock; /* Open socket from client */
struct fd_event fd_event;
pid_t pid; /* pid of client */
- BOOL finished; /* Can delete from list */
- BOOL write_extra_data; /* Write extra_data field */
+ bool finished; /* Can delete from list */
+ bool write_extra_data; /* Write extra_data field */
time_t last_access; /* Time of last access (read or write) */
- BOOL privileged; /* Is the client 'privileged' */
+ bool privileged; /* Is the client 'privileged' */
TALLOC_CTX *mem_ctx; /* memory per request */
struct winbindd_request request; /* Request from client */
struct winbindd_response response; /* Respose to client */
- BOOL getpwent_initialized; /* Has getpwent_state been
+ bool getpwent_initialized; /* Has getpwent_state been
* initialized? */
- BOOL getgrent_initialized; /* Has getgrent_state been
+ bool getgrent_initialized; /* Has getgrent_state been
* initialized? */
struct getent_state *getpwent_state; /* State for getpwent() */
struct getent_state *getgrent_state; /* State for getgrent() */
struct getent_state *prev, *next;
void *sam_entries;
uint32 sam_entry_index, num_sam_entries;
- BOOL got_sam_entries;
+ bool got_sam_entries;
fstring domain_name;
};
uint32 domain_flags; /* Domain flags from rpc_ds.h */
uint32 domain_type; /* Domain type from rpc_ds.h */
uint32 domain_trust_attribs; /* Trust attribs from rpc_ds.h */
- BOOL initialized; /* Did we already ask for the domain mode? */
- BOOL native_mode; /* is this a win2k domain in native mode ? */
- BOOL active_directory; /* is this a win2k active directory ? */
- BOOL primary; /* is this our primary domain ? */
- BOOL internal; /* BUILTIN and member SAM */
- BOOL online; /* is this domain available ? */
+ bool initialized; /* Did we already ask for the domain mode? */
+ bool native_mode; /* is this a win2k domain in native mode ? */
+ bool active_directory; /* is this a win2k active directory ? */
+ bool primary; /* is this our primary domain ? */
+ bool internal; /* BUILTIN and member SAM */
+ bool online; /* is this domain available ? */
time_t startup_time; /* When we set "startup" true. */
- BOOL startup; /* are we in the first 30 seconds after startup_time ? */
+ bool startup; /* are we in the first 30 seconds after startup_time ? */
/* Lookup methods for this domain (LDAP or RPC) */
struct winbindd_methods *methods;
struct winbindd_methods {
/* does this backend provide a consistent view of the data? (ie. is the primary group
always correct) */
- BOOL consistent;
+ bool consistent;
/* get a list of users, returning a WINBIND_USERINFO for each one */
NTSTATUS (*query_user_list)(struct winbindd_domain *domain,
/* Filled out by IDMAP backends */
struct winbindd_idmap_methods {
/* Called when backend is first loaded */
- BOOL (*init)(void);
+ bool (*init)(void);
- BOOL (*get_sid_from_uid)(uid_t uid, DOM_SID *sid);
- BOOL (*get_sid_from_gid)(gid_t gid, DOM_SID *sid);
+ bool (*get_sid_from_uid)(uid_t uid, DOM_SID *sid);
+ bool (*get_sid_from_gid)(gid_t gid, DOM_SID *sid);
- BOOL (*get_uid_from_sid)(DOM_SID *sid, uid_t *uid);
- BOOL (*get_gid_from_sid)(DOM_SID *sid, gid_t *gid);
+ bool (*get_uid_from_sid)(DOM_SID *sid, uid_t *uid);
+ bool (*get_gid_from_sid)(DOM_SID *sid, gid_t *gid);
/* Called when backend is unloaded */
- BOOL (*close)(void);
+ bool (*close)(void);
/* Called to dump backend status */
void (*status)(void);
};
LDAPMessage *msg = NULL;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
const char *filter;
- BOOL enum_dom_local_groups = False;
+ bool enum_dom_local_groups = False;
*num_entries = 0;
struct winbindd_request request;
struct winbindd_response response;
void (*cont)(TALLOC_CTX *mem_ctx,
- BOOL success,
+ bool success,
struct winbindd_response *response,
void *c, void *private_data);
void *c, *private_data;
};
-static void do_async_recv(void *private_data, BOOL success)
+static void do_async_recv(void *private_data, bool success)
{
struct do_async_state *state =
talloc_get_type_abort(private_data, struct do_async_state);
static void do_async(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
const struct winbindd_request *request,
- void (*cont)(TALLOC_CTX *mem_ctx, BOOL success,
+ void (*cont)(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data),
void *c, void *private_data)
void do_async_domain(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
const struct winbindd_request *request,
- void (*cont)(TALLOC_CTX *mem_ctx, BOOL success,
+ void (*cont)(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data),
void *c, void *private_data)
&state->response, do_async_recv, state);
}
-static void winbindd_set_mapping_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_set_mapping_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ) = (void (*)(void *, BOOL))c;
+ void (*cont)(void *priv, bool succ) = (void (*)(void *, bool))c;
if (!success) {
DEBUG(5, ("Could not trigger idmap_set_mapping\n"));
}
void winbindd_set_mapping_async(TALLOC_CTX *mem_ctx, const struct id_map *map,
- void (*cont)(void *private_data, BOOL success),
+ void (*cont)(void *private_data, bool success),
void *private_data)
{
struct winbindd_request request;
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
-static void winbindd_set_hwm_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_set_hwm_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ) = (void (*)(void *, BOOL))c;
+ void (*cont)(void *priv, bool succ) = (void (*)(void *, bool))c;
if (!success) {
DEBUG(5, ("Could not trigger idmap_set_hwm\n"));
}
void winbindd_set_hwm_async(TALLOC_CTX *mem_ctx, const struct unixid *xid,
- void (*cont)(void *private_data, BOOL success),
+ void (*cont)(void *private_data, bool success),
void *private_data)
{
struct winbindd_request request;
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
-static void winbindd_sids2xids_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_sids2xids_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, void *, int) =
- (void (*)(void *, BOOL, void *, int))c;
+ void (*cont)(void *priv, bool succ, void *, int) =
+ (void (*)(void *, bool, void *, int))c;
if (!success) {
DEBUG(5, ("Could not trigger sids2xids\n"));
}
void winbindd_sids2xids_async(TALLOC_CTX *mem_ctx, void *sids, int size,
- void (*cont)(void *private_data, BOOL success, void *data, int len),
+ void (*cont)(void *private_data, bool success, void *data, int len),
void *private_data)
{
struct winbindd_request request;
return WINBINDD_OK;
}
-static void winbindd_sid2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_sid2uid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, uid_t uid) =
- (void (*)(void *, BOOL, uid_t))c;
+ void (*cont)(void *priv, bool succ, uid_t uid) =
+ (void (*)(void *, bool, uid_t))c;
if (!success) {
DEBUG(5, ("Could not trigger sid2uid\n"));
}
void winbindd_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
- void (*cont)(void *private_data, BOOL success, uid_t uid),
+ void (*cont)(void *private_data, bool success, uid_t uid),
void *private_data)
{
struct winbindd_request request;
}
#if 0 /* not used */
-static void uid2name_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void uid2name_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data);
void winbindd_uid2name_async(TALLOC_CTX *mem_ctx, uid_t uid,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
const char *name),
void *private_data)
{
}
#if 0 /* not used */
-static void uid2name_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void uid2name_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *name) =
- (void (*)(void *, BOOL, const char *))c;
+ void (*cont)(void *priv, bool succ, const char *name) =
+ (void (*)(void *, bool, const char *))c;
if (!success) {
DEBUG(5, ("Could not trigger uid2name\n"));
cont(private_data, True, response->data.name.name);
}
-static void name2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void name2uid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data);
static void winbindd_name2uid_async(TALLOC_CTX *mem_ctx, const char *name,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
uid_t uid),
void *private_data)
{
}
#if 0 /* not used */
-static void name2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void name2uid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, uid_t uid) =
- (void (*)(void *, BOOL, uid_t))c;
+ void (*cont)(void *priv, bool succ, uid_t uid) =
+ (void (*)(void *, bool, uid_t))c;
if (!success) {
DEBUG(5, ("Could not trigger name2uid\n"));
}
#endif /* not used */
-static void winbindd_sid2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_sid2gid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, gid_t gid) =
- (void (*)(void *, BOOL, gid_t))c;
+ void (*cont)(void *priv, bool succ, gid_t gid) =
+ (void (*)(void *, bool, gid_t))c;
if (!success) {
DEBUG(5, ("Could not trigger sid2gid\n"));
}
void winbindd_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
- void (*cont)(void *private_data, BOOL success, gid_t gid),
+ void (*cont)(void *private_data, bool success, gid_t gid),
void *private_data)
{
struct winbindd_request request;
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
-static void gid2name_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void gid2name_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *name) =
- (void (*)(void *, BOOL, const char *))c;
+ void (*cont)(void *priv, bool succ, const char *name) =
+ (void (*)(void *, bool, const char *))c;
if (!success) {
DEBUG(5, ("Could not trigger gid2name\n"));
}
void winbindd_gid2name_async(TALLOC_CTX *mem_ctx, gid_t gid,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
const char *name),
void *private_data)
{
}
#if 0 /* not used */
-static void name2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void name2gid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data);
static void winbindd_name2gid_async(TALLOC_CTX *mem_ctx, const char *name,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
gid_t gid),
void *private_data)
{
}
#if 0 /* not used */
-static void name2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void name2gid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, gid_t gid) =
- (void (*)(void *, BOOL, gid_t))c;
+ void (*cont)(void *priv, bool succ, gid_t gid) =
+ (void (*)(void *, bool, gid_t))c;
if (!success) {
DEBUG(5, ("Could not trigger name2gid\n"));
};
-static void lookupsid_recv2(TALLOC_CTX *mem_ctx, BOOL success,
+static void lookupsid_recv2(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *dom_name,
+ void (*cont)(void *priv, bool succ, const char *dom_name,
const char *name, enum lsa_SidType type) =
- (void (*)(void *, BOOL, const char *, const char *,
+ (void (*)(void *, bool, const char *, const char *,
enum lsa_SidType))c;
struct lookupsid_state *s = talloc_get_type_abort(private_data,
struct lookupsid_state);
(enum lsa_SidType)response->data.name.type);
}
-static void lookupsid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void lookupsid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *dom_name,
+ void (*cont)(void *priv, bool succ, const char *dom_name,
const char *name, enum lsa_SidType type) =
- (void (*)(void *, BOOL, const char *, const char *,
+ (void (*)(void *, bool, const char *, const char *,
enum lsa_SidType))c;
struct lookupsid_state *s = talloc_get_type_abort(private_data,
struct lookupsid_state);
}
void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
const char *dom_name,
const char *name,
enum lsa_SidType type),
};
-static void lookupname_recv2(TALLOC_CTX *mem_ctx, BOOL success,
+static void lookupname_recv2(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const DOM_SID *sid,
+ void (*cont)(void *priv, bool succ, const DOM_SID *sid,
enum lsa_SidType type) =
- (void (*)(void *, BOOL, const DOM_SID *, enum lsa_SidType))c;
+ (void (*)(void *, bool, const DOM_SID *, enum lsa_SidType))c;
DOM_SID sid;
struct lookupname_state *s = talloc_get_type_abort( private_data,
struct lookupname_state );
This is the first callback after contacting our own domain
********************************************************************/
-static void lookupname_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void lookupname_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const DOM_SID *sid,
+ void (*cont)(void *priv, bool succ, const DOM_SID *sid,
enum lsa_SidType type) =
- (void (*)(void *, BOOL, const DOM_SID *, enum lsa_SidType))c;
+ (void (*)(void *, bool, const DOM_SID *, enum lsa_SidType))c;
DOM_SID sid;
struct lookupname_state *s = talloc_get_type_abort( private_data,
struct lookupname_state );
void winbindd_lookupname_async(TALLOC_CTX *mem_ctx,
const char *dom_name, const char *name,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
const DOM_SID *sid,
enum lsa_SidType type),
enum winbindd_cmd orig_cmd,
return WINBINDD_OK;
}
-BOOL print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
+bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
size_t num_sids, char **result, ssize_t *len)
{
size_t i;
return True;
}
-static BOOL parse_sidlist(TALLOC_CTX *mem_ctx, char *sidstr,
+static bool parse_sidlist(TALLOC_CTX *mem_ctx, char *sidstr,
DOM_SID **sids, size_t *num_sids)
{
char *p, *q;
return True;
}
-static BOOL parse_ridlist(TALLOC_CTX *mem_ctx, char *ridstr,
+static bool parse_ridlist(TALLOC_CTX *mem_ctx, char *ridstr,
uint32 **rids, size_t *num_rids)
{
char *p;
return WINBINDD_OK;
}
-static void getsidaliases_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void getsidaliases_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ,
+ void (*cont)(void *priv, bool succ,
DOM_SID *aliases, size_t num_aliases) =
- (void (*)(void *, BOOL, DOM_SID *, size_t))c;
+ (void (*)(void *, bool, DOM_SID *, size_t))c;
char *aliases_str;
DOM_SID *sids = NULL;
size_t num_sids = 0;
TALLOC_CTX *mem_ctx,
const DOM_SID *sids, size_t num_sids,
void (*cont)(void *private_data,
- BOOL success,
+ bool success,
const DOM_SID *aliases,
size_t num_aliases),
void *private_data)
struct winbindd_domain *builtin_domain;
DOM_SID *sids;
size_t num_sids;
- void (*cont)(void *private_data, BOOL success, DOM_SID *sids, size_t num_sids);
+ void (*cont)(void *private_data, bool success, DOM_SID *sids, size_t num_sids);
void *private_data;
};
-static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
+static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data);
-static void gettoken_recvaliases(void *private_data, BOOL success,
+static void gettoken_recvaliases(void *private_data, bool success,
const DOM_SID *aliases,
size_t num_aliases);
void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
DOM_SID *sids, size_t num_sids),
void *private_data)
{
NULL, state);
}
-static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
+static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
gettoken_recvaliases, state);
}
-static void gettoken_recvaliases(void *private_data, BOOL success,
+static void gettoken_recvaliases(void *private_data, bool success,
const DOM_SID *aliases,
size_t num_aliases)
{
state->cont(state->private_data, True, state->sids, state->num_sids);
}
-static void query_user_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void query_user_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *acct_name,
+ void (*cont)(void *priv, bool succ, const char *acct_name,
const char *full_name, const char *homedir,
const char *shell, uint32 gid, uint32 group_rid) =
- (void (*)(void *, BOOL, const char *, const char *,
+ (void (*)(void *, bool, const char *, const char *,
const char *, const char *, uint32, uint32))c;
if (!success) {
void query_user_async(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
const DOM_SID *sid,
- void (*cont)(void *private_data, BOOL success,
+ void (*cont)(void *private_data, bool success,
const char *acct_name,
const char *full_name,
const char *homedir,
/* The following uid2sid/gid2sid functions has been contributed by
* Keith Reynolds <Keith.Reynolds@centrify.com> */
-static void winbindd_uid2sid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_uid2sid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *sid) =
- (void (*)(void *, BOOL, const char *))c;
+ void (*cont)(void *priv, bool succ, const char *sid) =
+ (void (*)(void *, bool, const char *))c;
if (!success) {
DEBUG(5, ("Could not trigger uid2sid\n"));
}
void winbindd_uid2sid_async(TALLOC_CTX *mem_ctx, uid_t uid,
- void (*cont)(void *private_data, BOOL success, const char *sid),
+ void (*cont)(void *private_data, bool success, const char *sid),
void *private_data)
{
struct winbindd_request request;
return WINBINDD_ERROR;
}
-static void winbindd_gid2sid_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_gid2sid_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ, const char *sid) =
- (void (*)(void *, BOOL, const char *))c;
+ void (*cont)(void *priv, bool succ, const char *sid) =
+ (void (*)(void *, bool, const char *))c;
if (!success) {
DEBUG(5, ("Could not trigger gid2sid\n"));
}
void winbindd_gid2sid_async(TALLOC_CTX *mem_ctx, gid_t gid,
- void (*cont)(void *private_data, BOOL success, const char *sid),
+ void (*cont)(void *private_data, bool success, const char *sid),
void *private_data)
{
struct winbindd_request request;
return WINBINDD_ERROR;
}
-static void winbindd_dump_id_maps_recv(TALLOC_CTX *mem_ctx, BOOL success,
+static void winbindd_dump_id_maps_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
{
- void (*cont)(void *priv, BOOL succ) =
- (void (*)(void *, BOOL))c;
+ void (*cont)(void *priv, bool succ) =
+ (void (*)(void *, bool))c;
if (!success) {
DEBUG(5, ("Could not trigger a map dump\n"));
}
void winbindd_dump_maps_async(TALLOC_CTX *mem_ctx, void *data, int size,
- void (*cont)(void *private_data, BOOL success),
+ void (*cont)(void *private_data, bool success),
void *private_data)
{
struct winbindd_request request;
#define WINBINDD_CACHE_VERSION_KEYSTR "WINBINDD_CACHE_VERSION"
extern struct winbindd_methods reconnect_methods;
-extern BOOL opt_nocache;
+extern bool opt_nocache;
#ifdef HAVE_ADS
extern struct winbindd_methods ads_methods;
#endif
Is this key a non-centry type ?
************************************************************************/
-static BOOL is_non_centry_key(TDB_DATA kbuf)
+static bool is_non_centry_key(TDB_DATA kbuf)
{
int i;
and sets this to true if the first query fails and there's an entry in
the cache tdb telling us to stay offline. */
-static BOOL global_winbindd_offline_state;
+static bool global_winbindd_offline_state;
struct winbind_cache {
TDB_CONTEXT *tdb;
free(centry);
}
-static BOOL centry_check_bytes(struct cache_entry *centry, size_t nbytes)
+static bool centry_check_bytes(struct cache_entry *centry, size_t nbytes)
{
if (centry->len - centry->ofs < nbytes) {
DEBUG(0,("centry corruption? needed %u bytes, have %d\n",
/* pull a sid from a cache entry, using the supplied
talloc context
*/
-static BOOL centry_sid(struct cache_entry *centry, TALLOC_CTX *mem_ctx, DOM_SID *sid)
+static bool centry_sid(struct cache_entry *centry, TALLOC_CTX *mem_ctx, DOM_SID *sid)
{
char *sid_string;
sid_string = centry_string(centry, mem_ctx);
/* the server is considered down if it can't give us a sequence number */
-static BOOL wcache_server_down(struct winbindd_domain *domain)
+static bool wcache_server_down(struct winbindd_domain *domain)
{
- BOOL ret;
+ bool ret;
if (!wcache->tdb)
return False;
then always refresh it, no matter how recently we fetched it
*/
-static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
+static void refresh_sequence_number(struct winbindd_domain *domain, bool force)
{
NTSTATUS status;
unsigned time_diff;
/*
decide if a cache entry has expired
*/
-static BOOL centry_expired(struct winbindd_domain *domain, const char *keystr, struct cache_entry *centry)
+static bool centry_expired(struct winbindd_domain *domain, const char *keystr, struct cache_entry *centry)
{
/* If we've been told to be offline - stay in that state... */
if (lp_winbind_offline_logon() && global_winbindd_offline_state) {
struct winbind_cache *cache = get_cache(domain);
size_t i;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- BOOL have_mapped;
- BOOL have_unmapped;
+ bool have_mapped;
+ bool have_unmapped;
*domain_name = NULL;
*names = NULL;
}
}
-BOOL init_wcache(void)
+bool init_wcache(void)
{
if (wcache == NULL) {
wcache = SMB_XMALLOC_P(struct winbind_cache);
only opener.
************************************************************************/
-BOOL initialize_winbindd_cache(void)
+bool initialize_winbindd_cache(void)
{
- BOOL cache_bad = True;
+ bool cache_bad = True;
uint32 vers;
if (!init_wcache()) {
return;
}
-BOOL cache_retrieve_response(pid_t pid, struct winbindd_response * response)
+bool cache_retrieve_response(pid_t pid, struct winbindd_response * response)
{
TDB_DATA data;
fstring key_str;
}
-BOOL lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
char **domain_name, char **name,
enum lsa_SidType *type)
{
return NT_STATUS_IS_OK(status);
}
-BOOL lookup_cached_name(TALLOC_CTX *mem_ctx,
+bool lookup_cached_name(TALLOC_CTX *mem_ctx,
const char *domain_name,
const char *name,
DOM_SID *sid,
struct cache_entry *centry = NULL;
NTSTATUS status;
fstring uname;
- BOOL original_online_state;
+ bool original_online_state;
domain = find_lookup_domain_from_name(domain_name);
if (domain == NULL) {
}
/* Change the global online/offline state. */
-BOOL set_global_winbindd_state_offline(void)
+bool set_global_winbindd_state_offline(void)
{
TDB_DATA data;
tdb_delete_bystring(wcache->tdb, "WINBINDD_OFFLINE");
}
-BOOL get_global_winbindd_state_offline(void)
+bool get_global_winbindd_state_offline(void)
{
return global_winbindd_offline_state;
}
/*********************************************************************
********************************************************************/
-static BOOL add_wbdomain_to_tdc_array( struct winbindd_domain *new_dom,
+static bool add_wbdomain_to_tdc_array( struct winbindd_domain *new_dom,
struct winbindd_tdc_domain **domains,
size_t *num_domains )
{
struct winbindd_tdc_domain *list = NULL;
size_t idx;
int i;
- BOOL set_only = False;
+ bool set_only = False;
/* don't allow duplicates */
/*********************************************************************
********************************************************************/
-static BOOL wcache_tdc_store_list( struct winbindd_tdc_domain *domains, size_t num_domains )
+static bool wcache_tdc_store_list( struct winbindd_tdc_domain *domains, size_t num_domains )
{
TDB_DATA key = make_tdc_key( lp_workgroup() );
TDB_DATA data = { NULL, 0 };
/*********************************************************************
********************************************************************/
-BOOL wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains )
+bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains )
{
TDB_DATA key = make_tdc_key( lp_workgroup() );
TDB_DATA data = { NULL, 0 };
/*********************************************************************
********************************************************************/
-BOOL wcache_tdc_add_domain( struct winbindd_domain *domain )
+bool wcache_tdc_add_domain( struct winbindd_domain *domain )
{
struct winbindd_tdc_domain *dom_list = NULL;
size_t num_domains = 0;
- BOOL ret = False;
+ bool ret = False;
DEBUG(10,("wcache_tdc_add_domain: Adding domain %s (%s), SID %s, "
"flags = 0x%x, attributes = 0x%x, type = 0x%x\n",
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-static BOOL client_can_access_ccache_entry(uid_t client_uid,
+static bool client_can_access_ccache_entry(uid_t client_uid,
struct WINBINDD_MEMORY_CREDS *entry)
{
if (client_uid == entry->uid || client_uid == 0) {
return status;
}
-static BOOL check_client_uid(struct winbindd_cli_state *state, uid_t uid)
+static bool check_client_uid(struct winbindd_cli_state *state, uid_t uid)
{
int ret;
uid_t ret_uid;
};
extern struct winbindd_methods reconnect_methods;
-extern BOOL override_logfile;
+extern bool override_logfile;
static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain);
static void set_dc_type_and_flags( struct winbindd_domain *domain );
-static BOOL get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
+static bool get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
struct dc_name_ip **dcs, int *num_dcs);
/****************************************************************
parent.
****************************************************************/
-static BOOL fork_child_dc_connect(struct winbindd_domain *domain)
+static bool fork_child_dc_connect(struct winbindd_domain *domain)
{
struct dc_name_ip *dcs = NULL;
int num_dcs = 0;
}
}
-static BOOL get_dc_name_via_netlogon(const struct winbindd_domain *domain,
+static bool get_dc_name_via_netlogon(const struct winbindd_domain *domain,
fstring dcname, struct in_addr *dc_ip)
{
struct winbindd_domain *our_domain = NULL;
const int sockfd,
const char *controller,
struct cli_state **cli,
- BOOL *retry)
+ bool *retry)
{
char *machine_password, *machine_krb5_principal, *machine_account;
char *ipc_username, *ipc_domain, *ipc_password;
- BOOL got_mutex;
+ bool got_mutex;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
return result;
}
-static BOOL add_one_dc_unique(TALLOC_CTX *mem_ctx, const char *domain_name,
+static bool add_one_dc_unique(TALLOC_CTX *mem_ctx, const char *domain_name,
const char *dcname, struct in_addr ip,
struct dc_name_ip **dcs, int *num)
{
return True;
}
-static BOOL add_sockaddr_to_array(TALLOC_CTX *mem_ctx,
+static bool add_sockaddr_to_array(TALLOC_CTX *mem_ctx,
struct in_addr ip, uint16 port,
struct sockaddr_in **addrs, int *num)
{
fstr_sprintf(name, "\\MAILSLOT\\NET\\GETDC%X", dc_ip.s_addr);
}
-static BOOL send_getdc_request(struct in_addr dc_ip,
+static bool send_getdc_request(struct in_addr dc_ip,
const char *domain_name,
const DOM_SID *sid)
{
dc_ip);
}
-static BOOL receive_getdc_response(struct in_addr dc_ip,
+static bool receive_getdc_response(struct in_addr dc_ip,
const char *domain_name,
fstring dc_name)
{
convert an ip to a name
*******************************************************************/
-static BOOL dcip_to_name(const struct winbindd_domain *domain, struct in_addr ip, fstring name )
+static bool dcip_to_name(const struct winbindd_domain *domain, struct in_addr ip, fstring name )
{
struct ip_service ip_list;
the dcs[] with results.
*******************************************************************/
-static BOOL get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
+static bool get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
struct dc_name_ip **dcs, int *num_dcs)
{
fstring dcname;
struct ip_service *ip_list = NULL;
int iplist_size = 0;
int i;
- BOOL is_our_domain;
+ bool is_our_domain;
enum security_types sec = (enum security_types)lp_security();
is_our_domain = strequal(domain->name, lp_workgroup());
return True;
}
-static BOOL find_new_dc(TALLOC_CTX *mem_ctx,
+static bool find_new_dc(TALLOC_CTX *mem_ctx,
const struct winbindd_domain *domain,
fstring dcname, struct sockaddr_in *addr, int *fd)
{
for (retries = 0; retries < 3; retries++) {
int fd = -1;
- BOOL retry = False;
+ bool retry = False;
result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
}
}
-static BOOL connection_ok(struct winbindd_domain *domain)
+static bool connection_ok(struct winbindd_domain *domain)
{
if (domain->conn.cli == NULL) {
DEBUG(8, ("connection_ok: Connection to %s for domain %s has NULL "
Set the trust flags (direction and forest location) for a domain
******************************************************************************/
-static BOOL set_dc_type_and_flags_trustinfo( struct winbindd_domain *domain )
+static bool set_dc_type_and_flags_trustinfo( struct winbindd_domain *domain )
{
struct winbindd_domain *our_domain;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
/**********************************************************************
***********************************************************************/
-static BOOL cm_get_schannel_dcinfo(struct winbindd_domain *domain,
+static bool cm_get_schannel_dcinfo(struct winbindd_domain *domain,
struct dcinfo **ppdc)
{
NTSTATUS result;
Check if an ccache entry exists.
****************************************************************/
-BOOL ccache_entry_exists(const char *username)
+bool ccache_entry_exists(const char *username)
{
struct WINBINDD_CCACHE_ENTRY *entry = get_ccache_by_username(username);
return (entry != NULL);
Ensure we're changing the correct entry.
****************************************************************/
-BOOL ccache_entry_identical(const char *username,
+bool ccache_entry_identical(const char *username,
uid_t uid,
const char *ccname)
{
time_t create_time,
time_t ticket_end,
time_t renew_until,
- BOOL postponed_request)
+ bool postponed_request)
{
struct WINBINDD_CCACHE_ENTRY *entry = NULL;
struct timeval t;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-extern BOOL override_logfile;
+extern bool override_logfile;
/* Read some data from a client connection */
struct winbindd_child *child;
struct winbindd_request *request;
struct winbindd_response *response;
- void (*continuation)(void *private_data, BOOL success);
+ void (*continuation)(void *private_data, bool success);
struct timed_event *reply_timeout_event;
pid_t child_pid; /* pid of the child we're waiting on. Used to detect
a restart of the child (child->pid != child_pid). */
void *private_data;
};
-static void async_main_request_sent(void *private_data, BOOL success);
-static void async_request_sent(void *private_data, BOOL success);
-static void async_reply_recv(void *private_data, BOOL success);
+static void async_main_request_sent(void *private_data, bool success);
+static void async_request_sent(void *private_data, bool success);
+static void async_reply_recv(void *private_data, bool success);
static void schedule_async_request(struct winbindd_child *child);
void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
struct winbindd_request *request,
struct winbindd_response *response,
- void (*continuation)(void *private_data, BOOL success),
+ void (*continuation)(void *private_data, bool success),
void *private_data)
{
struct winbindd_async_request *state;
return;
}
-static void async_main_request_sent(void *private_data, BOOL success)
+static void async_main_request_sent(void *private_data, bool success)
{
struct winbindd_async_request *state =
talloc_get_type_abort(private_data, struct winbindd_async_request);
state->continuation(state->private_data, False);
}
-static void async_request_sent(void *private_data_data, BOOL success)
+static void async_request_sent(void *private_data_data, bool success)
{
struct winbindd_async_request *state =
talloc_get_type_abort(private_data_data, struct winbindd_async_request);
}
}
-static void async_reply_recv(void *private_data, BOOL success)
+static void async_reply_recv(void *private_data, bool success)
{
struct winbindd_async_request *state =
talloc_get_type_abort(private_data, struct winbindd_async_request);
state->continuation(state->private_data, True);
}
-static BOOL fork_domain_child(struct winbindd_child *child);
+static bool fork_domain_child(struct winbindd_child *child);
static void schedule_async_request(struct winbindd_child *child)
{
struct winbindd_domain *domain;
struct winbindd_request *request;
struct winbindd_response *response;
- void (*continuation)(void *private_data_data, BOOL success);
+ void (*continuation)(void *private_data_data, bool success);
void *private_data_data;
};
-static void domain_init_recv(void *private_data_data, BOOL success);
+static void domain_init_recv(void *private_data_data, bool success);
void async_domain_request(TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain,
struct winbindd_request *request,
struct winbindd_response *response,
- void (*continuation)(void *private_data_data, BOOL success),
+ void (*continuation)(void *private_data_data, bool success),
void *private_data_data)
{
struct domain_request_state *state;
init_child_connection(domain, domain_init_recv, state);
}
-static void domain_init_recv(void *private_data_data, BOOL success)
+static void domain_init_recv(void *private_data_data, bool success)
{
struct domain_request_state *state =
talloc_get_type_abort(private_data_data, struct domain_request_state);
state->continuation, state->private_data_data);
}
-static void recvfrom_child(void *private_data_data, BOOL success)
+static void recvfrom_child(void *private_data_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data_data, struct winbindd_cli_state);
}
-static BOOL fork_domain_child(struct winbindd_child *child)
+static bool fork_domain_child(struct winbindd_child *child)
{
int fdpair[2];
struct winbindd_cli_state state;
#include "includes.h"
#include "winbindd.h"
-extern BOOL opt_nocache;
+extern bool opt_nocache;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
return;
}
-static BOOL fill_passdb_alias_grmem(struct winbindd_domain *domain,
+static bool fill_passdb_alias_grmem(struct winbindd_domain *domain,
DOM_SID *group_sid,
size_t *num_gr_mem, char **gr_mem, size_t *gr_mem_len)
{
/* Fill a grent structure from various other information */
-static BOOL fill_grent(struct winbindd_gr *gr, const char *dom_name,
+static bool fill_grent(struct winbindd_gr *gr, const char *dom_name,
const char *gr_name, gid_t unix_gid)
{
fstring full_group_name;
if neccessaey, or parameterize the group list we do this for.
***********************************************************************/
-static BOOL fill_grent_mem_domusers( TALLOC_CTX *mem_ctx,
+static bool fill_grent_mem_domusers( TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain,
struct winbindd_cli_state *state,
DOM_SID *group_sid,
DOM_SID *pquerying_user_sid = NULL;
uint32 num_groups = 0;
DOM_SID *user_sids = NULL;
- BOOL u_in_group = False;
+ bool u_in_group = False;
NTSTATUS status;
int i;
unsigned int buf_len = 0;
if ( name_types[j] == SID_NAME_DOM_GRP ||
name_types[j] == SID_NAME_ALIAS )
{
- BOOL ret;
+ bool ret;
ret = add_sid_to_array_unique( ctx,
&sid_mem[j],
Fill in the group membership field of a NT group given by group_sid
***********************************************************************/
-static BOOL fill_grent_mem(struct winbindd_domain *domain,
+static bool fill_grent_mem(struct winbindd_domain *domain,
struct winbindd_cli_state *state,
DOM_SID *group_sid,
enum lsa_SidType group_name_type,
uint32 num_names = 0;
unsigned int buf_len = 0, buf_ndx = 0, i;
char **names = NULL, *buf = NULL;
- BOOL result = False;
+ bool result = False;
TALLOC_CTX *mem_ctx;
uint32 group_rid;
DOM_SID *glist = NULL;
static void winbindd_getgrsid( struct winbindd_cli_state *state, DOM_SID group_sid );
-static void getgrnam_recv( void *private_data, BOOL success, const DOM_SID *sid,
+static void getgrnam_recv( void *private_data, bool success, const DOM_SID *sid,
enum lsa_SidType type )
{
struct winbindd_cli_state *state = (struct winbindd_cli_state*)private_data;
DOM_SID group_sid;
};
-static void getgrsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid)
+static void getgrsid_sid2gid_recv(void *private_data, bool success, gid_t gid)
{
struct getgrsid_state *s =
(struct getgrsid_state *)private_data;
request_ok(s->state);
}
-static void getgrsid_lookupsid_recv( void *private_data, BOOL success,
+static void getgrsid_lookupsid_recv( void *private_data, bool success,
const char *dom_name, const char *name,
enum lsa_SidType name_type )
{
}
-static void getgrgid_recv(void *private_data, BOOL success, const char *sid)
+static void getgrgid_recv(void *private_data, bool success, const char *sid)
{
struct winbindd_cli_state *state = talloc_get_type_abort(private_data, struct winbindd_cli_state);
enum lsa_SidType name_type;
/* "Rewind" file pointer for group database enumeration */
-static BOOL winbindd_setgrent_internal(struct winbindd_cli_state *state)
+static bool winbindd_setgrent_internal(struct winbindd_cli_state *state)
{
struct winbindd_domain *domain;
The dispinfo_ndx field is incremented to the index of the next group to
fetch. Return True if some groups were returned, False otherwise. */
-static BOOL get_sam_group_entries(struct getent_state *ent)
+static bool get_sam_group_entries(struct getent_state *ent)
{
NTSTATUS status;
uint32 num_entries;
struct acct_info *name_list = NULL;
TALLOC_CTX *mem_ctx;
- BOOL result = False;
+ bool result = False;
struct acct_info *sam_grp_entries = NULL;
struct winbindd_domain *domain;
size_t num_token_gids;
};
-static void getgroups_usersid_recv(void *private_data, BOOL success,
+static void getgroups_usersid_recv(void *private_data, bool success,
const DOM_SID *sid, enum lsa_SidType type);
-static void getgroups_tokensids_recv(void *private_data, BOOL success,
+static void getgroups_tokensids_recv(void *private_data, bool success,
DOM_SID *token_sids, size_t num_token_sids);
-static void getgroups_sid2gid_recv(void *private_data, BOOL success, gid_t gid);
+static void getgroups_sid2gid_recv(void *private_data, bool success, gid_t gid);
void winbindd_getgroups(struct winbindd_cli_state *state)
{
getgroups_usersid_recv, WINBINDD_GETGROUPS, s);
}
-static void getgroups_usersid_recv(void *private_data, BOOL success,
+static void getgroups_usersid_recv(void *private_data, bool success,
const DOM_SID *sid, enum lsa_SidType type)
{
struct getgroups_state *s =
getgroups_tokensids_recv, s);
}
-static void getgroups_tokensids_recv(void *private_data, BOOL success,
+static void getgroups_tokensids_recv(void *private_data, bool success,
DOM_SID *token_sids, size_t num_token_sids)
{
struct getgroups_state *s =
getgroups_sid2gid_recv(s, False, 0);
}
-static void getgroups_sid2gid_recv(void *private_data, BOOL success, gid_t gid)
+static void getgroups_sid2gid_recv(void *private_data, bool success, gid_t gid)
{
struct getgroups_state *s =
(struct getgroups_state *)private_data;
results.
*/
-static void getusersids_recv(void *private_data, BOOL success, DOM_SID *sids,
+static void getusersids_recv(void *private_data, bool success, DOM_SID *sids,
size_t num_sids);
void winbindd_getusersids(struct winbindd_cli_state *state)
state);
}
-static void getusersids_recv(void *private_data, BOOL success, DOM_SID *sids,
+static void getusersids_recv(void *private_data, bool success, DOM_SID *sids,
size_t num_sids)
{
struct winbindd_cli_state *state =
int extra_data_len = 0;
char *extra_data;
NTSTATUS result;
- BOOL have_own_domain = False;
+ bool have_own_domain = False;
DEBUG(3, ("[%5lu]: list trusted domains\n",
(unsigned long)state->pid));
char *extra_data;
};
-static void sequence_recv(void *private_data, BOOL success);
+static void sequence_recv(void *private_data, bool success);
void winbindd_show_sequence(struct winbindd_cli_state *state)
{
sequence_recv, seq);
}
-static void sequence_recv(void *private_data, BOOL success)
+static void sequence_recv(void *private_data, bool success)
{
struct sequence_state *state =
(struct sequence_state *)private_data;
struct winbindd_cli_state *cli_state;
};
-static void domain_info_init_recv(void *private_data, BOOL success);
+static void domain_info_init_recv(void *private_data, bool success);
void winbindd_domain_info(struct winbindd_cli_state *state)
{
request_ok(state);
}
-static void domain_info_init_recv(void *private_data, BOOL success)
+static void domain_info_init_recv(void *private_data, bool success)
{
struct domain_info_state *istate =
(struct domain_info_state *)private_data;
static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx,
const char *type,
uid_t uid,
- BOOL *internal_ccache)
+ bool *internal_ccache)
{
/* accept FILE and WRFILE as krb5_cc_type from the client and then
* build the full ccname string based on the user's uid here -
uid_t uid = -1;
ADS_STRUCT *ads;
time_t time_offset = 0;
- BOOL internal_ccache = True;
+ bool internal_ccache = True;
ZERO_STRUCTP(info3);
/****************************************************************
****************************************************************/
-static BOOL check_request_flags(uint32_t flags)
+static bool check_request_flags(uint32_t flags)
{
uint32_t flags_edata = WBFLAG_PAM_AFS_TOKEN |
WBFLAG_PAM_UNIX_NAME |
const uint8 *cached_salt;
NET_USER_INFO_3 *my_info3;
time_t kickoff_time, must_change_time;
- BOOL password_good = False;
+ bool password_good = False;
#ifdef HAVE_KRB5
struct winbindd_tdc_domain *tdc_domain = NULL;
#endif
char *realm = NULL;
const char *principal_s = NULL;
const char *service = NULL;
- BOOL internal_ccache = False;
+ bool internal_ccache = False;
uid = get_uid_from_state(state);
if (uid == -1) {
unsigned char local_nt_response[24];
struct winbindd_domain *contact_domain;
fstring name_domain, name_user;
- BOOL retry;
+ bool retry;
NTSTATUS result;
NET_USER_INFO_3 *my_info3;
const char *workstation;
struct winbindd_domain *contact_domain;
int attempts = 0;
- BOOL retry;
+ bool retry;
DATA_BLOB lm_resp, nt_resp;
char *newpass = NULL;
POLICY_HND dom_pol;
struct rpc_pipe_client *cli;
- BOOL got_info = False;
+ bool got_info = False;
SAM_UNK_INFO_1 info;
SAMR_CHANGE_REJECT reject;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
/* find the sequence number for a domain */
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
{
- BOOL result;
+ bool result;
time_t seq_num;
result = pdb_get_seq_num(&seq_num);
SAM_UNK_CTR ctr;
NTSTATUS result;
POLICY_HND dom_pol;
- BOOL got_seq_num = False;
+ bool got_seq_num = False;
struct rpc_pipe_client *cli;
DEBUG(10,("rpc: fetch sequence_number for %s\n", domain->name));
/* Convert a string */
-static void lookupsid_recv(void *private_data, BOOL success,
+static void lookupsid_recv(void *private_data, bool success,
const char *dom_name, const char *name,
enum lsa_SidType type);
winbindd_lookupsid_async(state->mem_ctx, &sid, lookupsid_recv, state);
}
-static void lookupsid_recv(void *private_data, BOOL success,
+static void lookupsid_recv(void *private_data, bool success,
const char *dom_name, const char *name,
enum lsa_SidType type)
{
* Look up the SID for a qualified name.
**/
-static void lookupname_recv(void *private_data, BOOL success,
+static void lookupname_recv(void *private_data, bool success,
const DOM_SID *sid, enum lsa_SidType type);
void winbindd_lookupname(struct winbindd_cli_state *state)
state);
}
-static void lookupname_recv(void *private_data, BOOL success,
+static void lookupname_recv(void *private_data, bool success,
const DOM_SID *sid, enum lsa_SidType type)
{
struct winbindd_cli_state *state =
/* Convert a sid to a uid. We assume we only have one rid attached to the
sid. */
-static void sid2uid_recv(void *private_data, BOOL success, uid_t uid)
+static void sid2uid_recv(void *private_data, bool success, uid_t uid)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
request_ok(state);
}
-static void sid2uid_lookupsid_recv( void *private_data, BOOL success,
+static void sid2uid_lookupsid_recv( void *private_data, bool success,
const char *domain_name,
const char *name,
enum lsa_SidType type)
/* Convert a sid to a gid. We assume we only have one rid attached to the
sid.*/
-static void sid2gid_recv(void *private_data, BOOL success, gid_t gid)
+static void sid2gid_recv(void *private_data, bool success, gid_t gid)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
request_ok(state);
}
-static void sid2gid_lookupsid_recv( void *private_data, BOOL success,
+static void sid2gid_lookupsid_recv( void *private_data, bool success,
const char *domain_name,
const char *name,
enum lsa_SidType type)
winbindd_lookupsid_async( state->mem_ctx, &sid, sid2gid_lookupsid_recv, state );
}
-static void sids2xids_recv(void *private_data, BOOL success, void *data, int len)
+static void sids2xids_recv(void *private_data, bool success, void *data, int len)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
sids2xids_recv, state);
}
-static void set_mapping_recv(void *private_data, BOOL success)
+static void set_mapping_recv(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
set_mapping_recv, state);
}
-static void set_hwm_recv(void *private_data, BOOL success)
+static void set_hwm_recv(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
/* Convert a uid to a sid */
-static void uid2sid_recv(void *private_data, BOOL success, const char *sid)
+static void uid2sid_recv(void *private_data, bool success, const char *sid)
{
struct winbindd_cli_state *state =
(struct winbindd_cli_state *)private_data;
/* Convert a gid to a sid */
-static void gid2sid_recv(void *private_data, BOOL success, const char *sid)
+static void gid2sid_recv(void *private_data, bool success, const char *sid)
{
struct winbindd_cli_state *state =
(struct winbindd_cli_state *)private_data;
return WINBINDD_OK;
}
-static void dump_maps_recv(void *private_data, BOOL success)
+static void dump_maps_recv(void *private_data, bool success)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-static BOOL fillup_pw_field(const char *lp_template,
+static bool fillup_pw_field(const char *lp_template,
const char *username,
const char *domname,
uid_t uid,
}
/* Fill a pwent structure with information we have obtained */
-static BOOL winbindd_fill_pwent(char *dom_name, char *user_name,
+static bool winbindd_fill_pwent(char *dom_name, char *user_name,
DOM_SID *user_sid, DOM_SID *group_sid,
char *full_name, char *homedir, char *shell,
struct winbindd_pw *pw)
gid_t gid;
};
-static void getpwsid_queryuser_recv(void *private_data, BOOL success,
+static void getpwsid_queryuser_recv(void *private_data, bool success,
const char *acct_name,
const char *full_name,
const char *homedir,
const char *shell,
uint32 gid,
uint32 group_rid);
-static void getpwsid_sid2uid_recv(void *private_data, BOOL success, uid_t uid);
-static void getpwsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid);
+static void getpwsid_sid2uid_recv(void *private_data, bool success, uid_t uid);
+static void getpwsid_sid2gid_recv(void *private_data, bool success, gid_t gid);
static void winbindd_getpwsid(struct winbindd_cli_state *state,
const DOM_SID *sid)
request_error(state);
}
-static void getpwsid_queryuser_recv(void *private_data, BOOL success,
+static void getpwsid_queryuser_recv(void *private_data, bool success,
const char *acct_name,
const char *full_name,
const char *homedir,
getpwsid_sid2uid_recv, s);
}
-static void getpwsid_sid2uid_recv(void *private_data, BOOL success, uid_t uid)
+static void getpwsid_sid2uid_recv(void *private_data, bool success, uid_t uid)
{
struct getpwsid_state *s =
talloc_get_type_abort(private_data, struct getpwsid_state);
getpwsid_sid2gid_recv, s);
}
-static void getpwsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid)
+static void getpwsid_sid2gid_recv(void *private_data, bool success, gid_t gid)
{
struct getpwsid_state *s =
talloc_get_type_abort(private_data, struct getpwsid_state);
/* Return a password structure from a username. */
-static void getpwnam_name2sid_recv(void *private_data, BOOL success,
+static void getpwnam_name2sid_recv(void *private_data, bool success,
const DOM_SID *sid, enum lsa_SidType type);
void winbindd_getpwnam(struct winbindd_cli_state *state)
state);
}
-static void getpwnam_name2sid_recv(void *private_data, BOOL success,
+static void getpwnam_name2sid_recv(void *private_data, bool success,
const DOM_SID *sid, enum lsa_SidType type)
{
struct winbindd_cli_state *state =
winbindd_getpwsid(state, sid);
}
-static void getpwuid_recv(void *private_data, BOOL success, const char *sid)
+static void getpwuid_recv(void *private_data, bool success, const char *sid)
{
struct winbindd_cli_state *state =
(struct winbindd_cli_state *)private_data;
/* Rewind file pointer for ntdom passwd database */
-static BOOL winbindd_setpwent_internal(struct winbindd_cli_state *state)
+static bool winbindd_setpwent_internal(struct winbindd_cli_state *state)
{
struct winbindd_domain *domain;
field is incremented to the index of the next user to fetch. Return True if
some users were returned, False otherwise. */
-static BOOL get_sam_user_entries(struct getent_state *ent, TALLOC_CTX *mem_ctx)
+static bool get_sam_user_entries(struct getent_state *ent, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
uint32 num_entries;
}
}
-static BOOL is_internal_domain(const DOM_SID *sid)
+static bool is_internal_domain(const DOM_SID *sid)
{
if (sid == NULL)
return False;
return (sid_check_is_domain(sid) || sid_check_is_builtin(sid));
}
-static BOOL is_in_internal_domain(const DOM_SID *sid)
+static bool is_in_internal_domain(const DOM_SID *sid)
{
if (sid == NULL)
return False;
struct trustdom_state {
TALLOC_CTX *mem_ctx;
- BOOL primary;
- BOOL forest_root;
+ bool primary;
+ bool forest_root;
struct winbindd_response *response;
};
-static void trustdom_recv(void *private_data, BOOL success);
+static void trustdom_recv(void *private_data, bool success);
static void rescan_forest_root_trusts( void );
static void rescan_forest_trusts( void );
trustdom_recv, state);
}
-static void trustdom_recv(void *private_data, BOOL success)
+static void trustdom_recv(void *private_data, bool success)
{
struct trustdom_state *state =
talloc_get_type_abort(private_data, struct trustdom_state);
struct winbindd_domain *domain;
struct winbindd_request *request;
struct winbindd_response *response;
- void (*continuation)(void *private_data, BOOL success);
+ void (*continuation)(void *private_data, bool success);
void *private_data;
};
-static void init_child_recv(void *private_data, BOOL success);
-static void init_child_getdc_recv(void *private_data, BOOL success);
+static void init_child_recv(void *private_data, bool success);
+static void init_child_getdc_recv(void *private_data, bool success);
enum winbindd_result init_child_connection(struct winbindd_domain *domain,
void (*continuation)(void *private_data,
- BOOL success),
+ bool success),
void *private_data)
{
TALLOC_CTX *mem_ctx;
return WINBINDD_PENDING;
}
-static void init_child_getdc_recv(void *private_data, BOOL success)
+static void init_child_getdc_recv(void *private_data, bool success)
{
struct init_child_state *state =
talloc_get_type_abort(private_data, struct init_child_state);
init_child_recv, state);
}
-static void init_child_recv(void *private_data, BOOL success)
+static void init_child_recv(void *private_data, bool success)
{
struct init_child_state *state =
talloc_get_type_abort(private_data, struct init_child_state);
}
/* Look up global info for the winbind daemon */
-BOOL init_domain_list(void)
+bool init_domain_list(void)
{
struct winbindd_domain *domain;
int role = lp_server_role();
/* Lookup a sid in a domain from a name */
-BOOL winbindd_lookup_sid_by_name(TALLOC_CTX *mem_ctx,
+bool winbindd_lookup_sid_by_name(TALLOC_CTX *mem_ctx,
enum winbindd_cmd orig_cmd,
struct winbindd_domain *domain,
const char *domain_name,
* @retval True if the name exists, in which case @p name and @p type
* are set, otherwise False.
**/
-BOOL winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx,
+bool winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain,
DOM_SID *sid,
char **dom_name,
/* Is this a domain which we may assume no DOMAIN\ prefix? */
-static BOOL assume_domain(const char *domain)
+static bool assume_domain(const char *domain)
{
/* never assume the domain on a standalone server */
/* Parse a string of the form DOMAIN\user into a domain and a user */
-BOOL parse_domain_user(const char *domuser, fstring domain, fstring user)
+bool parse_domain_user(const char *domuser, fstring domain, fstring user)
{
char *p = strchr(domuser,*lp_winbind_separator());
return True;
}
-BOOL parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
+bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
char **domain, char **user)
{
fstring fstr_domain, fstr_user;
really should be changed to use this instead of doing things
by hand. JRA. */
-BOOL canonicalize_username(fstring username_inout, fstring domain, fstring user)
+bool canonicalize_username(fstring username_inout, fstring domain, fstring user)
{
if (!parse_domain_user(username_inout, domain, user)) {
return False;
We always canonicalize as UPPERCASE DOMAIN, lowercase username.
*/
-void fill_domain_username(fstring name, const char *domain, const char *user, BOOL can_assume)
+void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume)
{
fstring tmp_user;
/*********************************************************************
********************************************************************/
-BOOL winbindd_can_contact_domain( struct winbindd_domain *domain )
+bool winbindd_can_contact_domain( struct winbindd_domain *domain )
{
/* We can contact the domain if it is our primary domain */
/*********************************************************************
********************************************************************/
-BOOL winbindd_internal_child(struct winbindd_child *child)
+bool winbindd_internal_child(struct winbindd_child *child)
{
if ((child == idmap_child()) || (child == locator_child())) {
return True;