diff options
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd.h | 2 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_idmap.c | 55 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_idmap_tdb.c | 4 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 4 |
4 files changed, 32 insertions, 33 deletions
diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h index d98ac28ab1..192b058871 100644 --- a/source3/nsswitch/winbindd.h +++ b/source3/nsswitch/winbindd.h @@ -203,7 +203,7 @@ typedef struct { } CLI_POLICY_HND; /* Filled out by IDMAP backends */ -struct idmap_methods { +struct winbindd_idmap_methods { /* Called when backend is first loaded */ BOOL (*init)(void); diff --git a/source3/nsswitch/winbindd_idmap.c b/source3/nsswitch/winbindd_idmap.c index de547cde41..4b4d9eb8d2 100644 --- a/source3/nsswitch/winbindd_idmap.c +++ b/source3/nsswitch/winbindd_idmap.c @@ -24,33 +24,33 @@ static struct { const char *name; /* Function to create a member of the idmap_methods list */ - BOOL (*reg_meth)(struct idmap_methods **methods); - struct idmap_methods *methods; -} builtin_idmap_functions[] = { + BOOL (*reg_meth)(struct winbindd_idmap_methods **methods); + struct winbindd_idmap_methods *methods; +} builtin_winbindd_idmap_functions[] = { { "tdb", winbind_idmap_reg_tdb, NULL }, /* { "ldap", winbind_idmap_reg_ldap, NULL },*/ { NULL, NULL, NULL } }; /* singleton pattern: uberlazy evaluation */ -static struct idmap_methods *impl; +static struct winbindd_idmap_methods *impl; -static struct idmap_methods *get_impl(const char *name) +static struct winbindd_idmap_methods *get_impl(const char *name) { int i = 0; - struct idmap_methods *ret = NULL; + struct winbindd_idmap_methods *ret = NULL; - while (builtin_idmap_functions[i].name && - strcmp(builtin_idmap_functions[i].name, name)) { + while (builtin_winbindd_idmap_functions[i].name && + strcmp(builtin_winbindd_idmap_functions[i].name, name)) { i++; } - if (builtin_idmap_functions[i].name) { - if (!builtin_idmap_functions[i].methods) { - builtin_idmap_functions[i].reg_meth(&builtin_idmap_functions[i].methods); + if (builtin_winbindd_idmap_functions[i].name) { + if (!builtin_winbindd_idmap_functions[i].methods) { + builtin_winbindd_idmap_functions[i].reg_meth(&builtin_winbindd_idmap_functions[i].methods); } - ret = builtin_idmap_functions[i].methods; + ret = builtin_winbindd_idmap_functions[i].methods; } return ret; @@ -62,13 +62,13 @@ BOOL winbindd_idmap_init(void) BOOL ret = False; DEBUG(3, ("winbindd_idmap_init: using '%s' as backend\n", - lp_idmap_backend())); + lp_winbind_backend())); if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); if (!impl) { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } } @@ -87,10 +87,10 @@ BOOL winbindd_idmap_get_uid_from_sid(DOM_SID *sid, uid_t *uid) BOOL ret = False; if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); if (!impl) { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } } @@ -107,10 +107,10 @@ BOOL winbindd_idmap_get_gid_from_sid(DOM_SID *sid, gid_t *gid) BOOL ret = False; if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); if (!impl) { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } } @@ -127,10 +127,10 @@ BOOL winbindd_idmap_get_sid_from_uid(uid_t uid, DOM_SID *sid) BOOL ret = False; if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); if (!impl) { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } } @@ -147,14 +147,14 @@ BOOL winbindd_idmap_get_sid_from_gid(gid_t gid, DOM_SID *sid) BOOL ret = False; if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); } if (impl) { ret = impl->get_sid_from_gid(gid, sid); } else { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } return ret; @@ -166,14 +166,14 @@ BOOL winbindd_idmap_close(void) BOOL ret = False; if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); } if (impl) { ret = impl->close(); } else { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } return ret; @@ -183,14 +183,13 @@ BOOL winbindd_idmap_close(void) void winbindd_idmap_status(void) { if (!impl) { - impl = get_impl(lp_idmap_backend()); + impl = get_impl(lp_winbind_backend()); } if (impl) { impl->status(); } else { DEBUG(0, ("winbindd_idmap_init: could not load backend '%s'\n", - lp_idmap_backend())); + lp_winbind_backend())); } } - diff --git a/source3/nsswitch/winbindd_idmap_tdb.c b/source3/nsswitch/winbindd_idmap_tdb.c index 911b3b41d2..b47b7ed07d 100644 --- a/source3/nsswitch/winbindd_idmap_tdb.c +++ b/source3/nsswitch/winbindd_idmap_tdb.c @@ -419,7 +419,7 @@ static void tdb_idmap_status(void) /* Display complete mapping of users and groups to rids */ } -struct idmap_methods tdb_idmap_methods = { +struct winbindd_idmap_methods tdb_idmap_methods = { tdb_idmap_init, tdb_get_sid_from_uid, @@ -433,7 +433,7 @@ struct idmap_methods tdb_idmap_methods = { tdb_idmap_status }; -BOOL winbind_idmap_reg_tdb(struct idmap_methods **meth) +BOOL winbind_idmap_reg_tdb(struct winbindd_idmap_methods **meth) { *meth = &tdb_idmap_methods; diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index b033380206..ac0b317b42 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -380,12 +380,12 @@ BOOL winbindd_param_init(void) { /* Parse winbind uid and winbind_gid parameters */ - if (!lp_winbind_uid(&server_state.uid_low, &server_state.uid_high)) { + if (!lp_idmap_uid(&server_state.uid_low, &server_state.uid_high)) { DEBUG(0, ("winbind uid range missing or invalid\n")); return False; } - if (!lp_winbind_gid(&server_state.gid_low, &server_state.gid_high)) { + if (!lp_idmap_gid(&server_state.gid_low, &server_state.gid_high)) { DEBUG(0, ("winbind gid range missing or invalid\n")); return False; } |