1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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>
This commit is contained in:
Garming Sam 2014-02-19 18:08:47 +13:00 committed by Jeremy Allison
parent 47c431279e
commit 1a92113812
4 changed files with 4 additions and 3 deletions

View File

@ -262,6 +262,7 @@ bool lp_is_security_and_server_role_valid(int server_role, int security);
struct loadparm_global * get_globals(void);
char * lp_string(TALLOC_CTX *, const char *);
bool lp_string_set(char **, const char *);
int getservicebyname(const char *, struct loadparm_service *);
/**
* Check if two parameters are equal.

View File

@ -9,6 +9,7 @@ struct loadparm_s3_helpers
struct loadparm_service * (*get_service)(const char *service_name);
struct loadparm_service * (*get_default_loadparm_service)(void);
struct loadparm_service * (*get_servicebynum)(int snum);
int (*getservicebyname)(const char *, struct loadparm_service *);
int (*get_numservices)(void);
bool (*load)(const char *filename);
bool (*set_cmdline)(const char *pszParmName, const char *pszParmValue);

View File

@ -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;

View File

@ -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,