summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-02 15:43:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-06 15:02:38 +1000
commitc091a92be51e8c14bf0b51ab83319fbcb704c91f (patch)
tree24e7f44491a9cf328e1622f46c2558d6476dedeb /source4/param
parent6bf88222cc00ac765929ed6e844552a9a776109a (diff)
downloadsamba-c091a92be51e8c14bf0b51ab83319fbcb704c91f.tar.gz
samba-c091a92be51e8c14bf0b51ab83319fbcb704c91f.tar.bz2
samba-c091a92be51e8c14bf0b51ab83319fbcb704c91f.zip
s4-param Remove 'sam database' parameter
This now just relies on the private dir parameter, which remains. Andrew Bartlett
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c4
-rw-r--r--source4/param/pyparam.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 15451c4bcf..b9b2677947 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -94,7 +94,6 @@ struct loadparm_global
char *szAutoServices;
char *szPasswdChat;
char *szShareBackend;
- char *szSAM_URL;
char *szIDMAP_URL;
char *szSECRETS_URL;
char *szSPOOLSS_URL;
@@ -372,7 +371,6 @@ static struct parm_struct parm_table[] = {
{"null passwords", P_BOOL, P_GLOBAL, GLOBAL_VAR(bNullPasswords), NULL, NULL},
{"obey pam restrictions", P_BOOL, P_GLOBAL, GLOBAL_VAR(bObeyPamRestrictions), NULL, NULL},
{"password server", P_LIST, P_GLOBAL, GLOBAL_VAR(szPasswordServers), NULL, NULL},
- {"sam database", P_STRING, P_GLOBAL, GLOBAL_VAR(szSAM_URL), NULL, NULL},
{"idmap database", P_STRING, P_GLOBAL, GLOBAL_VAR(szIDMAP_URL), NULL, NULL},
{"secrets database", P_STRING, P_GLOBAL, GLOBAL_VAR(szSECRETS_URL), NULL, NULL},
{"spoolss database", P_STRING, P_GLOBAL, GLOBAL_VAR(szSPOOLSS_URL), NULL, NULL},
@@ -655,7 +653,6 @@ 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)
FN_GLOBAL_STRING(secrets_url, szSECRETS_URL)
FN_GLOBAL_STRING(spoolss_url, szSPOOLSS_URL)
@@ -2437,7 +2434,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "auth methods:member server", "anonymous sam winbind");
lpcfg_do_global_parameter(lp_ctx, "auth methods:standalone", "anonymous sam_ignoredomain");
lpcfg_do_global_parameter(lp_ctx, "private dir", dyn_PRIVATE_DIR);
- lpcfg_do_global_parameter(lp_ctx, "sam database", "sam.ldb");
lpcfg_do_global_parameter(lp_ctx, "idmap database", "idmap.ldb");
lpcfg_do_global_parameter(lp_ctx, "secrets database", "secrets.ldb");
lpcfg_do_global_parameter(lp_ctx, "spoolss database", "spoolss.ldb");
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index 043d8261d4..998eb9d325 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -272,6 +272,12 @@ static PyObject *py_lp_dump(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+static PyObject *py_samdb_url(PyObject *self)
+{
+ struct loadparm_context *lp_ctx = PyLoadparmContext_AsLoadparmContext(self);
+ return PyString_FromFormat("tdb://%s/sam.ldb", lpcfg_private_dir(lp_ctx));
+}
+
static PyMethodDef py_lp_ctx_methods[] = {
{ "load", (PyCFunction)py_lp_ctx_load, METH_VARARGS,
@@ -298,6 +304,9 @@ static PyMethodDef py_lp_ctx_methods[] = {
"S.services() -> list" },
{ "dump", (PyCFunction)py_lp_dump, METH_VARARGS,
"S.dump(stream, show_defaults=False)" },
+ { "samdb_url", (PyCFunction)py_samdb_url, METH_NOARGS,
+ "S.samdb_url() -> string\n"
+ "Returns the current URL for sam.ldb." },
{ NULL }
};