summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-20 00:02:15 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:52:06 +0100
commit0500b87092540d300b4e021a0fb95ce16a44fbd2 (patch)
treed8ff9774916e84dbc568f77edd4925b1f6b51735 /source4/dsdb/samdb
parent3e75f222bcdf114238cc4f2bcc61332dc059135f (diff)
downloadsamba-0500b87092540d300b4e021a0fb95ce16a44fbd2.tar.gz
samba-0500b87092540d300b4e021a0fb95ce16a44fbd2.tar.bz2
samba-0500b87092540d300b4e021a0fb95ce16a44fbd2.zip
r26540: Revert my previous commit after concerns raised by Andrew.
(This used to be commit 6ac86f8be7d9a8c5ab396a93e6d1e6819e11f173)
Diffstat (limited to 'source4/dsdb/samdb')
-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
11 files changed, 15 insertions, 15 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 9a05c866c5..97130495a3 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);
- 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;
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index bbbbbd71c8..350434df51 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;
- 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);
diff --git a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
index 41d35dffc1..d6b6a24287 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;
- const char *naming_attrs[] = {
+ static 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 44a940f97b..da5cae1c65 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)
{
- const char * const attrs[] = { NULL };
+ static 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;
- const char * const attrs[] = { "objectClass", NULL };
+ static 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)
{
- const char * const attrs[] = { NULL };
+ static 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 03c2bbc7ae..d139cc23a4 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 */
- 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);
@@ -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;
- const char * const attrs[] = { "userAccountControl", "lmPwdHistory",
+ static 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 d27b0c12f7..0f3293ed1d 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;
- const char *pdc_attrs[] = {
+ static 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 345b8b8440..affc01d413 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;
+ int i, j, ret;
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 b37ac49b28..497ee373de 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;
- const char *attrs[] = {
+ static 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 5c7b72c12c..525193ac8c 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)
{
- const char *schema_attrs[] = { "attributeID",
+ static 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)
{
- const char *schema_attrs[] = { "schemaNamingContext", NULL };
+ static 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 ade576ac99..559c91bd2d 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;
- const char *schema_attrs[] = {
+ static 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 a5a3ba6aef..7efcccc9ff 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++) {
- const char *contextCSN_attr[] = {
+ static const char *contextCSN_attr[] = {
"contextCSN", NULL
};
search_req = talloc(req, struct ldb_request);