summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/023-no-rpc-register.patch
blob: 50f23fcc6c9df7cb32aa935e0baf250466c2427e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Upstream-Status: Inappropriate [other]
Upstream is not making further releases of this software.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

# Allow user mode NFS to work without rpcbind / portmap
# Patch origin: Wind River

---
 rpcmisc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/rpcmisc.c
+++ b/rpcmisc.c
@@ -91,7 +91,8 @@ not_inetd:
 		if (transp == NULL)
 			Dprintf(L_FATAL, "cannot create udp service.");
 		for (i = 0; (vers = verstbl[i]) != 0; i++) {
-			if (!svc_register(transp, prog, vers, dispatch, IPPROTO_UDP)) {
+			if (!(svc_register(transp, prog, vers, dispatch, IPPROTO_UDP) ||
+			      svc_register(transp, prog, vers, dispatch, 0))) {
 				Dprintf(L_FATAL,
 					"unable to register (%s, %d, udp).",
 					name, vers);
@@ -110,7 +111,8 @@ not_inetd:
 		transp->xp_ops->xp_recv = auth_rendevouser;
 #endif
 		for (i = 0; (vers = verstbl[i]) != 0; i++) {
-			if (!svc_register(transp, prog, vers, dispatch, IPPROTO_TCP)) {
+			if (!(svc_register(transp, prog, vers, dispatch, IPPROTO_TCP) ||
+			      svc_register(transp, prog, vers, dispatch, 0))) {
 				Dprintf(L_FATAL,
 					"unable to register (%s, %d, tcp).",
 					name, vers);