~ken-vandine/ubuntu/natty/nfs-utils/1.2.2-4ubuntu1

« back to all changes in this revision

Viewing changes to debian/patches/14-allow-address-without-name.patch

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2010-08-27 00:11:44 UTC
  • Revision ID: james.westby@ubuntu.com-20100827001144-ko428gbq8aa78tjn
Tags: 1:1.2.2-4
* mountd: fix path comparison for v4 crossmnt (Closes: #578317)
* nfs-common.init: Ignore empty and commented-out fstab lines, thanks
  to Cristian Ionescu-Idbohrn (Closes: #587329)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- nfs-utils-1.2.2.orig/utils/statd/hostname.c
2
 
+++ nfs-utils-1.2.2/utils/statd/hostname.c
3
 
@@ -212,7 +212,7 @@
 
1
From e22f5a9c8e53a2373e8a939771e964ad315cdc5f Mon Sep 17 00:00:00 2001
 
2
From: Chuck Lever <chuck.lever@oracle.com>
 
3
Date: Tue, 24 Aug 2010 07:16:10 -0400
 
4
Subject: [PATCH] statd: statd fails to monitor if no reverse mapping of mon_name exists
 
5
 
 
6
Commit 8ce130c4 switched in the new statd_canonical_name() function
 
7
that constructs a "unique" name statd can use to uniquely identify a
 
8
monitor record.
 
9
 
 
10
The legacy statd would monitor a client that sent an IP address with
 
11
no reverse map as its caller_name.  To remain bug-for-bug compatible,
 
12
allow this case in the new statd.
 
13
 
 
14
This shouldn't be a problem: statd_canonical_name() needs to create
 
15
a unique name for the monitored host so it can keep track of monitor
 
16
requests from the same remote.  The IP address itself should work as
 
17
well as the host's canonical name, in case there is no reverse
 
18
mapping.
 
19
 
 
20
We still enforce the requirement that a mon_name that is a DNS name
 
21
must have a forward map to an IP address.
 
22
 
 
23
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
 
24
Signed-off-by: Steve Dickson <steved@redhat.com>
 
25
---
 
26
 utils/statd/hostname.c |    4 +++-
 
27
 1 files changed, 3 insertions(+), 1 deletions(-)
 
28
 
 
29
diff --git a/utils/statd/hostname.c b/utils/statd/hostname.c
 
30
index 7d704cc..38f2265 100644
 
31
--- a/utils/statd/hostname.c
 
32
+++ b/utils/statd/hostname.c
 
33
@@ -212,7 +212,9 @@ statd_canonical_name(const char *hostname)
4
34
                                        buf, (socklen_t)sizeof(buf));
5
35
                freeaddrinfo(ai);
6
36
                if (!result)
7
37
-                       return NULL;
 
38
+                       /* OK to use presentation address,
 
39
+                        * if no reverse map exists */
8
40
+                       return strdup(hostname);
9
41
                return strdup(buf);
10
42
        }
11
43
 
 
44
-- 
 
45
1.7.1
 
46