uint32_t logon_parameters;
- BOOL mapped_state;
+ bool mapped_state;
/* the values the client gives us */
struct {
const char *account_name;
uint32_t acct_flags;
- BOOL authenticated;
+ bool authenticated;
};
struct auth_session_info {
/* Who set this up in the first place? */
const char *set_by;
- BOOL may_be_modified;
+ bool may_be_modified;
DATA_BLOB data;
} challenge;
/* We are flagged to get machine account details from the
* secrets.ldb when we are asked for a username or password */
- BOOL machine_account_pending;
+ bool machine_account_pending;
/* Is this a machine account? */
- BOOL machine_account;
+ bool machine_account;
/* Should we be trying to use kerberos? */
enum credentials_use_kerberos use_kerberos;
int tries;
/* Whether any callback is currently running */
- BOOL callback_running;
+ bool callback_running;
/* an event context for anyone wanting to use the credentials */
struct event_context *ev;
NTSTATUS (*session_key)(struct gensec_security *gensec_security, DATA_BLOB *session_key);
NTSTATUS (*session_info)(struct gensec_security *gensec_security,
struct auth_session_info **session_info);
- BOOL (*have_feature)(struct gensec_security *gensec_security,
+ bool (*have_feature)(struct gensec_security *gensec_security,
uint32_t feature);
- BOOL enabled;
- BOOL kerberos;
+ bool enabled;
+ bool kerberos;
enum gensec_priority priority;
};
struct cli_credentials *credentials;
struct gensec_target target;
enum gensec_role gensec_role;
- BOOL subcontext;
+ bool subcontext;
uint32_t want_features;
struct event_context *event_ctx;
struct messaging_context *msg_ctx; /* only valid as server */
struct schannel_state {
enum schannel_position state;
uint32_t seq_num;
- BOOL initiator;
+ bool initiator;
struct creds_CredentialState *creds;
};
krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt);
krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes);
void free_kerberos_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 ads_krb5_mk_req(krb5_context context,
krb5_auth_context *auth_context,
const krb5_flags ap_req_options,
const char *principal,
krb5_ccache ccache,
krb5_data *outbuf);
-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);
NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
struct smb_krb5_context *smb_krb5_context,
krb5_auth_context *auth_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);
krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry);
char *smb_get_krb5_error_message(krb5_context context, krb5_error_code code, TALLOC_CTX *mem_ctx);
enum samr_Role server_role;
uint32_t expected_state;
- BOOL unicode;
- BOOL use_ntlmv2;
- BOOL use_nt_response; /* Set to 'False' to debug what happens when the NT response is omited */
- BOOL allow_lm_key; /* The LM_KEY code is not functional at this point, and it's not
+ bool unicode;
+ bool use_ntlmv2;
+ bool use_nt_response; /* Set to 'False' to debug what happens when the NT response is omited */
+ bool allow_lm_key; /* The LM_KEY code is not functional at this point, and it's not
very secure anyway */
- BOOL server_multiple_authentications; /* Set to 'True' to allow squid 2.5
+ bool server_multiple_authentications; /* Set to 'True' to allow squid 2.5
style 'challenge caching' */
char *user;
* @return Can the challenge be set to arbitary values?
*
*/
- BOOL (*may_set_challenge)(const struct gensec_ntlmssp_state *);
+ bool (*may_set_challenge)(const struct gensec_ntlmssp_state *);
/**
* Callback to set the 'challenge' used for NTLM authentication.
const char *server_name;
const char *(*get_domain)(void);
- BOOL doing_ntlm2;
+ bool doing_ntlm2;
union {
/* NTLM */
union
{
- BOOL bval;
+ bool bval;
uint64_t nval;
const char * pval;
} arg_val;
int set_arg_argv(const char * argv);
void set_arg_val(const char * name, ...);
-BOOL check_arg_bool(const char * name);
+bool check_arg_bool(const char * name);
uint64_t check_arg_numeric(const char * name);
const char * check_arg_pathname(const char * name);
-typedef BOOL (*dd_seek_func)(void * handle, uint64_t offset);
-typedef BOOL (*dd_read_func)(void * handle, uint8_t * buf,
+typedef bool (*dd_seek_func)(void * handle, uint64_t offset);
+typedef bool (*dd_read_func)(void * handle, uint8_t * buf,
uint64_t wanted, uint64_t * actual);
-typedef BOOL (*dd_write_func)(void * handle, uint8_t * buf,
+typedef bool (*dd_write_func)(void * handle, uint8_t * buf,
uint64_t wanted, uint64_t * actual);
struct dd_stats_record
struct dd_iohandle * dd_open_path(const char * path,
uint64_t io_size, int options);
-BOOL dd_fill_block(struct dd_iohandle * h, uint8_t * buf,
+bool dd_fill_block(struct dd_iohandle * h, uint8_t * buf,
uint64_t * buf_size, uint64_t need_size, uint64_t block_size);
-BOOL dd_flush_block(struct dd_iohandle * h, uint8_t * buf,
+bool dd_flush_block(struct dd_iohandle * h, uint8_t * buf,
uint64_t * buf_size, uint64_t block_size);
/* vim: set sw=8 sts=8 ts=8 tw=79 : */
char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
_PUBLIC_ const char **str_list_add(const char **list, const char *s);
-_PUBLIC_ int set_blocking(int fd, BOOL set);
+_PUBLIC_ int set_blocking(int fd, bool set);
uint32_t searchFlags;
uint32_t systemFlags;
- BOOL isMemberOfPartialAttributeSet;
+ bool isMemberOfPartialAttributeSet;
uint32_t linkID;
const char *attributeSyntax_oid;
uint32_t oMSyntax;
struct ldb_val oMObjectClass;
- BOOL isSingleValued;
+ bool isSingleValued;
uint32_t rangeLower;
uint32_t rangeUpper;
- BOOL extendedCharsAllowed;
+ bool extendedCharsAllowed;
uint32_t schemaFlagsEx;
struct ldb_val msDs_Schema_Extensions;
- BOOL showInAdvancedViewOnly;
+ bool showInAdvancedViewOnly;
const char *adminDisplayName;
const char *adminDescription;
const char *classDisplayName;
- BOOL isEphemeral;
- BOOL isDefunct;
- BOOL systemOnly;
+ bool isEphemeral;
+ bool isDefunct;
+ bool systemOnly;
/* internal stuff */
const struct dsdb_syntax *syntax;
uint32_t schemaFlagsEx;
struct ldb_val msDs_Schema_Extensions;
- BOOL showInAdvancedViewOnly;
+ bool showInAdvancedViewOnly;
const char *adminDisplayName;
const char *adminDescription;
const char *classDisplayName;
- BOOL defaultHidingValue;
- BOOL isDefunct;
- BOOL systemOnly;
+ bool defaultHidingValue;
+ bool isDefunct;
+ bool systemOnly;
};
struct dsdb_schema_oid_prefix {
#include "libcli/util/nt_status.h"
-#include <stdbool.h>
#include <stdlib.h>
-typedef bool BOOL;
-
-#define False false
-#define True true
/* used to hold an arbitrary blob of data */
typedef struct datablob {
/* Lists, trees, caching, database... */
#include "talloc/talloc.h"
#include "core.h"
+#include <stdbool.h>
#include "charset/charset.h"
#include "util/util.h"
#include "param/param.h"
#include "librpc/gen_ndr/misc.h"
+typedef bool BOOL;
+
+#define False false
+#define True true
+
struct smbcli_tree;
#include "libcli/util/error.h"
extern TALLOC_CTX *kdc_mem_ctx;
-BOOL kpasswdd_process(struct kdc_server *kdc,
+bool kpasswdd_process(struct kdc_server *kdc,
TALLOC_CTX *mem_ctx,
DATA_BLOB *input,
DATA_BLOB *reply,
struct socket_context *sasl;
} sockets;
- BOOL global_catalog;
+ bool global_catalog;
struct packet_context *packet;
return 0;
}
-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;
* Based on a routine by GJC@VILLAGE.COM.
* Extensively modified by Andrew.Tridgell@anu.edu.au
**/
-_PUBLIC_ BOOL next_token(const char **ptr,char *buff, const char *sep, size_t bufsize)
+_PUBLIC_ bool next_token(const char **ptr,char *buff, const char *sep, size_t bufsize)
{
const char *s;
- BOOL quoted;
+ bool quoted;
size_t len=1;
if (!ptr)
*
* @note The comparison is case-insensitive.
**/
-_PUBLIC_ BOOL strequal_w(const char *s1, const char *s2)
+_PUBLIC_ bool strequal_w(const char *s1, const char *s2)
{
return strcasecmp_m(s1,s2) == 0;
}
/**
Compare 2 strings (case sensitive).
**/
-_PUBLIC_ BOOL strcsequal_w(const char *s1,const char *s2)
+_PUBLIC_ bool strcsequal_w(const char *s1,const char *s2)
{
if (s1 == s2)
return(True);
/**
return True if any (multi-byte) character is lower case
*/
-_PUBLIC_ BOOL strhaslower(const char *string)
+_PUBLIC_ bool strhaslower(const char *string)
{
while (*string) {
size_t c_size;
/**
return True if any (multi-byte) character is upper case
*/
-_PUBLIC_ BOOL strhasupper(const char *string)
+_PUBLIC_ bool strhasupper(const char *string)
{
while (*string) {
size_t c_size;
void *private;
struct irpc_header header;
struct ndr_pull *ndr;
- BOOL defer_reply;
+ bool defer_reply;
struct messaging_context *msg_ctx;
struct irpc_list *irpc;
void *data;
int callid;
void *r;
NTSTATUS status;
- BOOL done;
- BOOL reject_free;
+ bool done;
+ bool reject_free;
TALLOC_CTX *mem_ctx;
struct {
void (*fn)(struct irpc_request *);
const DATA_BLOB data);
_PUBLIC_ char *reg_val_description(TALLOC_CTX *mem_ctx, const char *name,
uint32_t type, const DATA_BLOB data);
-_PUBLIC_ BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *data_str, uint32_t *type, DATA_BLOB *data);
+_PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *data_str, uint32_t *type, DATA_BLOB *data);
WERROR reg_open_key_abs(TALLOC_CTX *mem_ctx, struct registry_context *handle, const char *name, struct registry_key **result);
WERROR reg_key_del_abs(struct registry_context *ctx, const char *path);
WERROR reg_key_add_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, const char *path, uint32_t access_mask, struct security_descriptor *sec_desc, struct registry_key **result);
reg_val_data_string(mem_ctx, data_type, data));
}
-_PUBLIC_ BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *data_str, uint32_t *type, DATA_BLOB *data)
+_PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *data_str, uint32_t *type, DATA_BLOB *data)
{
int i;
*type = -1;
}
if (*type == -1)
- return False;
+ return false;
/* Convert data appropriately */
default:
/* FIXME */
- return False;
+ return false;
}
- return True;
+ return true;
}
/** Open a key by name (including the predefined key name!) */
uint16_t smbpasswd_decode_acb_info(const char *p)
{
uint16_t acb_info = 0;
- BOOL finished = False;
+ bool finished = false;
/*
* Check if the account type bits have been encoded after the
case '\n':
case ']':
default:
- finished = True;
+ finished = true;
break;
}
}
#define TDB_FORMAT_STRING_V2 "dddddddBBBBBBBBBBBBddBBBwwdBwwd"
#define TDBSAM_VERSION_STRING "INFO/version"
-static BOOL init_sam_from_buffer_v0(TDB_CONTEXT *tdb, struct samba3_samaccount *sampass, TDB_DATA buf)
+static bool init_sam_from_buffer_v0(TDB_CONTEXT *tdb, struct samba3_samaccount *sampass, TDB_DATA buf)
{
uint32_t username_len, domain_len, nt_username_len,
dir_drive_len, unknown_str_len, munged_dial_len,
if(sampass == NULL || buf.dptr == NULL) {
DEBUG(0, ("init_sam_from_buffer_v0: NULL parameters found!\n"));
- return False;
+ return false;
}
/* unpack the buffer into variables */
&sampass->unknown_6); /* d */
if (len == (uint32_t) -1) {
- return False;
+ return false;
}
- return True;
+ return true;
}
-static BOOL init_sam_from_buffer_v1(TDB_CONTEXT *tdb, struct samba3_samaccount *sampass, TDB_DATA buf)
+static bool init_sam_from_buffer_v1(TDB_CONTEXT *tdb, struct samba3_samaccount *sampass, TDB_DATA buf)
{
uint32_t username_len, domain_len, nt_username_len,
dir_drive_len, unknown_str_len, munged_dial_len,
if(sampass == NULL || buf.dptr == NULL) {
DEBUG(0, ("init_sam_from_buffer_v1: NULL parameters found!\n"));
- return False;
+ return false;
}
/* unpack the buffer into variables */
&sampass->unknown_6); /* d */
if (len == (uint32_t) -1) {
- return False;
+ return false;
}
- return True;
+ return true;
}
-static BOOL init_sam_from_buffer_v2(TDB_CONTEXT *tdb, struct samba3_samaccount *sampass, TDB_DATA buf)
+static bool init_sam_from_buffer_v2(TDB_CONTEXT *tdb, struct samba3_samaccount *sampass, TDB_DATA buf)
{
uint32_t username_len, domain_len, nt_username_len,
dir_drive_len, unknown_str_len, munged_dial_len,
if(sampass == NULL || buf.dptr == NULL) {
DEBUG(0, ("init_sam_from_buffer_v2: NULL parameters found!\n"));
- return False;
+ return false;
}
/* unpack the buffer into variables */
&sampass->unknown_6); /* d */
if (len == (uint32_t) -1) {
- return False;
+ return false;
}
- return True;
+ return true;
}
NTSTATUS samba3_read_tdbsam(const char *filename, TALLOC_CTX *ctx, struct samba3_samaccount **accounts, uint32_t *count)
for (key = tdb_firstkey(tdb); key.dptr; key = tdb_nextkey(tdb, key))
{
- BOOL ret;
+ bool ret;
if (strncmp((const char *)key.dptr, "USER_", 5) != 0)
continue;
case 0: ret = init_sam_from_buffer_v0(tdb, &(*accounts)[*count], val); break;
case 1: ret = init_sam_from_buffer_v1(tdb, &(*accounts)[*count], val); break;
case 2: ret = init_sam_from_buffer_v2(tdb, &(*accounts)[*count], val); break;
- default: ret = False; break;
+ default: ret = false; break;
}
struct sockaddr *sockaddr,
size_t addrlen);
const struct socket_ops *socket_getops_byname(const char *name, enum socket_type type);
-BOOL allow_access(TALLOC_CTX *mem_ctx,
+bool allow_access(TALLOC_CTX *mem_ctx,
const char **deny_list, const char **allow_list,
const char *cname, const char *caddr);
-BOOL socket_check_access(struct socket_context *sock,
+bool socket_check_access(struct socket_context *sock,
const char *service_name,
const char **allow_list, const char **deny_list);
/*
return True if a connection used tls
*/
-BOOL tls_enabled(struct socket_context *tls);
+bool tls_enabled(struct socket_context *tls);
/*
true if tls support is compiled in
*/
-BOOL tls_support(struct tls_params *parms);
+bool tls_support(struct tls_params *parms);
const struct socket_ops *socket_tls_ops(enum socket_type type);
int timeout;
int num_retries;
- BOOL is_reply;
+ bool is_reply;
/* the ldap message_id */
int message_id;
void *private_data;
} async;
- BOOL used_wait;
+ bool used_wait;
};
struct irpc_request;
enum ldap_deref deref;
uint32_t timelimit;
uint32_t sizelimit;
- BOOL attributesonly;
+ bool attributesonly;
struct ldb_parse_tree *tree;
int num_attributes;
const char **attributes;
struct ldap_ModifyDNRequest {
const char *dn;
const char *newrdn;
- BOOL deleteolddn;
+ bool deleteolddn;
const char *newsuperior;/* optional */
};
struct socket_context *sock;
char *host;
uint16_t port;
- BOOL ldaps;
+ bool ldaps;
const char *auth_dn;
const char *simple_pw;
int num_retries;
/* whether we have received a WACK */
- BOOL received_wack;
+ bool received_wack;
/* the timeout event */
struct timed_event *te;
uint16_t name_trn_id;
/* is it a reply? */
- BOOL is_reply;
+ bool is_reply;
/* the encoded request */
DATA_BLOB encoded;
/* shall we allow multiple replies? */
- BOOL allow_multiple_replies;
+ bool allow_multiple_replies;
unsigned int num_replies;
struct nbt_name_reply {
struct {
struct nbt_name name;
const char *dest_addr;
- BOOL broadcast;
- BOOL wins_lookup;
+ bool broadcast;
+ bool wins_lookup;
int timeout; /* in seconds */
int retries;
} in;
const char *dest_addr;
const char *address;
uint16_t nb_flags;
- BOOL register_demand;
- BOOL broadcast;
- BOOL multi_homed;
+ bool register_demand;
+ bool broadcast;
+ bool multi_homed;
uint32_t ttl;
int timeout; /* in seconds */
int retries;
const char *dest_addr;
const char *address;
uint16_t nb_flags;
- BOOL broadcast;
+ bool broadcast;
uint32_t ttl;
int timeout; /* in seconds */
int retries;
const char *dest_addr;
const char *address;
uint16_t nb_flags;
- BOOL broadcast;
+ bool broadcast;
int timeout; /* in seconds */
int retries;
} in;
uint64_t alloc_size;
uint64_t size;
uint32_t nlink;
- BOOL delete_pending;
- BOOL directory;
+ bool delete_pending;
+ bool directory;
} out;
} standard_info;
enum smb_setfileinfo_level level;
struct {
union smb_handle_or_path file;
- BOOL delete_on_close;
+ bool delete_on_close;
} in;
} disposition_info;
uint16_t mincnt;
uint32_t maxcnt;
uint16_t remaining;
- BOOL read_for_execute;
+ bool read_for_execute;
} in;
struct {
uint8_t *data;
struct {
union smb_handle file;
uint32_t function;
- BOOL fsctl;
+ bool fsctl;
uint8_t filter;
uint32_t max_data;
DATA_BLOB blob;
union smb_handle file;
uint32_t buffer_size;
uint32_t completion_filter;
- BOOL recursive;
+ bool recursive;
} in;
struct {
};
/* Callback function passed to the raw search interface. */
-typedef BOOL (*smbcli_search_callback)(void *private, const union smb_search_data *file);
+typedef bool (*smbcli_search_callback)(void *private, const union smb_search_data *file);
enum smb_search_close_level {RAW_FINDCLOSE_GENERIC, RAW_FINDCLOSE_FCLOSE, RAW_FINDCLOSE_FINDCLOSE};
struct {
/* a oplock break request handler */
- BOOL (*handler)(struct smbcli_transport *transport,
+ bool (*handler)(struct smbcli_transport *transport,
uint16_t tid, uint16_t fnum, uint8_t level, void *private);
/* private data passed to the oplock handler */
void *private;
enum smb_signing_engine_state signing_state;
DATA_BLOB mac_key;
uint32_t next_seq_num;
- BOOL allow_smb_signing;
- BOOL doing_signing;
- BOOL mandatory_signing;
- BOOL seen_valid; /* Have I ever seen a validly signed packet? */
+ bool allow_smb_signing;
+ bool doing_signing;
+ bool mandatory_signing;
+ bool seen_valid; /* Have I ever seen a validly signed packet? */
};
#endif
uint64_t seqnum;
struct {
- BOOL do_cancel;
- BOOL can_cancel;
+ bool do_cancel;
+ bool can_cancel;
uint32_t pending_id;
} cancel;
const char *service;
const char *service_type;
struct cli_credentials *credentials;
- BOOL fallback_to_anonymous;
+ bool fallback_to_anonymous;
const char *workgroup;
} in;
struct {
struct smbcli_tree *tree;
- BOOL anonymous_fallback_done;
+ bool anonymous_fallback_done;
} out;
};
size_t length;
off_t ofs;
struct nesting *nesting;
- BOOL has_error;
+ bool has_error;
};
#define ASN1_APPLICATION(x) ((x)+0x60)
uint32_t timeout_count;
/* remember is the socket is dead */
- BOOL dead;
+ bool dead;
/* remember if we need to free the wrepl_socket at the end of wrepl_socket_dead() */
- BOOL free_skipped;
+ bool free_skipped;
};
struct wrepl_send_ctrl {
- BOOL send_only;
- BOOL disconnect_after_send;
+ bool send_only;
+ bool disconnect_after_send;
};
enum wrepl_request_state {
struct wrepl_socket *wrepl_socket;
enum wrepl_request_state state;
- BOOL trigger;
+ bool trigger;
NTSTATUS status;
struct timed_event *te;
enum wrepl_name_type type;
enum wrepl_name_state state;
enum wrepl_name_node node;
- BOOL is_static;
+ bool is_static;
uint32_t raw_flags;
uint64_t version_id;
const char *owner;
const char *binding;
enum libnet_JoinDomain_level level;
uint32_t acct_type;
- BOOL recreate_account;
+ bool recreate_account;
} in;
struct {
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 {
const char *(*target_hostname)(struct dcerpc_connection *);
/* send a request to the server */
- NTSTATUS (*send_request)(struct dcerpc_connection *, DATA_BLOB *, BOOL trigger_read);
+ NTSTATUS (*send_request)(struct dcerpc_connection *, DATA_BLOB *, bool trigger_read);
/* send a read request to the server */
NTSTATUS (*send_read)(struct dcerpc_connection *);
const struct GUID *object;
uint16_t opnum;
DATA_BLOB request_data;
- BOOL async_call;
- BOOL ignore_timeout;
+ bool async_call;
+ bool ignore_timeout;
/* use by the ndr level async recv call */
struct {
enum wrepl_name_type type;
enum wrepl_name_state state;
enum wrepl_name_node node;
- BOOL is_static;
+ bool is_static;
time_t expire_time;
uint64_t version;
const char *wins_owner;
fstring groupname;
} acct_mgt;
struct {
- BOOL is_primary;
+ bool is_primary;
fstring dcname;
} init_conn;
struct {
uint32 type;
uint32 id;
} dual_idmapset;
- BOOL list_all_domains;
+ bool list_all_domains;
struct {
uid_t uid;
fstring name;
fstring alt_name;
fstring sid;
- BOOL native_mode;
- BOOL active_directory;
- BOOL primary;
+ bool native_mode;
+ bool active_directory;
+ bool primary;
uint32 sequence_number;
} domain_info;
struct {
struct odb_context *odb, DATA_BLOB *file_key);
NTSTATUS (*odb_open_file)(struct odb_lock *lck, void *file_handle,
uint32_t stream_id, uint32_t share_access,
- uint32_t access_mask, BOOL delete_on_close,
+ uint32_t access_mask, bool delete_on_close,
const char *path,
uint32_t oplock_level, uint32_t *oplock_granted);
NTSTATUS (*odb_open_file_pending)(struct odb_lock *lck, void *private);
NTSTATUS (*odb_close_file)(struct odb_lock *lck, void *file_handle);
NTSTATUS (*odb_remove_pending)(struct odb_lock *lck, void *private);
NTSTATUS (*odb_rename)(struct odb_lock *lck, const char *path);
- NTSTATUS (*odb_set_delete_on_close)(struct odb_lock *lck, BOOL del_on_close);
+ NTSTATUS (*odb_set_delete_on_close)(struct odb_lock *lck, bool del_on_close);
NTSTATUS (*odb_get_delete_on_close)(struct odb_context *odb,
- DATA_BLOB *key, BOOL *del_on_close,
+ DATA_BLOB *key, bool *del_on_close,
int *open_count, char **path);
NTSTATUS (*odb_can_open)(struct odb_lock *lck,
uint32_t share_access, uint32_t create_options,
NTSTATUS (*search_first)(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req,
union smb_search_first *io, void *private,
- BOOL (*callback)(void *private, const union smb_search_data *file));
+ bool (*callback)(void *private, const union smb_search_data *file));
NTSTATUS (*search_next)(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req,
union smb_search_next *io, void *private,
- BOOL (*callback)(void *private, const union smb_search_data *file));
+ bool (*callback)(void *private, const union smb_search_data *file));
NTSTATUS (*search_close)(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req,
union smb_search_close *io);
char *full_name;
const char *stream_name; /* does not include :$DATA suffix */
uint32_t stream_id; /* this uses a hash, so is probabilistic */
- BOOL has_wildcard;
- BOOL exists; /* true if the base filename exists */
- BOOL stream_exists; /* true if the stream exists */
+ bool has_wildcard;
+ bool exists; /* true if the base filename exists */
+ bool stream_exists; /* true if the stream exists */
struct stat st;
struct pvfs_dos_fileinfo dos;
};
uint64_t seek_offset;
uint64_t position;
- BOOL have_opendb_entry;
+ bool have_opendb_entry;
/* we need this hook back to our parent for lock destruction */
struct pvfs_state *pvfs;
/* have we set a sticky write time that we should remove on close */
- BOOL sticky_write_time;
+ bool sticky_write_time;
/* the open went through to completion */
- BOOL open_completed;
+ bool open_completed;
};
/* open file state */
parm_type type;
parm_class class;
void *ptr;
- BOOL (*special)(const char *, char **);
+ bool (*special)(const char *, char **);
const struct enum_list *enum_list;
unsigned int flags;
union {
NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct share_context **);
const char *(*string_option)(struct share_config *, const char *, const char *);
int (*int_option)(struct share_config *, const char *, int);
- BOOL (*bool_option)(struct share_config *, const char *, BOOL);
+ bool (*bool_option)(struct share_config *, const char *, bool);
const char **(*string_list_option)(TALLOC_CTX *, struct share_config *, const char *);
NTSTATUS (*list_all)(TALLOC_CTX *, struct share_context *, int *, const char ***);
NTSTATUS (*get_config)(TALLOC_CTX *, struct share_context *, const char *, struct share_config **);
/* the transport level session key */
DATA_BLOB transport_session_key;
- BOOL processing;
+ bool processing;
/* this is the default state_flags for dcesrv_call_state structs */
uint32_t state_flags;
* ask for a dcesrv_interface implementation
* - iface must be reference to an already existing struct !
*/
- BOOL (*interface_by_uuid)(struct dcesrv_interface *iface, const struct GUID *, uint32_t);
+ bool (*interface_by_uuid)(struct dcesrv_interface *iface, const struct GUID *, uint32_t);
/* this function can be used by other endpoint servers to
* ask for a dcesrv_interface implementation
* - iface must be reference to an already existeng struct !
*/
- BOOL (*interface_by_name)(struct dcesrv_interface *iface, const char *);
+ bool (*interface_by_name)(struct dcesrv_interface *iface, const char *);
};
my $name = $3;
my %tmap = (
- "BOOL" => "BOOL ",
+ "BOOL" => "bool ",
"bool" => "bool ",
"CONST_STRING" => "const char *",
"STRING" => "const char *",
$target->("\n$comment") if (defined($comment)); $comment = undef;
+ $line =~ s/BOOL /bool /g;
if ( $line =~ /\(.*\)\s*$/o ) {
chomp $line;
$target->("$line;\n");
$target->($line);
while ($line = <FH>) {
+ $line =~ s/BOOL /bool /g;
if ($line =~ /\)\s*$/o) {
chomp $line;
$target->("$line;\n");
NTSTATUS ejs_push_dom_sid(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const struct dom_sid *r);
NTSTATUS ejs_push_null(struct ejs_rpc *ejs, struct MprVar *v, const char *name);
-BOOL ejs_pull_null(struct ejs_rpc *ejs, struct MprVar *v, const char *name);
+bool ejs_pull_null(struct ejs_rpc *ejs, struct MprVar *v, const char *name);
NTSTATUS ejs_push_WERROR(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const WERROR *r);
NTSTATUS ejs_push_NTSTATUS(struct ejs_rpc *ejs,
NTSTATUS ejs_push_DATA_BLOB(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const DATA_BLOB *r);
NTSTATUS ejs_pull_BOOL(struct ejs_rpc *ejs,
- struct MprVar *v, const char *name, BOOL *r);
+ struct MprVar *v, const char *name, bool *r);
NTSTATUS ejs_push_BOOL(struct ejs_rpc *ejs,
- struct MprVar *v, const char *name, const BOOL *r);
+ struct MprVar *v, const char *name, const bool *r);
NTSTATUS ejs_pull_array_uint8(struct ejs_rpc *ejs,
struct MprVar *v, const char *name,
/* context that has been negotiated between the client and server */
struct {
/* have we already done the NBT session establishment? */
- BOOL done_nbt_session;
+ bool done_nbt_session;
/* only one negprot per connection is allowed */
- BOOL done_negprot;
+ bool done_negprot;
/* multiple session setups are allowed, but some parameters are
ignored in any but the first */
- BOOL done_sesssetup;
+ bool done_sesssetup;
/*
* Size of data we can send to client. Set
struct cli_credentials *server_credentials;
/* did we tell the client we support encrypted passwords? */
- BOOL encrypted_passwords;
+ bool encrypted_passwords;
/* Did we choose SPNEGO, or perhaps raw NTLMSSP, or even no extended security at all? */
const char *oid;
/* configuration parameters */
struct {
enum security_types security;
- BOOL nt_status_support;
+ bool nt_status_support;
} config;
/* some statictics for the management tools */
struct socket_context *socket;
struct messaging_context *msg_ctx;
- BOOL processing;
+ bool processing;
const char *terminate;
};
struct task_server *task;
struct stream_connection *conn;
struct {
- BOOL tls_detect;
- BOOL tls_first_char;
+ bool tls_detect;
+ bool tls_first_char;
uint8_t first_byte;
DATA_BLOB partial;
- BOOL end_of_headers;
+ bool end_of_headers;
char *url;
unsigned content_length;
- BOOL post_request;
+ bool post_request;
const char *content_type;
const char *query_string;
const char *user_agent;
const char *session_key;
} input;
struct {
- BOOL output_pending;
+ bool output_pending;
DATA_BLOB content;
int fd;
unsigned nsent;
struct wbsrv_listen_socket {
const char *socket_path;
struct wbsrv_service *service;
- BOOL privileged;
+ bool privileged;
};
/*
struct wreplsrv_push_notify_io {
struct {
struct wreplsrv_partner *partner;
- BOOL inform;
- BOOL propagate;
+ bool inform;
+ bool propagate;
} in;
};
struct wreplsrv_in_connection *wreplconn;
struct wrepl_packet req_packet;
struct wrepl_packet rep_packet;
- BOOL terminate_after_send;
+ bool terminate_after_send;
};
/*
/* keep track of the assoc_ctx's */
struct {
- BOOL stopped;
+ bool stopped;
uint32_t our_ctx;
uint32_t peer_ctx;
} assoc_ctx;
uint64_t maxVersionID;
/* we should use WREPL_REPL_INFORM* messages to this partner */
- BOOL use_inform;
+ bool use_inform;
/* the error count till the last success */
uint32_t error_count;
/*
* are we currently inside a scavenging run
*/
- BOOL processing;
+ bool processing;
} scavenging;
};