summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-19 18:08:47 +1300
committerJeremy Allison <jra@samba.org>2014-05-07 19:49:15 +0200
commit1a921138120027fea677d4e3514e8f95cc56b57d (patch)
tree2467bca0a01fa1bd071d6fa05ea4edb82e5001a6 /source3
parent47c431279eed8d27ad6a49b1e5a1749ce110ead2 (diff)
downloadsamba-1a921138120027fea677d4e3514e8f95cc56b57d.tar.gz
samba-1a921138120027fea677d4e3514e8f95cc56b57d.tar.xz
samba-1a921138120027fea677d4e3514e8f95cc56b57d.zip
param: add getservicebyname to s3_helpers
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c4
-rw-r--r--source3/param/loadparm_ctx.c1
2 files changed, 2 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index b206f6be7aa..16dd70f2654 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1173,8 +1173,6 @@ FN_LOCAL_BOOL(autoloaded, autoloaded)
static int map_parameter_canonical(const char *pszParmName, bool *inverse);
static const char *get_boolean(bool bool_value);
-static int getservicebyname(const char *pszServiceName,
- struct loadparm_service *pserviceDest);
static bool do_parameter(const char *pszParmName, const char *pszParmValue,
void *userdata);
static bool do_section(const char *pszSectionName, void *userdata);
@@ -2071,7 +2069,7 @@ bool lp_canonicalize_boolean(const char *str, const char**canon_str)
Find a service by name. Otherwise works like get_service.
***************************************************************************/
-static int getservicebyname(const char *pszServiceName, struct loadparm_service *pserviceDest)
+int getservicebyname(const char *pszServiceName, struct loadparm_service *pserviceDest)
{
int iService = -1;
char *canon_name;
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index ed21e4fb5e8..d13304ff210 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -63,6 +63,7 @@ static struct loadparm_s3_helpers s3_fns =
.get_parm_ptr = lp_parm_ptr,
.get_service = lp_service_for_s4_ctx,
.get_servicebynum = lp_servicebynum_for_s4_ctx,
+ .getservicebyname = getservicebyname,
.get_default_loadparm_service = lp_default_loadparm_service,
.get_numservices = lp_numservices,
.load = lp_load_for_s4_ctx,