]> granicus.if.org Git - libtirpc/commitdiff
Added the RPCB_OWNER_STRING define which is defined
authorJeff Layton <jlayton@redhat.com>
Thu, 28 May 2009 13:17:37 +0000 (09:17 -0400)
committerSteve Dickson <steved@redhat.com>
Thu, 28 May 2009 13:17:37 +0000 (09:17 -0400)
as the "libtirpc" constant string

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
src/rpcb_clnt.c

index b1c0038fd0073f060f30898f08a6dba526f5cc98..615ce0bb1914471907784ac61911ac5bd46ace88 100644 (file)
@@ -85,6 +85,8 @@ extern bool_t xdr_wrapstring(XDR *, char **);
 
 static const char nullstring[] = "\000";
 
+#define RPCB_OWNER_STRING "libtirpc"
+
 #define        CACHESIZE 6
 
 struct address_cache {
@@ -752,10 +754,11 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
        parms.r_netid = nconf->nc_netid;
 
        /*
-        * According to wire captures, the reference implementation
-        * (OpenSolaris) sends a blank string here too.
+        * rpcbind ignores the r_owner field in GETADDR requests, but we
+        * need to give xdr_rpcb something to gnaw on. Might as well make
+        * it something human readable for when we see these in captures.
         */
-       parms.r_owner = "";
+       parms.r_owner = RPCB_OWNER_STRING;
 
        /*
         * Use default total timeout if no timeout is specified.