diff options
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index aee6495759..d458267b08 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -419,8 +419,9 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, uint32 hours_len; uint8 hours[MAX_HOURS_LEN]; pstring temp; + struct passwd *pw = NULL; uid_t uid = -1; - gid_t gid = getegid(); + gid_t gid = -1; /* * do a little initialization @@ -455,6 +456,14 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, DEBUG(2, ("Entry found for user: %s\n", username)); + /* I'm not going to fail here, since there are checks + higher up the cal stack to do this --jerry */ + + if ( (pw=Get_Pwnam(username)) != NULL ) { + uid = pw->pw_uid; + gid = pw->pw_gid; + } + pstrcpy(nt_username, username); pstrcpy(domain, ldap_state->domain_name); |