use in-house localhostname instead of gethostname - returns FQDN
This commit is contained in:
parent
3eff4309d8
commit
71d53f5fd6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mkalias.c,v 1.4 1997/10/13 03:48:49 lukem Exp $ */
|
||||
/* $NetBSD: mkalias.c,v 1.5 1997/11/04 11:43:49 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mats O Jansson <moj@stacken.kth.se>
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: mkalias.c,v 1.4 1997/10/13 03:48:49 lukem Exp $");
|
||||
__RCSID("$NetBSD: mkalias.c,v 1.5 1997/11/04 11:43:49 lukem Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -52,6 +52,7 @@ __RCSID("$NetBSD: mkalias.c,v 1.4 1997/10/13 03:48:49 lukem Exp $");
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#include "protos.h"
|
||||
#include "ypdb.h"
|
||||
#include "ypdef.h"
|
||||
|
||||
@ -324,7 +325,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
if (new_db != NULL) {
|
||||
gethostname(myname, sizeof(myname) - 1);
|
||||
localhostname(myname, sizeof(myname) - 1);
|
||||
key.dptr = YP_MASTER_KEY;
|
||||
key.dsize = strlen(YP_MASTER_KEY);
|
||||
val.dptr = myname;
|
||||
|
Loading…
Reference in New Issue
Block a user