diff options
author | Simo Sorce <idra@samba.org> | 2001-12-30 19:21:25 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-12-30 19:21:25 +0000 |
commit | 0608a60390db336bf179564aefdf16c43f1793ad (patch) | |
tree | 8ec4cc2b229552e37392cbaf7cc6b8f734469770 /source3/passdb/pdb_ldap.c | |
parent | f6e6c678ad5338264496de43e9e1ab2fe4a28e64 (diff) | |
download | samba-0608a60390db336bf179564aefdf16c43f1793ad.tar.gz samba-0608a60390db336bf179564aefdf16c43f1793ad.tar.bz2 samba-0608a60390db336bf179564aefdf16c43f1793ad.zip |
util_sid.c - respect a const variabile (addedd strdup)
cli_reg.c - indentation
pdb_ldap.c - some checks on init fns parameters
pdb_tdb.c - some checks on init fns parameters + make sure we close the db on failure
(This used to be commit 49f5cb7a3df6d673f86e6769319aa657e30d8380)
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 215292be48..b9facb3a33 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -70,7 +70,9 @@ ldap_open_connection (LDAP ** ldap_struct) int port; int version, rc; int tls = LDAP_OPT_X_TLS_HARD; - + + /* there should be an lp_ldap_ssl_port(), what happen if for some + reason we need to bind an SSLed LDAP on port 389 ?? ---simo */ if (lp_ldap_ssl() == LDAP_SSL_ON && lp_ldap_port() == 389) { port = 636; } @@ -368,6 +370,11 @@ static BOOL init_sam_from_ldap (SAM_ACCOUNT * sampass, uint8 *hours; pstring temp; + if (sampass == NULL || ldap_struct == NULL || entry == NULL) { + DEBUG(0, ("init_sam_from_ldap: NULL parameters found!\n")); + return False; + } + get_single_attribute(ldap_struct, entry, "uid", username); DEBUG(2, ("Entry found for user: %s\n", username)); @@ -526,6 +533,11 @@ static BOOL init_ldap_from_sam (LDAPMod *** mods, int ldap_state, const SAM_ACCO { pstring temp; + if (mods == NULL || sampass == NULL) { + DEBUG(0, ("init_ldap_from_sam: NULL parameters found!\n")); + return False; + } + *mods = NULL; /* |