If gethostbyname returns an error, exit after printing an error message
authorTheodore Tso <tytso@mit.edu>
Thu, 19 Jan 1995 03:25:16 +0000 (03:25 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 19 Jan 1995 03:25:16 +0000 (03:25 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4829 dc483132-0cff-0310-8789-dd5450dbe970

src/clients/ksu/ChangeLog
src/clients/ksu/main.c

index 97123c9b4fe9b2d067b4ac72e721bdeca66fa0e3..14fbd7e9ca0394dce1805a2e8d3ec7c48ed1c8d9 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 18 12:21:30 1995    <tytso@rsx-11.mit.edu>
+
+       * main.c (main): If gethostbyname returns an error, exit after
+               printing an error message.
+
 Fri Jan 13 15:23:47 1995  Chris Provenzano (proven@mit.edu)
 
     * Added krb5_context to all krb5_routines
index 489c81941557818d36a7b9fb7b92dee1cb8427cf..0a756d495deb0c0e2c66af1cd912c8daa8d18225 100644 (file)
@@ -369,7 +369,8 @@ char * dir_of_cc_source;
        init_auth_names(target_pwd->pw_dir);
 
        if (gethostname (localhostname, MAXHOSTNAMELEN)){
-               fprintf (stderr, " failed to get localhostname\n");    
+               fprintf (stderr, " failed to get localhostname\n");
+               exit(1);
        }
 
        /***********************************/