diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-12 16:03:11 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-14 15:06:45 +1000 |
commit | 0e4a4c8b19c9962fc8cbdb407ccd7e9a3e7bc536 (patch) | |
tree | 5a0eae5ff1a8dd55d2d12ccace8b6458b1b9c630 /source3 | |
parent | 07f14aa3a7431ee1bd2994db84e32afddcaaf8dd (diff) | |
download | samba-0e4a4c8b19c9962fc8cbdb407ccd7e9a3e7bc536.tar.gz samba-0e4a4c8b19c9962fc8cbdb407ccd7e9a3e7bc536.tar.xz samba-0e4a4c8b19c9962fc8cbdb407ccd7e9a3e7bc536.zip |
s4-param finish services hooks for s4->s3 loadparm context
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/param/loadparm.c | 13 | ||||
-rw-r--r-- | source3/param/loadparm_ctx.c | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 5d15e4e77a..c3e680d8b6 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1577,6 +1577,8 @@ const char *lp_ldap_idmap_suffix(void); struct parm_struct; /* Return a pointer to a service by name. */ struct loadparm_service *lp_service(const char *pszServiceName); +struct loadparm_service *lp_servicebynum(int snum); +struct loadparm_service *lp_default_loadparm_service(void); void *lp_parm_ptr(struct loadparm_service *service, struct parm_struct *parm); void *lp_local_ptr_by_snum(int snum, struct parm_struct *parm); bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue); 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, |