summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/auth.c2
-rw-r--r--source4/auth/gensec/cyrus_sasl.c2
-rw-r--r--source4/auth/gensec/schannel_sign.c8
-rw-r--r--source4/client/cifsdd.c4
-rw-r--r--source4/cluster/ctdb/brlock_ctdb.c2
-rw-r--r--source4/cluster/ctdb/tools/ctdb.c2
-rw-r--r--source4/dsdb/repl/drepl_partitions.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/local_password.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/naming_fsmo.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/pdc_fsmo.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/ranged_results.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_fsmo.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c2
-rw-r--r--source4/dsdb/schema/schema_init.c2
-rw-r--r--source4/heimdal/kdc/digest.c2
-rw-r--r--source4/lib/ldb/common/ldb.c2
-rw-r--r--source4/lib/ldb/ldb_map/ldb_map.c6
-rw-r--r--source4/lib/ldb/modules/paged_searches.c2
-rw-r--r--source4/lib/replace/inet_ntop.c2
-rw-r--r--source4/lib/replace/inet_pton.c4
-rw-r--r--source4/lib/replace/timegm.c2
-rw-r--r--source4/libcli/ldap/ldap_bind.c2
-rw-r--r--source4/libnet/libnet_become_dc.c32
-rw-r--r--source4/libnet/libnet_unbecome_dc.c6
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c4
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c54
-rw-r--r--source4/scripting/ejs/ejsnet/net_user.c4
-rw-r--r--source4/torture/ldap/uptodatevector.c2
-rw-r--r--source4/torture/nbt/winsreplication.c2
-rw-r--r--source4/torture/smbtorture.c6
-rw-r--r--source4/utils/ntlm_auth.c2
-rw-r--r--source4/utils/testparm.c16
37 files changed, 103 insertions, 103 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c
index 918890b3f6..708e2f8d73 100644
--- a/source4/auth/auth.c
+++ b/source4/auth/auth.c
@@ -500,7 +500,7 @@ const struct auth_operations *auth_backend_byname(const char *name)
*/
const struct auth_critical_sizes *auth_interface_version(void)
{
- static const struct auth_critical_sizes critical_sizes = {
+ const static struct auth_critical_sizes critical_sizes = {
AUTH_INTERFACE_VERSION,
sizeof(struct auth_operations),
sizeof(struct auth_method_context),
diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c
index 64a0b2f0c7..331499a466 100644
--- a/source4/auth/gensec/cyrus_sasl.c
+++ b/source4/auth/gensec/cyrus_sasl.c
@@ -365,7 +365,7 @@ NTSTATUS gensec_sasl_init(void)
int sasl_ret, i;
const char **sasl_mechs;
- static const sasl_callback_t callbacks[] = {
+ const sasl_callback_t callbacks[] = {
{
.id = SASL_CB_LOG,
.proc = gensec_sasl_log,
diff --git a/source4/auth/gensec/schannel_sign.c b/source4/auth/gensec/schannel_sign.c
index 1e57beba08..71ac0cc933 100644
--- a/source4/auth/gensec/schannel_sign.c
+++ b/source4/auth/gensec/schannel_sign.c
@@ -113,7 +113,7 @@ NTSTATUS schannel_unseal_packet(struct gensec_security *gensec_security,
uint8_t confounder[8];
uint8_t seq_num[8];
uint8_t sealing_key[16];
- static const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
+ const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
if (sig->length != 32) {
return NT_STATUS_ACCESS_DENIED;
@@ -162,7 +162,7 @@ NTSTATUS schannel_check_packet(struct gensec_security *gensec_security,
uint8_t digest_final[16];
uint8_t seq_num[8];
- static const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
+ 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) {
@@ -212,7 +212,7 @@ NTSTATUS schannel_seal_packet(struct gensec_security *gensec_security,
uint8_t confounder[8];
uint8_t seq_num[8];
uint8_t sealing_key[16];
- static const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
+ const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
generate_random_buffer(confounder, 8);
@@ -258,7 +258,7 @@ NTSTATUS schannel_sign_packet(struct gensec_security *gensec_security,
uint8_t digest_final[16];
uint8_t seq_num[8];
- static const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
+ const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
RSIVAL(seq_num, 0, state->seq_num);
SIVAL(seq_num, 4, state->initiator?0x80:0);
diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c
index 08c152c3a5..c692aa1bc3 100644
--- a/source4/client/cifsdd.c
+++ b/source4/client/cifsdd.c
@@ -59,7 +59,7 @@ static void dd_handle_signal(int sig)
static const char * argtype_str(enum argtype arg_type)
{
- static const struct {
+ const struct {
enum argtype arg_type;
const char * arg_name;
} names [] =
@@ -295,7 +295,7 @@ static void cifsdd_help_message(poptContext pctx,
const char * parg,
void * pdata)
{
- static const char notes[] =
+ const char notes[] =
"FILE can be a local filename or a UNC path of the form //server/share/path.\n";
char prefix[24];
diff --git a/source4/cluster/ctdb/brlock_ctdb.c b/source4/cluster/ctdb/brlock_ctdb.c
index c38d666c3c..1b22c6c727 100644
--- a/source4/cluster/ctdb/brlock_ctdb.c
+++ b/source4/cluster/ctdb/brlock_ctdb.c
@@ -102,7 +102,7 @@ static void show_locks(const char *op, struct lock_struct *locks, int count)
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,
+static struct brl_context *brl_ctdb_init(TALLOC_CTX *mem_ctx, struct server_id server, struct loadparm_context *lp_ctx,
struct messaging_context *messaging_ctx)
{
struct ctdb_context *ctdb = talloc_get_type(cluster_backend_handle(),
diff --git a/source4/cluster/ctdb/tools/ctdb.c b/source4/cluster/ctdb/tools/ctdb.c
index 2308261d00..7d25c068bc 100644
--- a/source4/cluster/ctdb/tools/ctdb.c
+++ b/source4/cluster/ctdb/tools/ctdb.c
@@ -241,7 +241,7 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
printf("Number of nodes:%d\n", nodemap->num);
for(i=0;i<nodemap->num;i++){
- static const struct {
+ const struct {
uint32_t flag;
const char *name;
} flag_names[] = {
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index 8c0d8e5897..70224152eb 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -40,7 +40,7 @@ WERROR dreplsrv_load_partitions(struct dreplsrv_service *s)
struct ldb_dn *basedn;
struct ldb_result *r;
struct ldb_message_element *el;
- static const char *attrs[] = { "namingContexts", NULL };
+ const char *attrs[] = { "namingContexts", NULL };
uint32_t i;
int ret;
@@ -188,7 +188,7 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
struct ldb_result *r;
uint32_t i;
int ret;
- static const char *attrs[] = {
+ const char *attrs[] = {
"objectSid",
"objectGUID",
"replUpToDateVector",
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 97130495a3..9a05c866c5 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -408,7 +408,7 @@ static int kludge_acl_init(struct ldb_module *module)
{
int ret, i;
TALLOC_CTX *mem_ctx = talloc_new(module);
- static const char *attrs[] = { "passwordAttribute", NULL };
+ const char *attrs[] = { "passwordAttribute", NULL };
struct ldb_result *res;
struct ldb_message *msg;
struct ldb_message_element *password_attributes;
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index 350434df51..bbbbbd71c8 100644
--- a/source4/dsdb/samdb/ldb_modules/local_password.c
+++ b/source4/dsdb/samdb/ldb_modules/local_password.c
@@ -378,7 +378,7 @@ static int get_self_callback(struct ldb_context *ldb, void *context, struct ldb_
static int local_password_mod_search_self(struct ldb_handle *h) {
struct lpdb_context *ac;
- static const char * const attrs[] = { "objectGUID", "objectClass", NULL };
+ const char * const attrs[] = { "objectGUID", "objectClass", NULL };
ac = talloc_get_type(h->private_data, struct lpdb_context);
diff --git a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
index d6b6a24287..41d35dffc1 100644
--- a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
@@ -38,7 +38,7 @@ static int naming_fsmo_init(struct ldb_module *module)
struct dsdb_naming_fsmo *naming_fsmo;
struct ldb_result *naming_res;
int ret;
- static const char *naming_attrs[] = {
+ const char *naming_attrs[] = {
"fSMORoleOwner",
NULL
};
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index da5cae1c65..44a940f97b 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -361,7 +361,7 @@ static int fix_attributes(struct ldb_context *ldb, const struct dsdb_schema *sch
static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
{
- static const char * const attrs[] = { NULL };
+ const char * const attrs[] = { NULL };
struct ldb_handle *h;
struct oc_context *ac;
@@ -748,7 +748,7 @@ static int objectclass_search_self(struct ldb_handle *h)
{
int ret;
struct oc_context *ac;
- static const char * const attrs[] = { "objectClass", NULL };
+ const char * const attrs[] = { "objectClass", NULL };
ac = talloc_get_type(h->private_data, struct oc_context);
@@ -865,7 +865,7 @@ static int objectclass_do_mod(struct ldb_handle *h) {
static int objectclass_rename(struct ldb_module *module, struct ldb_request *req)
{
- static const char * const attrs[] = { NULL };
+ const char * const attrs[] = { NULL };
struct ldb_handle *h;
struct oc_context *ac;
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index d139cc23a4..03c2bbc7ae 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -1198,7 +1198,7 @@ static int build_domain_data_request(struct ph_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 */
- static const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
+ const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
char *filter;
ac->dom_req = talloc_zero(ac, struct ldb_request);
@@ -1662,7 +1662,7 @@ static int get_self_callback(struct ldb_context *ldb, void *context, struct ldb_
static int password_hash_mod_search_self(struct ldb_handle *h) {
struct ph_context *ac;
- static const char * const attrs[] = { "userAccountControl", "lmPwdHistory",
+ const char * const attrs[] = { "userAccountControl", "lmPwdHistory",
"ntPwdHistory",
"objectSid", "msDS-KeyVersionNumber",
"objectClass", "userPrincipalName",
diff --git a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
index 0f3293ed1d..d27b0c12f7 100644
--- a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
@@ -37,7 +37,7 @@ static int pdc_fsmo_init(struct ldb_module *module)
struct dsdb_pdc_fsmo *pdc_fsmo;
struct ldb_result *pdc_res;
int ret;
- static const char *pdc_attrs[] = {
+ const char *pdc_attrs[] = {
"fSMORoleOwner",
NULL
};
diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c
index affc01d413..345b8b8440 100644
--- a/source4/dsdb/samdb/ldb_modules/ranged_results.c
+++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c
@@ -40,7 +40,7 @@ static int rr_search_callback(struct ldb_context *ldb, void *context, struct ldb
{
struct rr_context *rr_context = talloc_get_type(context, struct rr_context);
struct ldb_request *orig_req = rr_context->orig_req;
- int i, j, ret;
+ int i, j;
if (ares->type != LDB_REPLY_ENTRY) {
return rr_context->orig_req->callback(ldb, rr_context->orig_req->context, ares);
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 497ee373de..b37ac49b28 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1519,7 +1519,7 @@ static int replmd_replicated_uptodate_search_callback(struct ldb_context *ldb,
static int replmd_replicated_uptodate_search(struct replmd_replicated_request *ar)
{
int ret;
- static const char *attrs[] = {
+ const char *attrs[] = {
"replUpToDateVector",
"repsFrom",
NULL
diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c
index 525193ac8c..5c7b72c12c 100644
--- a/source4/dsdb/samdb/ldb_modules/schema.c
+++ b/source4/dsdb/samdb/ldb_modules/schema.c
@@ -235,7 +235,7 @@ struct schema_attribute **schema_get_attrs_list(struct ldb_module *module,
static int schema_init_attrs(struct ldb_module *module, struct schema_private_data *data)
{
- static const char *schema_attrs[] = { "attributeID",
+ const char *schema_attrs[] = { "attributeID",
"lDAPDisplayName",
"attributeSyntax",
"oMSyntax",
@@ -1156,7 +1156,7 @@ static int schema_wait(struct ldb_handle *handle, enum ldb_wait_type type)
static int schema_init(struct ldb_module *module)
{
- static const char *schema_attrs[] = { "schemaNamingContext", NULL };
+ const char *schema_attrs[] = { "schemaNamingContext", NULL };
struct schema_private_data *data;
struct ldb_result *res;
int ret;
diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
index 559c91bd2d..ade576ac99 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
@@ -46,7 +46,7 @@ static int schema_fsmo_init(struct ldb_module *module)
struct ldb_result *c_res;
uint32_t i;
int ret;
- static const char *schema_attrs[] = {
+ const char *schema_attrs[] = {
"prefixMap",
"schemaInfo",
"fSMORoleOwner",
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index 7efcccc9ff..a5a3ba6aef 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -752,7 +752,7 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
entryuuid_private->base_dns &&
entryuuid_private->base_dns[i];
i++) {
- static const char *contextCSN_attr[] = {
+ const char *contextCSN_attr[] = {
"contextCSN", NULL
};
search_req = talloc(req, struct ldb_request);
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index f15b03c9b4..3d17d2746e 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -1062,7 +1062,7 @@ int dsdb_set_schema(struct ldb_context *ldb, struct dsdb_schema *schema)
/**
* Global variable to hold one copy of the schema, used to avoid memory bloat
*/
-static struct dsdb_schema *global_schema;
+static const struct dsdb_schema *global_schema;
/**
* Make this ldb use the 'global' schema, setup to avoid having multiple copies in this process
diff --git a/source4/heimdal/kdc/digest.c b/source4/heimdal/kdc/digest.c
index 358ca5ad56..a87371de25 100644
--- a/source4/heimdal/kdc/digest.c
+++ b/source4/heimdal/kdc/digest.c
@@ -726,7 +726,7 @@ _kdc_do_digest(krb5_context context,
/* conf|int */
if (strcmp(ireq.u.digestRequest.digest, "clear") != 0) {
- static char conf_zeros[] = ":00000000000000000000000000000000";
+ const char conf_zeros[] = ":00000000000000000000000000000000";
MD5_Update(&ctx, conf_zeros, sizeof(conf_zeros) - 1);
}
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 87f791cb38..ab4abe6701 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -162,7 +162,7 @@ void ldb_set_default_dns(struct ldb_context *ldb)
int ret;
struct ldb_result *res;
struct ldb_dn *tmp_dn=NULL;
- static const char *attrs[] = {
+ const char *attrs[] = {
"rootDomainNamingContext",
"configurationNamingContext",
"schemaNamingContext",
diff --git a/source4/lib/ldb/ldb_map/ldb_map.c b/source4/lib/ldb/ldb_map/ldb_map.c
index 39df427c2c..87f5f25392 100644
--- a/source4/lib/ldb/ldb_map/ldb_map.c
+++ b/source4/lib/ldb/ldb_map/ldb_map.c
@@ -867,7 +867,7 @@ static int map_objectclass_convert_operator(struct ldb_module *module, void *mem
struct ldb_parse_tree **new, const struct ldb_parse_tree *tree)
{
- static const struct ldb_map_attribute objectclass_map = {
+ const struct ldb_map_attribute objectclass_map = {
.local_name = "objectClass",
.type = MAP_CONVERT,
.u = {
@@ -956,7 +956,7 @@ struct ldb_request *map_search_self_req(struct map_context *ac, struct ldb_dn *d
/* 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 */
- static const char * const attrs[] = { IS_MAPPED, NULL };
+ const char * const attrs[] = { IS_MAPPED, NULL };
struct ldb_parse_tree *tree;
/* Limit search to records with 'IS_MAPPED' present */
@@ -1242,7 +1242,7 @@ static const struct ldb_map_attribute builtin_attribute_maps[] = {
* base DNs in private data. */
static int map_init_dns(struct ldb_module *module, struct ldb_map_context *data, const char *name)
{
- static const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
+ const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
struct ldb_dn *dn;
struct ldb_message *msg;
struct ldb_result *res;
diff --git a/source4/lib/ldb/modules/paged_searches.c b/source4/lib/ldb/modules/paged_searches.c
index 749858b49b..69ce219362 100644
--- a/source4/lib/ldb/modules/paged_searches.c
+++ b/source4/lib/ldb/modules/paged_searches.c
@@ -407,7 +407,7 @@ static int check_supported_paged(struct ldb_context *ldb, void *context,
static int ps_init(struct ldb_module *module)
{
- static const char *attrs[] = { "supportedControl", NULL };
+ const char *attrs[] = { "supportedControl", NULL };
struct private_data *data;
int ret;
struct ldb_request *req;
diff --git a/source4/lib/replace/inet_ntop.c b/source4/lib/replace/inet_ntop.c
index fb3d8e90c8..1b84cda6f0 100644
--- a/source4/lib/replace/inet_ntop.c
+++ b/source4/lib/replace/inet_ntop.c
@@ -74,7 +74,7 @@ rep_inet_ntop(int af, const void *src, char *dst, socklen_t size)
static const char *
inet_ntop4(const unsigned char *src, char *dst, socklen_t size)
{
- static const char *fmt = "%u.%u.%u.%u";
+ const char *fmt = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
size_t len;
diff --git a/source4/lib/replace/inet_pton.c b/source4/lib/replace/inet_pton.c
index 80e4865ef4..ea0fe6b78c 100644
--- a/source4/lib/replace/inet_pton.c
+++ b/source4/lib/replace/inet_pton.c
@@ -77,7 +77,7 @@ inet_pton4(src, dst)
const char *src;
unsigned char *dst;
{
- static const char digits[] = "0123456789";
+ const char digits[] = "0123456789";
int saw_digit, octets, ch;
unsigned char tmp[NS_INADDRSZ], *tp;
@@ -131,7 +131,7 @@ inet_pton6(src, dst)
const char *src;
unsigned char *dst;
{
- static const char xdigits_l[] = "0123456789abcdef",
+ const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
diff --git a/source4/lib/replace/timegm.c b/source4/lib/replace/timegm.c
index 395c684e11..86f360bd3c 100644
--- a/source4/lib/replace/timegm.c
+++ b/source4/lib/replace/timegm.c
@@ -46,7 +46,7 @@ static int is_leap(unsigned y)
time_t rep_timegm(struct tm *tm)
{
- static const unsigned ndays[2][12] ={
+ 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;
diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c
index fd15ff2fc7..264a6b39ee 100644
--- a/source4/libcli/ldap/ldap_bind.c
+++ b/source4/libcli/ldap/ldap_bind.c
@@ -215,7 +215,7 @@ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
const char **sasl_names;
uint32_t old_gensec_features;
- static const char *supported_sasl_mech_attrs[] = {
+ const char *supported_sasl_mech_attrs[] = {
"supportedSASLMechanisms",
NULL
};
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 4d09422bec..576c86f3e6 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -809,7 +809,7 @@ static NTSTATUS becomeDC_ldap1_rootdse(struct libnet_BecomeDC_state *s)
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- static const char *attrs[] = {
+ const char *attrs[] = {
"*",
NULL
};
@@ -853,7 +853,7 @@ static NTSTATUS becomeDC_ldap1_crossref_behavior_version(struct libnet_BecomeDC_
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- static const char *attrs[] = {
+ const char *attrs[] = {
"msDs-Behavior-Version",
NULL
};
@@ -882,7 +882,7 @@ static NTSTATUS becomeDC_ldap1_domain_behavior_version(struct libnet_BecomeDC_st
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- static const char *attrs[] = {
+ const char *attrs[] = {
"msDs-Behavior-Version",
NULL
};
@@ -911,7 +911,7 @@ static NTSTATUS becomeDC_ldap1_schema_object_version(struct libnet_BecomeDC_stat
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- static const char *attrs[] = {
+ const char *attrs[] = {
"objectVersion",
NULL
};
@@ -940,7 +940,7 @@ static NTSTATUS becomeDC_ldap1_w2k3_update_revision(struct libnet_BecomeDC_state
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- static const char *attrs[] = {
+ const char *attrs[] = {
"revision",
NULL
};
@@ -976,19 +976,19 @@ static NTSTATUS becomeDC_ldap1_infrastructure_fsmo(struct libnet_BecomeDC_state
struct ldb_dn *basedn;
struct ldb_dn *ntds_dn;
struct ldb_dn *server_dn;
- static const char *_1_1_attrs[] = {
+ const char *_1_1_attrs[] = {
"1.1",
NULL
};
- static const char *fsmo_attrs[] = {
+ const char *fsmo_attrs[] = {
"fSMORoleOwner",
NULL
};
- static const char *dns_attrs[] = {
+ const char *dns_attrs[] = {
"dnsHostName",
NULL
};
- static const char *guid_attrs[] = {
+ const char *guid_attrs[] = {
"objectGUID",
NULL
};
@@ -1074,19 +1074,19 @@ static NTSTATUS becomeDC_ldap1_rid_manager_fsmo(struct libnet_BecomeDC_state *s)
const char *reference_dn_str;
struct ldb_dn *ntds_dn;
struct ldb_dn *server_dn;
- static const char *rid_attrs[] = {
+ const char *rid_attrs[] = {
"rIDManagerReference",
NULL
};
- static const char *fsmo_attrs[] = {
+ const char *fsmo_attrs[] = {
"fSMORoleOwner",
NULL
};
- static const char *dns_attrs[] = {
+ const char *dns_attrs[] = {
"dnsHostName",
NULL
};
- static const char *guid_attrs[] = {
+ const char *guid_attrs[] = {
"objectGUID",
NULL
};
@@ -1212,7 +1212,7 @@ static NTSTATUS becomeDC_ldap1_computer_object(struct libnet_BecomeDC_state *s)
struct ldb_result *r;
struct ldb_dn *basedn;
char *filter;
- static const char *attrs[] = {
+ const char *attrs[] = {
"distinguishedName",
"userAccountControl",
NULL
@@ -1306,7 +1306,7 @@ static NTSTATUS becomeDC_ldap1_server_object_2(struct libnet_BecomeDC_state *s)
struct ldb_result *r;
struct ldb_dn *basedn;
const char *server_reference_bl_dn_str;
- static const char *attrs[] = {
+ const char *attrs[] = {
"serverReferenceBL",
NULL
};
@@ -2852,7 +2852,7 @@ static NTSTATUS becomeDC_ldap2_move_computer(struct libnet_BecomeDC_state *s)
struct ldb_dn *basedn;
struct ldb_dn *old_dn;
struct ldb_dn *new_dn;
- static const char *_1_1_attrs[] = {
+ const char *_1_1_attrs[] = {
"1.1",
NULL
};
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index 415912e34d..1ab5645a98 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -326,7 +326,7 @@ static NTSTATUS unbecomeDC_ldap_rootdse(struct libnet_UnbecomeDC_state *s)
int ret;
struct ldb_result *r;
struct ldb_dn *basedn;
- static const char *attrs[] = {
+ const char *attrs[] = {
"defaultNamingContext",
"configurationNamingContext",
NULL
@@ -370,7 +370,7 @@ static NTSTATUS unbecomeDC_ldap_computer_object(struct libnet_UnbecomeDC_state *
struct ldb_result *r;
struct ldb_dn *basedn;
char *filter;
- static const char *attrs[] = {
+ const char *attrs[] = {
"distinguishedName",
"userAccountControl",
NULL
@@ -451,7 +451,7 @@ static NTSTATUS unbecomeDC_ldap_move_computer(struct libnet_UnbecomeDC_state *s)
struct ldb_dn *basedn;
struct ldb_dn *old_dn;
struct ldb_dn *new_dn;
- static const char *_1_1_attrs[] = {
+ const char *_1_1_attrs[] = {
"1.1",
NULL
};
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index a97b93a051..9142495a8a 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -41,10 +41,10 @@ static WERROR dcesrv_drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_C
struct GUID site_guid;
struct ldb_result *site_res;
struct ldb_dn *server_site_dn;
- static const char *site_attrs[] = { "objectGUID", NULL };
+ const char *site_attrs[] = { "objectGUID", NULL };
struct ldb_result *ntds_res;
struct ldb_dn *ntds_dn;
- static const char *ntds_attrs[] = { "ms-DS-ReplicationEpoch", NULL };
+ const char *ntds_attrs[] = { "ms-DS-ReplicationEpoch", NULL };
uint32_t u1;
uint32_t repl_epoch;
int ret;
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 03f3601257..a0bd34b154 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -749,7 +749,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
switch (r->in.level) {
case 1:
{
- static const char * const attrs2[] = { "minPwdLength", "pwdHistoryLength",
+ const char * const attrs2[] = { "minPwdLength", "pwdHistoryLength",
"pwdProperties", "maxPwdAge",
"minPwdAge", NULL };
attrs = attrs2;
@@ -757,7 +757,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
}
case 2:
{
- static const char * const attrs2[] = {"forceLogoff",
+ const char * const attrs2[] = {"forceLogoff",
"comment",
"modifiedCount",
"fSMORoleOwner",
@@ -767,14 +767,14 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
}
case 3:
{
- static const char * const attrs2[] = {"forceLogoff",
+ const char * const attrs2[] = {"forceLogoff",
NULL};
attrs = attrs2;
break;
}
case 4:
{
- static const char * const attrs2[] = {"comment",
+ const char * const attrs2[] = {"comment",
NULL};
attrs = attrs2;
break;
@@ -786,7 +786,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
}
case 6:
{
- static const char * const attrs2[] = {"fSMORoleOwner",
+ const char * const attrs2[] = {"fSMORoleOwner",
NULL};
attrs = attrs2;
break;
@@ -798,7 +798,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
}
case 8:
{
- static const char * const attrs2[] = { "modifiedCount",
+ const char * const attrs2[] = { "modifiedCount",
"creationTime",
NULL };
attrs = attrs2;
@@ -809,7 +809,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
break;
case 11:
{
- static const char * const attrs2[] = { "comment", "forceLogoff",
+ const char * const attrs2[] = { "comment", "forceLogoff",
"modifiedCount",
"lockoutDuration",
"lockOutObservationWindow",
@@ -820,7 +820,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
}
case 12:
{
- static const char * const attrs2[] = { "lockoutDuration",
+ const char * const attrs2[] = { "lockoutDuration",
"lockOutObservationWindow",
"lockoutThreshold",
NULL};
@@ -829,7 +829,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
}
case 13:
{
- static const char * const attrs2[] = { "modifiedCount",
+ const char * const attrs2[] = { "modifiedCount",
"creationTime",
NULL };
attrs = attrs2;
@@ -2944,7 +2944,7 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
switch (r->in.level) {
case 1:
{
- static const char * const attrs2[] = {"sAMAccountName", "displayName",
+ const char * const attrs2[] = {"sAMAccountName", "displayName",
"primaryGroupID", "description",
"comment", NULL};
attrs = attrs2;
@@ -2952,13 +2952,13 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
}
case 2:
{
- static const char * const attrs2[] = {"comment", "countryCode", "codePage", NULL};
+ const char * const attrs2[] = {"comment", "countryCode", "codePage", NULL};
attrs = attrs2;
break;
}
case 3:
{
- static const char * const attrs2[] = {"sAMAccountName",
+ const char * const attrs2[] = {"sAMAccountName",
"displayName",
"objectSid",
"primaryGroupID",
@@ -2979,13 +2979,13 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
}
case 4:
{
- static const char * const attrs2[] = {"logonHours", NULL};
+ const char * const attrs2[] = {"logonHours", NULL};
attrs = attrs2;
break;
}
case 5:
{
- static const char * const attrs2[] = {"sAMAccountName",
+ const char * const attrs2[] = {"sAMAccountName",
"displayName",
"objectSid",
"primaryGroupID",
@@ -3009,79 +3009,79 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
}
case 6:
{
- static const char * const attrs2[] = {"sAMAccountName", "displayName", NULL};
+ const char * const attrs2[] = {"sAMAccountName", "displayName", NULL};
attrs = attrs2;
break;
}
case 7:
{
- static const char * const attrs2[] = {"sAMAccountName", NULL};
+ const char * const attrs2[] = {"sAMAccountName", NULL};
attrs = attrs2;
break;
}
case 8:
{
- static const char * const attrs2[] = {"displayName", NULL};
+ const char * const attrs2[] = {"displayName", NULL};
attrs = attrs2;
break;
}
case 9:
{
- static const char * const attrs2[] = {"primaryGroupID", NULL};
+ const char * const attrs2[] = {"primaryGroupID", NULL};
attrs = attrs2;
break;
}
case 10:
{
- static const char * const attrs2[] = {"homeDirectory", "homeDrive", NULL};
+ const char * const attrs2[] = {"homeDirectory", "homeDrive", NULL};
attrs = attrs2;
break;
}
case 11:
{
- static const char * const attrs2[] = {"scriptPath", NULL};
+ const char * const attrs2[] = {"scriptPath", NULL};
attrs = attrs2;
break;
}
case 12:
{
- static const char * const attrs2[] = {"profilePath", NULL};
+ const char * const attrs2[] = {"profilePath", NULL};
attrs = attrs2;
break;
}
case 13:
{
- static const char * const attrs2[] = {"description", NULL};
+ const char * const attrs2[] = {"description", NULL};
attrs = attrs2;
break;
}
case 14:
{
- static const char * const attrs2[] = {"userWorkstations", NULL};
+ const char * const attrs2[] = {"userWorkstations", NULL};
attrs = attrs2;
break;
}
case 16:
{
- static const char * const attrs2[] = {"userAccountControl", NULL};
+ const char * const attrs2[] = {"userAccountControl", NULL};
attrs = attrs2;
break;
}
case 17:
{
- static const char * const attrs2[] = {"accountExpires", NULL};
+ const char * const attrs2[] = {"accountExpires", NULL};
attrs = attrs2;
break;
}
case 20:
{
- static const char * const attrs2[] = {"userParameters", NULL};
+ const char * const attrs2[] = {"userParameters", NULL};
attrs = attrs2;
break;
}
case 21:
{
- static const char * const attrs2[] = {"lastLogon",
+ const char * const attrs2[] = {"lastLogon",
"lastLogoff",
"pwdLastSet",
"accountExpires",
diff --git a/source4/scripting/ejs/ejsnet/net_user.c b/source4/scripting/ejs/ejsnet/net_user.c
index 34524cc0fa..4b0923216b 100644
--- a/source4/scripting/ejs/ejsnet/net_user.c
+++ b/source4/scripting/ejs/ejsnet/net_user.c
@@ -197,7 +197,7 @@ static int ejs_net_deleteuser(MprVarHandle eid, int argc, char **argv)
}
/* domain where the account is to be deleted */
- userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain");
+ userman_domain = (const char*)mprGetThisPtr(eid, "domain");
if (!userman_domain) {
ejsSetErrorMsg(eid, "domain property returns null pointer");
goto done;
@@ -260,7 +260,7 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
}
/* domain where the user account is to be queried */
- userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain");
+ userman_domain = (const char *)mprGetThisPtr(eid, "domain");
if (userman_domain == NULL) {
ejsSetErrorMsg(eid, "domain property returns null pointer");
return -1;
diff --git a/source4/torture/ldap/uptodatevector.c b/source4/torture/ldap/uptodatevector.c
index 7bac04caf3..1f3018fc5e 100644
--- a/source4/torture/ldap/uptodatevector.c
+++ b/source4/torture/ldap/uptodatevector.c
@@ -47,7 +47,7 @@ static bool test_check_uptodatevector(struct torture_context *torture,
struct ldb_result *r;
const struct ldb_val *utdv_val1;
struct replUpToDateVectorBlob utdv1;
- static const char *attrs[] = {
+ const char *attrs[] = {
"uSNChanged",
"replUpToDateVector",
"description",
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index d96ed3e931..f0e09c75da 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -1008,7 +1008,7 @@ static bool test_wrepl_sgroup_merged(struct torture_context *tctx,
static bool test_conflict_same_owner(struct torture_context *tctx,
struct test_wrepl_conflict_conn *ctx)
{
- static bool ret = true;
+ bool ret = true;
struct nbt_name name;
struct wrepl_wins_name wins_name1;
struct wrepl_wins_name wins_name2;
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 371ddc7297..3c8976d8d0 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -517,13 +517,13 @@ int main(int argc,char *argv[])
const struct torture_ui_ops *ui_ops;
char **argv_new;
poptContext pc;
- static const char *target = "other";
+ const char *target = "other";
NTSTATUS status;
int shell = false;
- static const char *ui_ops_name = "simple";
+ const char *ui_ops_name = "simple";
const char *basedir = NULL;
const char *extra_module = NULL;
- static int list_tests = 0;
+ 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};
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 3144fe91b1..b85ddec7d0 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -1048,7 +1048,7 @@ enum {
int main(int argc, const char **argv)
{
- static const char *helper_protocol;
+ const char *helper_protocol;
int opt;
poptContext pc;
diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c
index a4ff522186..718daae908 100644
--- a/source4/utils/testparm.c
+++ b/source4/utils/testparm.c
@@ -172,18 +172,18 @@ static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, c
int main(int argc, const char *argv[])
{
- static bool silent_mode = false;
+ bool silent_mode = false;
int ret = 0;
poptContext pc;
/*
- static int show_all_parameters = 0;
- static char *new_local_machine = NULL;
+ int show_all_parameters = 0;
+ char *new_local_machine = NULL;
*/
- static const char *section_name = NULL;
- static char *parameter_name = NULL;
- static const char *cname;
- static const char *caddr;
- static bool show_defaults = false;
+ const char *section_name = NULL;
+ char *parameter_name = NULL;
+ const char *cname = NULL;
+ const char *caddr = NULL;
+ bool show_defaults = false;
struct loadparm_context *lp_ctx;
struct poptOption long_options[] = {