diff options
author | Michael Adam <obnox@samba.org> | 2013-08-29 16:38:08 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-08-30 10:22:52 +0200 |
commit | 163c0b31b9b1c9b9c9bbecd8ec8c65f6a09ed8b0 (patch) | |
tree | 925ad3775aeb208a469e9e4028b0e2042d4c6f3c | |
parent | 1c53cdd2eef878b31b73cd68b1e4c5ca749fd809 (diff) | |
download | samba-163c0b31b9b1c9b9c9bbecd8ec8c65f6a09ed8b0.tar.gz |
s3:winbind: fail ads_cached_connection_connect() if realm == NULL
This prevents segfaults when e.g. a previous SMB_STRDUP failed..
Signed-off-by: Michael Adam <obnox@samba.org>
The last 8 patches address bug #10107 - winbind on DC with trusted AD domains
crashes.
-rw-r--r-- | source3/winbindd/winbindd_ads.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index c33b1bc3bf..4c2638900f 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -86,6 +86,10 @@ static ADS_STATUS ads_cached_connection_connect(ADS_STRUCT **adsp, struct sockaddr_storage dc_ss; fstring dc_name; + if (realm == NULL) { + return ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); + } + /* we don't want this to affect the users ccache */ setenv("KRB5CCNAME", WINBIND_CCACHE_NAME, 1); |