summaryrefslogtreecommitdiffstats
path: root/source/winbindd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-10 11:30:37 -0800
committerJeremy Allison <jra@samba.org>2007-12-10 11:30:37 -0800
commit52dc5eaef2106015b3a8b659e818bdb15ad94b05 (patch)
tree4ccb94b3b6f5e061c13bef9a8284637ccadcf8f6 /source/winbindd
parente81629339589e2e7f464b3dca55730ff2d0877e4 (diff)
downloadsamba-52dc5eaef2106015b3a8b659e818bdb15ad94b05.tar.gz
samba-52dc5eaef2106015b3a8b659e818bdb15ad94b05.tar.xz
samba-52dc5eaef2106015b3a8b659e818bdb15ad94b05.zip
Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy.
Diffstat (limited to 'source/winbindd')
-rw-r--r--source/winbindd/idmap.c2
-rw-r--r--source/winbindd/winbindd.c8
-rw-r--r--source/winbindd/winbindd_cm.c2
-rw-r--r--source/winbindd/winbindd_dual.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/source/winbindd/idmap.c b/source/winbindd/idmap.c
index d2c13ab8b73..af8ec17b4e1 100644
--- a/source/winbindd/idmap.c
+++ b/source/winbindd/idmap.c
@@ -333,7 +333,7 @@ NTSTATUS idmap_init(void)
DEBUG(0, ("WARNING: idmap backend uses obsolete"
" and deprecated 'idmap_' prefix.\n"
"Please replace 'idmap_%s' by '%s' in"
- " %s\n", q, q, dyn_CONFIGFILE));
+ " %s\n", q, q, get_dyn_CONFIGFILE()));
compat_backend = talloc_strdup(idmap_ctx, q);
} else {
compat_backend = talloc_strdup(idmap_ctx,
diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index 53571d60026..598ec8e4285 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -63,13 +63,13 @@ static bool reload_services_file(void)
if (lp_loaded()) {
const char *fname = lp_configfile();
- if (file_exist(fname,NULL) && !strcsequal(fname,dyn_CONFIGFILE)) {
- strlcpy(dyn_CONFIGFILE,fname,sizeof(dyn_CONFIGFILE));
+ if (file_exist(fname,NULL) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
+ set_dyn_CONFIGFILE(fname);
}
}
reopen_logs();
- ret = lp_load(dyn_CONFIGFILE,False,False,True,True);
+ ret = lp_load(get_dyn_CONFIGFILE(),False,False,True,True);
reopen_logs();
load_interfaces();
@@ -1088,7 +1088,7 @@ int main(int argc, char **argv, char **envp)
if (!override_logfile) {
char *logfile = NULL;
if (asprintf(&logfile,"%s/log.winbindd",
- dyn_LOGFILEBASE) > 0) {
+ get_dyn_LOGFILEBASE()) > 0) {
lp_set_logfile(logfile);
SAFE_FREE(logfile);
}
diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index b64937da23b..3f6544965d0 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -209,7 +209,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain)
if (!override_logfile) {
char *logfile;
- if (asprintf(&logfile, "%s/log.winbindd-dc-connect", dyn_LOGFILEBASE) > 0) {
+ if (asprintf(&logfile, "%s/log.winbindd-dc-connect", get_dyn_LOGFILEBASE()) > 0) {
lp_set_logfile(logfile);
SAFE_FREE(logfile);
reopen_logs();
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 91e60cca36e..1e76c12d4bb 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -472,12 +472,12 @@ void setup_domain_child(struct winbindd_domain *domain,
{
if (explicit_logfile != NULL) {
if (asprintf(&child->logfilename, "%s/log.winbindd-%s",
- dyn_LOGFILEBASE, explicit_logfile) < 0) {
+ get_dyn_LOGFILEBASE(), explicit_logfile) < 0) {
smb_panic("Internal error: asprintf failed");
}
} else if (domain != NULL) {
if (asprintf(&child->logfilename, "%s/log.wb-%s",
- dyn_LOGFILEBASE, domain->name) < 0) {
+ get_dyn_LOGFILEBASE(), domain->name) < 0) {
smb_panic("Internal error: asprintf failed");
}
} else {