summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c13
-rw-r--r--source3/param/loadparm_ctx.c4
2 files changed, 17 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 79f1b236ca..1258709856 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -6419,6 +6419,19 @@ struct loadparm_service *lp_service(const char *pszServiceName)
return ServicePtrs[iService];
}
+struct loadparm_service *lp_servicebynum(int snum)
+{
+ if (snum = -1 || !LP_SNUM_OK(snum)) {
+ return NULL;
+ }
+ return ServicePtrs[snum];
+}
+
+struct loadparm_service *lp_default_loadparm_service()
+{
+ return &sDefault;
+}
+
/***************************************************************************
Copy a service structure to another.
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index 7362279f9b..7c59ca709a 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -30,6 +30,10 @@ static const struct loadparm_s3_context s3_fns =
.get_parm_struct = lp_get_parameter,
.get_parm_ptr = lp_parm_ptr,
.get_service = lp_service,
+ .get_servicebynum = lp_servicebynum,
+ .get_default_loadparm_service = lp_default_loadparm_service,
+ .get_numservices = lp_numservices,
+ .set_cmdline = lp_set_cmdline,
.server_role = lp_server_role,