From 59f3284d28adecab0d664932ea8da0a68d6f257b Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 30 Jun 1995 01:52:24 +0000 Subject: [PATCH] Add in "." between hostname and domain name --- pppd/options.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pppd/options.c b/pppd/options.c index b54f95a..13969c4 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.21 1995/06/12 12:02:20 paulus Exp $"; +static char rcsid[] = "$Id: options.c,v 1.22 1995/06/30 01:52:24 paulus Exp $"; #endif #include @@ -1132,7 +1132,11 @@ static int setdomain(argv) char **argv; { - strncat(hostname, *argv, MAXNAMELEN - strlen(hostname)); + gethostname(hostname, MAXNAMELEN); + if (*argv != 0) { + strncat(hostname, ".", MAXNAMELEN - strlen(hostname)); + strncat(hostname, *argv, MAXNAMELEN - strlen(hostname)); + } hostname[MAXNAMELEN-1] = 0; return (1); } -- 2.39.2