git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
090acb2
)
ads->realm must not be NULL
author
Andrew Tridgell
<tridge@samba.org>
Thu, 29 Nov 2001 08:22:45 +0000
(08:22 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 29 Nov 2001 08:22:45 +0000
(08:22 +0000)
perhaps we should just fail ads_init() in this case?
(This used to be commit
2a4ce3de6ae8fb833370d1f9d6e5e7193fafa979
)
source3/libads/ads_struct.c
patch
|
blob
|
history
diff --git
a/source3/libads/ads_struct.c
b/source3/libads/ads_struct.c
index 84c12bf66522df2ee4e2ccf21a0d2f761d52eb16..4227684375e1371868f2b86434dcbabd1c647065 100644
(file)
--- a/
source3/libads/ads_struct.c
+++ b/
source3/libads/ads_struct.c
@@
-103,6
+103,8
@@
static char *find_ldap_server(ADS_STRUCT *ads)
{
char *list = NULL;
+ if (!ads->realm) return NULL;
+
if (ldap_domain2hostlist(ads->realm, &list) == LDAP_SUCCESS) {
char *p;
p = strchr(list, ':');
@@
-149,6
+151,7
@@
ADS_STRUCT *ads_init(const char *realm,
if (!ads->realm[0]) {
ads->realm = get_default_realm(ads);
}
+ if (!ads->realm) ads->realm = strdup("");
}
if (!ads->bind_path) {
ads->bind_path = ads_build_dn(ads->realm);