From 0e4a4c8b19c9962fc8cbdb407ccd7e9a3e7bc536 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 12 Jul 2011 16:03:11 +1000 Subject: s4-param finish services hooks for s4->s3 loadparm context --- source3/param/loadparm.c | 13 +++++++++++++ source3/param/loadparm_ctx.c | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'source3/param') 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, -- cgit