Handle NULL dchostname.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Apr 2007 11:02:06 +0000 (11:02 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Apr 2007 11:02:06 +0000 (11:02 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@888 959494ce-11ee-0310-bf91-de5d638817bd

lib/uimisc.c

index e1ece1c..9cef69f 100644 (file)
@@ -321,6 +321,11 @@ static int init_krb5(struct logindata *data)
     krb5_data cksum;
     krb5_creds creds;
     
+    if(dc_gethostname() == NULL)
+    {
+       message("cannot use krb5 without a host name");
+       return(1);
+    }
     krb = smalloc(sizeof(*krb));
     memset(krb, 0, sizeof(*krb));
     krb->fwd = 1;