s3-libads: Print a message if no realm has been specified.
authorAndreas Schneider <asn@samba.org>
Mon, 5 Aug 2013 07:25:11 +0000 (09:25 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 14 Aug 2013 08:59:14 +0000 (10:59 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Aug  5 12:24:44 CEST 2013 on sn-devel-104

(cherry picked from commit 6659f0164c6b8d7ad522bcd6c2c6748c3d9bca81)

The last 2 patches address bug #10073 - net ads join - segmentation fault in
create_local_private_krb5_conf_for_domain.

source3/libads/kerberos.c

index 7d9bd4d2b18f7aeeba1c206ef97b215b15b2ec14..1153ccb28856901e7364ad5cbb1863ad4b2e36da 100644 (file)
@@ -856,7 +856,13 @@ bool create_local_private_krb5_conf_for_domain(const char *realm,
                return false;
        }
 
-       if (!realm || !domain || !pss || !kdc_name) {
+       if (realm == NULL) {
+               DEBUG(0, ("No realm has been specified! Do you really want to "
+                         "join an Active Directory server?\n"));
+               return false;
+       }
+
+       if (domain == NULL || pss == NULL || kdc_name == NULL) {
                return false;
        }