diff options
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r-- | source3/passdb/passdb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 9936dd2293..39caef2f85 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -70,7 +70,7 @@ BOOL initialise_password_db(void) pwdb_ops = nisplus_initialise_password_db(); #elif defined(WITH_LDAP) pwdb_ops = ldap_initialise_password_db(); -#elif defined(WITH_MYSQL) || defined(WITH_MYSQLSAM) +#elif defined(HAVE_MYSQL_H) && defined(WITH_MYSQLSAM) pwdb_ops = mysql_initialise_password_db(); #elif defined(USE_SMBPASS_DB) pwdb_ops = file_initialise_password_db(); @@ -278,6 +278,11 @@ struct smb_passwd *pwdb_smb_map_names(struct smb_passwd *smb) { return NULL; } + if (smb->unix_name != NULL && smb->nt_name != NULL && + smb->unix_uid != (uid_t)-1 && smb->user_rid != 0xffffffff) + { + return smb; + } if (!found && smb->unix_name != NULL) { |