summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authoreric <>2012-04-10 16:41:10 +0000
committereric <>2012-04-10 16:41:10 +0000
commit2b79984862992228ab5768515cd6d4b863d46991 (patch)
tree40b625683d6a6aafdedd3b7b373fefd268cb114f /src/lib
parenta5417d8a84491257e3b964137e0d97148096f1a0 (diff)
downloadopenbsd-2b79984862992228ab5768515cd6d4b863d46991.tar.gz
openbsd-2b79984862992228ab5768515cd6d4b863d46991.tar.bz2
openbsd-2b79984862992228ab5768515cd6d4b863d46991.zip
Do not pick the network number as alias on entries with no alias
defined. ok deraadt@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/net/getnetent.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libc/net/getnetent.c b/src/lib/libc/net/getnetent.c
index 1bec6fb98c..57fe459e2b 100644
--- a/src/lib/libc/net/getnetent.c
+++ b/src/lib/libc/net/getnetent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getnetent.c,v 1.12 2006/01/17 15:37:58 millert Exp $ */ 1/* $OpenBSD: getnetent.c,v 1.13 2012/04/10 16:41:10 eric Exp $ */
2/* 2/*
3 * Copyright (c) 1983, 1993 3 * Copyright (c) 1983, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
@@ -100,8 +100,7 @@ again:
100 net.n_net = inet_network(cp); 100 net.n_net = inet_network(cp);
101 net.n_addrtype = AF_INET; 101 net.n_addrtype = AF_INET;
102 q = net.n_aliases = net_aliases; 102 q = net.n_aliases = net_aliases;
103 if (p != NULL) 103 cp = p;
104 cp = p;
105 while (cp && *cp) { 104 while (cp && *cp) {
106 if (*cp == ' ' || *cp == '\t') { 105 if (*cp == ' ' || *cp == '\t') {
107 cp++; 106 cp++;