From 254470cb566fc06f5818830d105361d853648d6e Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 14 Dec 1998 20:23:20 +0000 Subject: added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids. (This used to be commit 0b2095e092d747f741e78a3349f0b81a72811629) --- source3/lib/domain_namemap.c | 45 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/domain_namemap.c b/source3/lib/domain_namemap.c index 407de944a7..9ea3dd6ada 100644 --- a/source3/lib/domain_namemap.c +++ b/source3/lib/domain_namemap.c @@ -926,10 +926,17 @@ BOOL lookupsmbpwuid(uid_t uid, DOM_NAME_MAP *gmep) if (lp_server_role() == ROLE_DOMAIN_MEMBER) { #if 0 - do_lsa_lookup_names(global_myworkgroup, gmep->nt_name, &gmep->sid...); + lsa_lookup_names(global_myworkgroup, gmep->nt_name, &gmep->sid...); #endif } + /* + * ok, it's one of ours. we therefore "create" an nt user named + * after the unix user. this is the point where "appliance mode" + * should get its teeth in, as unix users won't really exist, + * they will only be numbers... + */ + gmep->type = SID_NAME_USER; fstrcpy(gmep->nt_name, uidtoname(uid)); fstrcpy(gmep->unix_name, gmep->nt_name); @@ -976,10 +983,17 @@ BOOL lookupsmbpwntnam(char *fullntname, DOM_NAME_MAP *gmep) if (lp_server_role() == ROLE_DOMAIN_MEMBER) { #if 0 - do_lsa_lookup_names(global_myworkgroup, gmep->nt_name, gmep->nt_domain, &gmep->sid...); + lsa_lookup_names(global_myworkgroup, gmep->nt_name, gmep->nt_domain, &gmep->sid...); #endif } + /* + * ok, it's one of ours. we therefore "create" an nt user named + * after the unix user. this is the point where "appliance mode" + * should get its teeth in, as unix users won't really exist, + * they will only be numbers... + */ + gmep->type = SID_NAME_USER; fstrcpy(gmep->unix_name, gmep->nt_name); if (!nametouid(gmep->unix_name, &uid)) @@ -1028,10 +1042,17 @@ BOOL lookupsmbpwsid(DOM_SID *sid, DOM_NAME_MAP *gmep) if (lp_server_role() == ROLE_DOMAIN_MEMBER) { #if 0 - do_lsa_lookup_sids(global_myworkgroup, gmep->sid, gmep->nt_name, gmep->nt_domain...); + lsa_lookup_sids(global_myworkgroup, gmep->sid, gmep->nt_name, gmep->nt_domain...); #endif } + /* + * ok, it's one of ours. we therefore "create" an nt user named + * after the unix user. this is the point where "appliance mode" + * should get its teeth in, as unix users won't really exist, + * they will only be numbers... + */ + gmep->type = SID_NAME_USER; sid_copy(&gmep->sid, sid); if (!pwdb_sam_sid_to_unixid(&gmep->sid, gmep->type, &gmep->unix_id)) @@ -1099,10 +1120,17 @@ BOOL lookupsmbgrpsid(DOM_SID *sid, DOM_NAME_MAP *gmep) if (lp_server_role() == ROLE_DOMAIN_MEMBER) { #if 0 - do_lsa_lookup_sids(global_myworkgroup, gmep->sid, gmep->nt_name, gmep->nt_domain...); + lsa_lookup_sids(global_myworkgroup, gmep->sid, gmep->nt_name, gmep->nt_domain...); #endif } + /* + * ok, it's one of ours. we therefore "create" an nt group or + * alias name named after the unix group. this is the point + * where "appliance mode" should get its teeth in, as unix + * groups won't really exist, they will only be numbers... + */ + /* name is not explicitly mapped * with map files or the PDC * so we are responsible for it... @@ -1165,13 +1193,20 @@ BOOL lookupsmbgrpgid(gid_t gid, DOM_NAME_MAP *gmep) if (lp_server_role() == ROLE_DOMAIN_MEMBER) { #if 0 - do_lsa_lookup_names(global_myworkgroup, gmep->nt_name, &gmep->sid...); + if (lsa_lookup_names(global_myworkgroup, gmep->nt_name, &gmep->sid...); { return True; } #endif } + /* + * ok, it's one of ours. we therefore "create" an nt group or + * alias name named after the unix group. this is the point + * where "appliance mode" should get its teeth in, as unix + * groups won't really exist, they will only be numbers... + */ + /* name is not explicitly mapped * with map files or the PDC * so we are responsible for it... -- cgit