summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-03-29 14:29:54 +1100
committerAndrew Tridgell <tridge@samba.org>2011-03-29 06:17:03 +0200
commit77cc1610e0b03e013ac478e8b9b874e73ac2e09a (patch)
treec8d810fac1479ed64655f35b46e7e5242e35f105 /source4/param
parent8d2d0ef0eb506f2be960f4b3abcbc4ae2a3730e7 (diff)
downloadsamba-77cc1610e0b03e013ac478e8b9b874e73ac2e09a.tar.gz
samba-77cc1610e0b03e013ac478e8b9b874e73ac2e09a.tar.bz2
samba-77cc1610e0b03e013ac478e8b9b874e73ac2e09a.zip
s4-param: set a default logfile
setup a logfile for when one is not specified in smb.conf Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index f69dfd18c5..93158f2c45 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -650,6 +650,7 @@ FN_GLOBAL_INTEGER(krb5_port, krb5_port)
FN_GLOBAL_INTEGER(kpasswd_port, kpasswd_port)
FN_GLOBAL_INTEGER(web_port, web_port)
FN_GLOBAL_BOOL(tls_enabled, tls_enabled)
+FN_GLOBAL_STRING(logfile, logfile)
FN_GLOBAL_STRING(share_backend, szShareBackend)
FN_GLOBAL_STRING(sam_url, szSAM_URL)
FN_GLOBAL_STRING(idmap_url, szIDMAP_URL)
@@ -2326,6 +2327,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
char *myname;
struct loadparm_context *lp_ctx;
struct parmlist_entry *parm;
+ char *logfile;
lp_ctx = talloc_zero(mem_ctx, struct loadparm_context);
if (lp_ctx == NULL)
@@ -2365,6 +2367,9 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
}
}
+ logfile = talloc_asprintf(lp_ctx, "%s/log.samba", dyn_LOGFILEBASE);
+ lpcfg_do_global_parameter(lp_ctx, "log file", logfile);
+ talloc_free(logfile);
lpcfg_do_global_parameter(lp_ctx, "log level", "0");