Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst Prevent sysinst from setting an fqdn i...
details: https://anonhg.NetBSD.org/src/rev/72f9e160d873
branches: trunk
changeset: 781708:72f9e160d873
user: jdf <jdf%NetBSD.org@localhost>
date: Sun Sep 23 17:37:51 2012 +0000
description:
Prevent sysinst from setting an fqdn in rc.conf when the user entered no domain
(i.e., sets only the hostname). Fix for PR install/46946.
diffstat:
distrib/utils/sysinst/net.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 2b27327d2ddd -r 72f9e160d873 distrib/utils/sysinst/net.c
--- a/distrib/utils/sysinst/net.c Sun Sep 23 17:22:22 2012 +0000
+++ b/distrib/utils/sysinst/net.c Sun Sep 23 17:37:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net.c,v 1.132 2012/05/01 18:28:47 riz Exp $ */
+/* $NetBSD: net.c,v 1.133 2012/09/23 17:37:51 jdf Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -435,9 +435,9 @@
strlcpy(recombined, net_host, sizeof(recombined));
- if (l <= 0 ||
+ if (strlen(net_domain) != 0 && (l <= 0 ||
net_host[l - 1] != '.' ||
- strcasecmp(net_domain, net_host + l) != 0) {
+ strcasecmp(net_domain, net_host + l) != 0)) {
/* net_host isn't an FQDN. */
strlcat(recombined, ".", sizeof(recombined));
strlcat(recombined, net_domain, sizeof(recombined));
Home |
Main Index |
Thread Index |
Old Index