Package: freebsd-utils / 10.1~svn273304-1

035_nfs.diff Patch series | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
--- a/src/sbin/mount_nfs/mount_nfs.c
+++ b/src/sbin/mount_nfs/mount_nfs.c
@@ -694,12 +694,18 @@
 static int
 sec_name_to_num(char *sec)
 {
+#ifdef RPCSEC_GSS_KRB5
 	if (!strcmp(sec, "krb5"))
 		return (RPCSEC_GSS_KRB5);
+#endif
+#ifdef RPCSEC_GSS_KRB5I
 	if (!strcmp(sec, "krb5i"))
 		return (RPCSEC_GSS_KRB5I);
+#endif
+#ifdef RPCSEC_GSS_KRB5P
 	if (!strcmp(sec, "krb5p"))
 		return (RPCSEC_GSS_KRB5P);
+#endif
 	if (!strcmp(sec, "sys"))
 		return (AUTH_SYS);
 	return (-1);
@@ -709,12 +715,18 @@
 sec_num_to_name(int flavor)
 {
 	switch (flavor) {
+#ifdef RPCSEC_GSS_KRB5
 	case RPCSEC_GSS_KRB5:
 		return ("krb5");
+#endif
+#ifdef RPCSEC_GSS_KRB5I
 	case RPCSEC_GSS_KRB5I:
 		return ("krb5i");
+#endif
+#ifdef RPCSEC_GSS_KRB5P
 	case RPCSEC_GSS_KRB5P:
 		return ("krb5p");
+#endif
 	case AUTH_SYS:
 		return ("sys");
 	}
@@ -859,9 +871,11 @@
 	freeaddrinfo(ai_nfs);
 
 	build_iovec(iov, iovlen, "hostname", nam, (size_t)-1);
+#if 0
 	/* Add mounted file system to PATH_MOUNTTAB */
 	if (!add_mtab(hostp, spec))
 		warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec);
+#endif
 	return (1);
 }
 
--- a/src/usr.sbin/mountd/mountd.c
+++ b/src/usr.sbin/mountd/mountd.c
@@ -2116,12 +2116,18 @@
 
 		if (!strcmp(seclist, "sys"))
 			flavor = AUTH_SYS;
+#ifdef RPCSEC_GSS_KRB5
 		else if (!strcmp(seclist, "krb5"))
 			flavor = RPCSEC_GSS_KRB5;
+#endif
+#ifdef RPCSEC_GSS_KRB5I
 		else if (!strcmp(seclist, "krb5i"))
 			flavor = RPCSEC_GSS_KRB5I;
+#endif
+#ifdef RPCSEC_GSS_KRB5P
 		else if (!strcmp(seclist, "krb5p"))
 			flavor = RPCSEC_GSS_KRB5P;
+#endif
 		else {
 			if (cp)
 				*cp = savedc;
--- a/src/usr.sbin/rpc.lockd/lockd.c
+++ b/src/usr.sbin/rpc.lockd/lockd.c
@@ -997,7 +997,7 @@
 		ret = callrpc("localhost", SM_PROG, SM_VERS, SM_UNMON_ALL,
 		    (xdrproc_t)xdr_my_id, &id, (xdrproc_t)xdr_sm_stat, &stat);
 		if (ret == RPC_PROGUNAVAIL) {
-			syslog(LOG_WARNING, "%lu %s", SM_PROG,
+			syslog(LOG_WARNING, "%u %s", SM_PROG,
 			    clnt_sperrno(ret));
 			sleep(2);
 			continue;
@@ -1006,7 +1006,7 @@
 	} while (0);
 
 	if (ret != 0) {
-		syslog(LOG_ERR, "%lu %s", SM_PROG, clnt_sperrno(ret));
+		syslog(LOG_ERR, "%u %s", SM_PROG, clnt_sperrno(ret));
 		exit(1);
 	}
 
--- a/src/usr.sbin/rpc.lockd/kern.c
+++ b/src/usr.sbin/rpc.lockd/kern.c
@@ -52,7 +52,8 @@
 #include <unistd.h>
 #include <netdb.h>
 
-#include "nlm_prot.h"
+
+#include <nlm_prot.h>
 #include <nfs/nfsproto.h>
 #include <nfs/nfs_lock.h>
 
--- a/src/usr.sbin/rpc.statd/statd.c
+++ b/src/usr.sbin/rpc.statd/statd.c
@@ -58,6 +58,8 @@
 
 #define	GETPORT_MAXTRY	20	/* Max tries to get a port # */
 
+extern void sm_prog_1(struct svc_req *rqstp, register SVCXPRT *transp);
+
 int debug = 0;		/* Controls syslog() calls for debug messages	*/
 
 char **hosts, *svcport_str = NULL;
@@ -281,7 +283,7 @@
   	free(port_list);
   }
 
-  init_file("/var/db/statd.status");
+  init_file("/var/lib/misc/statd.status");
 
   /* Note that it is NOT sensible to run this program from inetd - the 	*/
   /* protocol assumes that it will run immediately at boot time.	*/
--- a/src/usr.sbin/rpc.statd/rpc.statd.8
+++ b/src/usr.sbin/rpc.statd/rpc.statd.8
@@ -110,7 +110,7 @@
 after the network has been started.
 .Sh FILES
 .Bl -tag -width /usr/include/rpcsvc/sm_inter.x -compact
-.It Pa /var/db/statd.status
+.It Pa /var/lib/misc/statd.status
 non-volatile record of currently monitored hosts.
 .It Pa /usr/include/rpcsvc/sm_inter.x
 RPC protocol specification used by local applications to register monitoring requests.
--- a/src/usr.sbin/rpc.statd/Makefile
+++ b/src/usr.sbin/rpc.statd/Makefile
@@ -8,16 +8,21 @@
 WARNS?= 2
 
 DPADD=	${LIBRPCSVC}
-LDADD=	-lrpcsvc
+LDADD= -ltirpc -lbsd
 
 CLEANFILES= sm_inter_svc.c sm_inter.h
+SRCS+= sm_inter_xdr.c
+CLEANFILES+= sm_inter_xdr.c
 
-RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm_inter.x
+RPCSRC= ${.CURDIR}/../../include/rpcsvc/sm_inter.x
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C
 
 sm_inter_svc.c: ${RPCSRC}
 	${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
 
+sm_inter_xdr.c: ${RPCSRC}
+	${RPCGEN} -c -o ${.TARGET} ${RPCSRC}
+
 sm_inter.h: ${RPCSRC}
 	${RPCGEN} -h -o ${.TARGET} ${RPCSRC}