Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sbin/mount_nfs Apply patch (requested by lukem in ticket ...
details: https://anonhg.NetBSD.org/src/rev/2bbdc5b05ebe
branches: netbsd-3
changeset: 576180:2bbdc5b05ebe
user: tron <tron%NetBSD.org@localhost>
date: Sat Jun 11 12:09:53 2005 +0000
description:
Apply patch (requested by lukem in ticket #391):
Use ai_nfs instead of the uninitialized ai when determining the
NFSMNT_KERB reverse IP address, and ensure ecode is set as well.
(Fix derived from getnfsargs.c 1.2)
diffstat:
sbin/mount_nfs/mount_nfs.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r dade37caba3e -r 2bbdc5b05ebe sbin/mount_nfs/mount_nfs.c
--- a/sbin/mount_nfs/mount_nfs.c Sat Jun 11 11:19:33 2005 +0000
+++ b/sbin/mount_nfs/mount_nfs.c Sat Jun 11 12:09:53 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_nfs.c,v 1.47 2005/02/05 15:04:56 xtraeme Exp $ */
+/* $NetBSD: mount_nfs.c,v 1.47.2.1 2005/06/11 12:09:53 tron Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: mount_nfs.c,v 1.47 2005/02/05 15:04:56 xtraeme Exp $");
+__RCSID("$NetBSD: mount_nfs.c,v 1.47.2.1 2005/06/11 12:09:53 tron Exp $");
#endif
#endif /* not lint */
@@ -760,8 +760,9 @@
if (getaddrinfo(hostp, "nfs", &hints, &ai_nfs) == 0) {
if ((nfsargsp->flags & NFSMNT_KERB)) {
hints.ai_flags = 0;
- if (getnameinfo(ai->ai_addr, ai->ai_addrlen, host,
- sizeof host, serv, sizeof serv, 0) != 0) {
+ if ((ecode = getnameinfo(ai_nfs->ai_addr,
+ ai_nfs->ai_addrlen, host, sizeof(host),
+ serv, sizeof serv, 0)) != 0) {
warnx("can't reverse resolve net address for "
"host \"%s\": %s", hostp,
gai_strerror(ecode));
Home |
Main Index |
Thread Index |
Old Index