diff options
author | Jeremy Allison <jra@samba.org> | 1998-06-10 19:45:13 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-06-10 19:45:13 +0000 |
commit | fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de (patch) | |
tree | d2c49a3c9b4dc0dd3c741a269aa02ac1fec78cc2 /source/lsarpcd | |
parent | 1d77728bbba49699a05eb70b685a4a97d7598122 (diff) | |
download | samba-fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de.tar.gz samba-fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de.tar.xz samba-fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de.zip |
De-coupled the mapping of a Windows to UNIX username from the Get_Pwnam
username case conversion wrapper. It is now (very) explicit where we are
mapping between an incoming Windows username, and when we are doing a
UNIX password entry lookup, which may change the case of the given
username.
This makes things *much* clearer (IMHO:-) and will ease the adding of
the 'groupname map' parameter, and the addition of the special 'jeremy'
mode for Samba where unix users will not be needed. (We must think of
a better name for it :-).
Jeremy.
Diffstat (limited to 'source/lsarpcd')
-rw-r--r-- | source/lsarpcd/srv_lsa.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/lsarpcd/srv_lsa.c b/source/lsarpcd/srv_lsa.c index e723b532b10..43f463a8ab6 100644 --- a/source/lsarpcd/srv_lsa.c +++ b/source/lsarpcd/srv_lsa.c @@ -371,7 +371,18 @@ static void api_lsa_lookup_names( int uid, prs_struct *data, /* convert received RIDs to strings, so we can do them. */ for (i = 0; i < q_l.num_entries; i++) { - char *user_name = unistr2(q_l.lookup_name[i].str.buffer); + fstring user_name; + fstrcpy(user_name, unistr2(q_l.lookup_name[i].str.buffer)); + /* + * Map to the UNIX username. + */ + map_username(user_name); + + /* + * Do any case conversions. + */ + (void)Get_Pwnam(user_name, True); + if (!pdb_name_to_rid(user_name, &dom_rids[i], &dummy_g_rid)) { /* WHOOPS! we should really do something about this... */ |