diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-11-24 15:04:12 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-11-24 15:23:50 +0100 |
commit | 26461a72da5a646fcc6023bb4f82c66e17a8529b (patch) | |
tree | a2d5dd11dcbe1236497975badbba648dcc63e044 /source3/libads | |
parent | f340ed1348ca5f514dcd85a273559ecb9ff1615f (diff) | |
download | samba-26461a72da5a646fcc6023bb4f82c66e17a8529b.tar.gz samba-26461a72da5a646fcc6023bb4f82c66e17a8529b.tar.bz2 samba-26461a72da5a646fcc6023bb4f82c66e17a8529b.zip |
s3:libads/ldap.c: return an error instead of crashing when no realm is given
The bug was triggered by "net ads info -S 127.8.7.6" (where 127.8.7.6 doesn't ex
and "disable netbios = yes".
metze
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index f55cfa784a..932e42e076 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -301,11 +301,11 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads) if ( use_own_domain ) c_realm = lp_workgroup(); } + } - if ( !c_realm || !*c_realm ) { - DEBUG(0,("ads_find_dc: no realm or workgroup! Don't know what to do\n")); - return NT_STATUS_INVALID_PARAMETER; /* rather need MISSING_PARAMETER ... */ - } + if ( !c_realm || !*c_realm ) { + DEBUG(0,("ads_find_dc: no realm or workgroup! Don't know what to do\n")); + return NT_STATUS_INVALID_PARAMETER; /* rather need MISSING_PARAMETER ... */ } realm = c_realm; |