*/
const struct auth_critical_sizes *auth_interface_version(void)
{
- const static struct auth_critical_sizes critical_sizes = {
+ static const struct auth_critical_sizes critical_sizes = {
AUTH_INTERFACE_VERSION,
sizeof(struct auth_operations),
sizeof(struct auth_method_context),
int sasl_ret, i;
const char **sasl_mechs;
- const sasl_callback_t callbacks[] = {
+ static const sasl_callback_t callbacks[] = {
{
.id = SASL_CB_LOG,
.proc = gensec_sasl_log,
uint8_t confounder[8];
uint8_t seq_num[8];
uint8_t sealing_key[16];
- const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
+ static const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
if (sig->length != 32) {
return NT_STATUS_ACCESS_DENIED;
uint8_t digest_final[16];
uint8_t seq_num[8];
- const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
+ static const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
/* w2k sends just 24 bytes and skip the confounder */
if (sig->length != 32 && sig->length != 24) {
uint8_t confounder[8];
uint8_t seq_num[8];
uint8_t sealing_key[16];
- const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
+ static const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
generate_random_buffer(confounder, 8);
uint8_t digest_final[16];
uint8_t seq_num[8];
- const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
+ static const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
RSIVAL(seq_num, 0, state->seq_num);
SIVAL(seq_num, 4, state->initiator?0x80:0);
static const char * argtype_str(enum argtype arg_type)
{
- const struct {
+ static const struct {
enum argtype arg_type;
const char * arg_name;
} names [] =
const char * parg,
void * pdata)
{
- const char notes[] =
+ static const char notes[] =
"FILE can be a local filename or a UNC path of the form //server/share/path.\n";
char prefix[24];
talloc_free(). We need the messaging_ctx to allow for
pending lock notifications.
*/
-static struct brl_context *brl_ctdb_init(TALLOC_CTX *mem_ctx, struct server_id server, struct loadparm_context *lp_ctx,
+static struct brl_context *brl_ctdb_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct messaging_context *messaging_ctx)
{
struct ctdb_context *ctdb = talloc_get_type(cluster_backend_handle(),
printf("Number of nodes:%d\n", nodemap->num);
for(i=0;i<nodemap->num;i++){
- const struct {
+ static const struct {
uint32_t flag;
const char *name;
} flag_names[] = {
struct ldb_dn *basedn;
struct ldb_result *r;
struct ldb_message_element *el;
- const char *attrs[] = { "namingContexts", NULL };
+ static const char *attrs[] = { "namingContexts", NULL };
uint32_t i;
int ret;
struct ldb_result *r;
uint32_t i;
int ret;
- const char *attrs[] = {
+ static const char *attrs[] = {
"objectSid",
"objectGUID",
"replUpToDateVector",
{
int ret, i;
TALLOC_CTX *mem_ctx = talloc_new(module);
- const char *attrs[] = { "passwordAttribute", NULL };
+ static const char *attrs[] = { "passwordAttribute", NULL };
struct ldb_result *res;
struct ldb_message *msg;
struct ldb_message_element *password_attributes;
static int local_password_mod_search_self(struct ldb_handle *h) {
struct lpdb_context *ac;
- const char * const attrs[] = { "objectGUID", "objectClass", NULL };
+ static const char * const attrs[] = { "objectGUID", "objectClass", NULL };
ac = talloc_get_type(h->private_data, struct lpdb_context);
struct dsdb_naming_fsmo *naming_fsmo;
struct ldb_result *naming_res;
int ret;
- const char *naming_attrs[] = {
+ static const char *naming_attrs[] = {
"fSMORoleOwner",
NULL
};
static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
{
- const char * const attrs[] = { NULL };
+ static const char * const attrs[] = { NULL };
struct ldb_handle *h;
struct oc_context *ac;
{
int ret;
struct oc_context *ac;
- const char * const attrs[] = { "objectClass", NULL };
+ static const char * const attrs[] = { "objectClass", NULL };
ac = talloc_get_type(h->private_data, struct oc_context);
static int objectclass_rename(struct ldb_module *module, struct ldb_request *req)
{
- const char * const attrs[] = { NULL };
+ static const char * const attrs[] = { NULL };
struct ldb_handle *h;
struct oc_context *ac;
/* attrs[] is returned from this function in
ac->dom_req->op.search.attrs, so it must be static, as
otherwise the compiler can put it on the stack */
- const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
+ static const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
char *filter;
ac->dom_req = talloc_zero(ac, struct ldb_request);
static int password_hash_mod_search_self(struct ldb_handle *h) {
struct ph_context *ac;
- const char * const attrs[] = { "userAccountControl", "lmPwdHistory",
+ static const char * const attrs[] = { "userAccountControl", "lmPwdHistory",
"ntPwdHistory",
"objectSid", "msDS-KeyVersionNumber",
"objectClass", "userPrincipalName",
struct dsdb_pdc_fsmo *pdc_fsmo;
struct ldb_result *pdc_res;
int ret;
- const char *pdc_attrs[] = {
+ static const char *pdc_attrs[] = {
"fSMORoleOwner",
NULL
};
{
struct rr_context *rr_context = talloc_get_type(context, struct rr_context);
struct ldb_request *orig_req = rr_context->orig_req;
- int i, j;
+ int i, j, ret;
if (ares->type != LDB_REPLY_ENTRY) {
return rr_context->orig_req->callback(ldb, rr_context->orig_req->context, ares);
static int replmd_replicated_uptodate_search(struct replmd_replicated_request *ar)
{
int ret;
- const char *attrs[] = {
+ static const char *attrs[] = {
"replUpToDateVector",
"repsFrom",
NULL
static int schema_init_attrs(struct ldb_module *module, struct schema_private_data *data)
{
- const char *schema_attrs[] = { "attributeID",
+ static const char *schema_attrs[] = { "attributeID",
"lDAPDisplayName",
"attributeSyntax",
"oMSyntax",
static int schema_init(struct ldb_module *module)
{
- const char *schema_attrs[] = { "schemaNamingContext", NULL };
+ static const char *schema_attrs[] = { "schemaNamingContext", NULL };
struct schema_private_data *data;
struct ldb_result *res;
int ret;
struct ldb_result *c_res;
uint32_t i;
int ret;
- const char *schema_attrs[] = {
+ static const char *schema_attrs[] = {
"prefixMap",
"schemaInfo",
"fSMORoleOwner",
entryuuid_private->base_dns &&
entryuuid_private->base_dns[i];
i++) {
- const char *contextCSN_attr[] = {
+ static const char *contextCSN_attr[] = {
"contextCSN", NULL
};
search_req = talloc(req, struct ldb_request);
/**
* Global variable to hold one copy of the schema, used to avoid memory bloat
*/
-static const struct dsdb_schema *global_schema;
+static struct dsdb_schema *global_schema;
/**
* Make this ldb use the 'global' schema, setup to avoid having multiple copies in this process
/* conf|int */
if (strcmp(ireq.u.digestRequest.digest, "clear") != 0) {
- const char conf_zeros[] = ":00000000000000000000000000000000";
+ static char conf_zeros[] = ":00000000000000000000000000000000";
MD5_Update(&ctx, conf_zeros, sizeof(conf_zeros) - 1);
}
int ret;
struct ldb_result *res;
struct ldb_dn *tmp_dn=NULL;
- const char *attrs[] = {
+ static const char *attrs[] = {
"rootDomainNamingContext",
"configurationNamingContext",
"schemaNamingContext",
struct ldb_parse_tree **new, const struct ldb_parse_tree *tree)
{
- const struct ldb_map_attribute objectclass_map = {
+ static const struct ldb_map_attribute objectclass_map = {
.local_name = "objectClass",
.type = MAP_CONVERT,
.u = {
/* attrs[] is returned from this function in
* ac->search_req->op.search.attrs, so it must be static, as
* otherwise the compiler can put it on the stack */
- const char * const attrs[] = { IS_MAPPED, NULL };
+ static const char * const attrs[] = { IS_MAPPED, NULL };
struct ldb_parse_tree *tree;
/* Limit search to records with 'IS_MAPPED' present */
* base DNs in private data. */
static int map_init_dns(struct ldb_module *module, struct ldb_map_context *data, const char *name)
{
- const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
+ static const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
struct ldb_dn *dn;
struct ldb_message *msg;
struct ldb_result *res;
static int ps_init(struct ldb_module *module)
{
- const char *attrs[] = { "supportedControl", NULL };
+ static const char *attrs[] = { "supportedControl", NULL };
struct private_data *data;
int ret;
struct ldb_request *req;
static const char *
inet_ntop4(const unsigned char *src, char *dst, socklen_t size)
{
- const char *fmt = "%u.%u.%u.%u";
+ static const char *fmt = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
size_t len;
const char *src;
unsigned char *dst;
{
- const char digits[] = "0123456789";
+ static const char digits[] = "0123456789";
int saw_digit, octets, ch;
unsigned char tmp[NS_INADDRSZ], *tp;
const char *src;
unsigned char *dst;
{
- const char xdigits_l[] = "0123456789abcdef",
+ static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
time_t rep_timegm(struct tm *tm)
{
- const unsigned ndays[2][12] ={
+ static const unsigned ndays[2][12] ={
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
time_t res = 0;
const char **sasl_names;
uint32_t old_gensec_features;
- const char *supported_sasl_mech_attrs[] = {
+ static const char *supported_sasl_mech_attrs[] = {
"supportedSASLMechanisms",
NULL
};
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- const char *attrs[] = {
+ static const char *attrs[] = {
"*",
NULL
};
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- const char *attrs[] = {
+ static const char *attrs[] = {
"msDs-Behavior-Version",
NULL
};
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- const char *attrs[] = {
+ static const char *attrs[] = {
"msDs-Behavior-Version",
NULL
};
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- const char *attrs[] = {
+ static const char *attrs[] = {
"objectVersion",
NULL
};
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- const char *attrs[] = {
+ static const char *attrs[] = {
"revision",
NULL
};
struct ldb_dn *basedn;
struct ldb_dn *ntds_dn;
struct ldb_dn *server_dn;
- const char *_1_1_attrs[] = {
+ static const char *_1_1_attrs[] = {
"1.1",
NULL
};
- const char *fsmo_attrs[] = {
+ static const char *fsmo_attrs[] = {
"fSMORoleOwner",
NULL
};
- const char *dns_attrs[] = {
+ static const char *dns_attrs[] = {
"dnsHostName",
NULL
};
- const char *guid_attrs[] = {
+ static const char *guid_attrs[] = {
"objectGUID",
NULL
};
const char *reference_dn_str;
struct ldb_dn *ntds_dn;
struct ldb_dn *server_dn;
- const char *rid_attrs[] = {
+ static const char *rid_attrs[] = {
"rIDManagerReference",
NULL
};
- const char *fsmo_attrs[] = {
+ static const char *fsmo_attrs[] = {
"fSMORoleOwner",
NULL
};
- const char *dns_attrs[] = {
+ static const char *dns_attrs[] = {
"dnsHostName",
NULL
};
- const char *guid_attrs[] = {
+ static const char *guid_attrs[] = {
"objectGUID",
NULL
};
struct ldb_result *r;
struct ldb_dn *basedn;
char *filter;
- const char *attrs[] = {
+ static const char *attrs[] = {
"distinguishedName",
"userAccountControl",
NULL
struct ldb_result *r;
struct ldb_dn *basedn;
const char *server_reference_bl_dn_str;
- const char *attrs[] = {
+ static const char *attrs[] = {
"serverReferenceBL",
NULL
};
struct ldb_dn *basedn;
struct ldb_dn *old_dn;
struct ldb_dn *new_dn;
- const char *_1_1_attrs[] = {
+ static const char *_1_1_attrs[] = {
"1.1",
NULL
};
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- const char *attrs[] = {
+ static const char *attrs[] = {
"defaultNamingContext",
"configurationNamingContext",
NULL
struct ldb_result *r;
struct ldb_dn *basedn;
char *filter;
- const char *attrs[] = {
+ static const char *attrs[] = {
"distinguishedName",
"userAccountControl",
NULL
struct ldb_dn *basedn;
struct ldb_dn *old_dn;
struct ldb_dn *new_dn;
- const char *_1_1_attrs[] = {
+ static const char *_1_1_attrs[] = {
"1.1",
NULL
};
struct GUID site_guid;
struct ldb_result *site_res;
struct ldb_dn *server_site_dn;
- const char *site_attrs[] = { "objectGUID", NULL };
+ static const char *site_attrs[] = { "objectGUID", NULL };
struct ldb_result *ntds_res;
struct ldb_dn *ntds_dn;
- const char *ntds_attrs[] = { "ms-DS-ReplicationEpoch", NULL };
+ static const char *ntds_attrs[] = { "ms-DS-ReplicationEpoch", NULL };
uint32_t u1;
uint32_t repl_epoch;
int ret;
switch (r->in.level) {
case 1:
{
- const char * const attrs2[] = { "minPwdLength", "pwdHistoryLength",
+ static const char * const attrs2[] = { "minPwdLength", "pwdHistoryLength",
"pwdProperties", "maxPwdAge",
"minPwdAge", NULL };
attrs = attrs2;
}
case 2:
{
- const char * const attrs2[] = {"forceLogoff",
+ static const char * const attrs2[] = {"forceLogoff",
"comment",
"modifiedCount",
"fSMORoleOwner",
}
case 3:
{
- const char * const attrs2[] = {"forceLogoff",
+ static const char * const attrs2[] = {"forceLogoff",
NULL};
attrs = attrs2;
break;
}
case 4:
{
- const char * const attrs2[] = {"comment",
+ static const char * const attrs2[] = {"comment",
NULL};
attrs = attrs2;
break;
}
case 6:
{
- const char * const attrs2[] = {"fSMORoleOwner",
+ static const char * const attrs2[] = {"fSMORoleOwner",
NULL};
attrs = attrs2;
break;
}
case 8:
{
- const char * const attrs2[] = { "modifiedCount",
+ static const char * const attrs2[] = { "modifiedCount",
"creationTime",
NULL };
attrs = attrs2;
break;
case 11:
{
- const char * const attrs2[] = { "comment", "forceLogoff",
+ static const char * const attrs2[] = { "comment", "forceLogoff",
"modifiedCount",
"lockoutDuration",
"lockOutObservationWindow",
}
case 12:
{
- const char * const attrs2[] = { "lockoutDuration",
+ static const char * const attrs2[] = { "lockoutDuration",
"lockOutObservationWindow",
"lockoutThreshold",
NULL};
}
case 13:
{
- const char * const attrs2[] = { "modifiedCount",
+ static const char * const attrs2[] = { "modifiedCount",
"creationTime",
NULL };
attrs = attrs2;
switch (r->in.level) {
case 1:
{
- const char * const attrs2[] = {"sAMAccountName", "displayName",
+ static const char * const attrs2[] = {"sAMAccountName", "displayName",
"primaryGroupID", "description",
"comment", NULL};
attrs = attrs2;
}
case 2:
{
- const char * const attrs2[] = {"comment", "countryCode", "codePage", NULL};
+ static const char * const attrs2[] = {"comment", "countryCode", "codePage", NULL};
attrs = attrs2;
break;
}
case 3:
{
- const char * const attrs2[] = {"sAMAccountName",
+ static const char * const attrs2[] = {"sAMAccountName",
"displayName",
"objectSid",
"primaryGroupID",
}
case 4:
{
- const char * const attrs2[] = {"logonHours", NULL};
+ static const char * const attrs2[] = {"logonHours", NULL};
attrs = attrs2;
break;
}
case 5:
{
- const char * const attrs2[] = {"sAMAccountName",
+ static const char * const attrs2[] = {"sAMAccountName",
"displayName",
"objectSid",
"primaryGroupID",
}
case 6:
{
- const char * const attrs2[] = {"sAMAccountName", "displayName", NULL};
+ static const char * const attrs2[] = {"sAMAccountName", "displayName", NULL};
attrs = attrs2;
break;
}
case 7:
{
- const char * const attrs2[] = {"sAMAccountName", NULL};
+ static const char * const attrs2[] = {"sAMAccountName", NULL};
attrs = attrs2;
break;
}
case 8:
{
- const char * const attrs2[] = {"displayName", NULL};
+ static const char * const attrs2[] = {"displayName", NULL};
attrs = attrs2;
break;
}
case 9:
{
- const char * const attrs2[] = {"primaryGroupID", NULL};
+ static const char * const attrs2[] = {"primaryGroupID", NULL};
attrs = attrs2;
break;
}
case 10:
{
- const char * const attrs2[] = {"homeDirectory", "homeDrive", NULL};
+ static const char * const attrs2[] = {"homeDirectory", "homeDrive", NULL};
attrs = attrs2;
break;
}
case 11:
{
- const char * const attrs2[] = {"scriptPath", NULL};
+ static const char * const attrs2[] = {"scriptPath", NULL};
attrs = attrs2;
break;
}
case 12:
{
- const char * const attrs2[] = {"profilePath", NULL};
+ static const char * const attrs2[] = {"profilePath", NULL};
attrs = attrs2;
break;
}
case 13:
{
- const char * const attrs2[] = {"description", NULL};
+ static const char * const attrs2[] = {"description", NULL};
attrs = attrs2;
break;
}
case 14:
{
- const char * const attrs2[] = {"userWorkstations", NULL};
+ static const char * const attrs2[] = {"userWorkstations", NULL};
attrs = attrs2;
break;
}
case 16:
{
- const char * const attrs2[] = {"userAccountControl", NULL};
+ static const char * const attrs2[] = {"userAccountControl", NULL};
attrs = attrs2;
break;
}
case 17:
{
- const char * const attrs2[] = {"accountExpires", NULL};
+ static const char * const attrs2[] = {"accountExpires", NULL};
attrs = attrs2;
break;
}
case 20:
{
- const char * const attrs2[] = {"userParameters", NULL};
+ static const char * const attrs2[] = {"userParameters", NULL};
attrs = attrs2;
break;
}
case 21:
{
- const char * const attrs2[] = {"lastLogon",
+ static const char * const attrs2[] = {"lastLogon",
"lastLogoff",
"pwdLastSet",
"accountExpires",
}
/* domain where the account is to be deleted */
- userman_domain = (const char*)mprGetThisPtr(eid, "domain");
+ userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain");
if (!userman_domain) {
ejsSetErrorMsg(eid, "domain property returns null pointer");
goto done;
}
/* domain where the user account is to be queried */
- userman_domain = (const char *)mprGetThisPtr(eid, "domain");
+ userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain");
if (userman_domain == NULL) {
ejsSetErrorMsg(eid, "domain property returns null pointer");
return -1;
struct ldb_result *r;
const struct ldb_val *utdv_val1;
struct replUpToDateVectorBlob utdv1;
- const char *attrs[] = {
+ static const char *attrs[] = {
"uSNChanged",
"replUpToDateVector",
"description",
static bool test_conflict_same_owner(struct torture_context *tctx,
struct test_wrepl_conflict_conn *ctx)
{
- bool ret = true;
+ static bool ret = true;
struct nbt_name name;
struct wrepl_wins_name wins_name1;
struct wrepl_wins_name wins_name2;
const struct torture_ui_ops *ui_ops;
char **argv_new;
poptContext pc;
- const char *target = "other";
+ static const char *target = "other";
NTSTATUS status;
int shell = false;
- const char *ui_ops_name = "simple";
+ static const char *ui_ops_name = "simple";
const char *basedir = NULL;
const char *extra_module = NULL;
- int list_tests = 0;
+ static int list_tests = 0;
enum {OPT_LOADFILE=1000,OPT_UNCLIST,OPT_TIMELIMIT,OPT_DNS, OPT_LIST,
OPT_DANGEROUS,OPT_SMB_PORTS,OPT_ASYNC,OPT_NUMPROGS};
int main(int argc, const char **argv)
{
- const char *helper_protocol;
+ static const char *helper_protocol;
int opt;
poptContext pc;
int main(int argc, const char *argv[])
{
- bool silent_mode = false;
+ static bool silent_mode = false;
int ret = 0;
poptContext pc;
/*
- int show_all_parameters = 0;
- char *new_local_machine = NULL;
+ static int show_all_parameters = 0;
+ static char *new_local_machine = NULL;
*/
- const char *section_name = NULL;
- char *parameter_name = NULL;
- const char *cname = NULL;
- const char *caddr = NULL;
- bool show_defaults = false;
+ static const char *section_name = NULL;
+ static char *parameter_name = NULL;
+ static const char *cname;
+ static const char *caddr;
+ static bool show_defaults = false;
struct loadparm_context *lp_ctx;
struct poptOption long_options[] = {