summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/013-mntpathlen.patch
blob: 1f10d3c9419a443ce2e100d6a8dc61c5e5f1ed8e (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
# Patch origin: nfs-server source RPM from openSUSE 10.3

--- nfs-server/mountd.c	2006/01/12 14:00:13	1.13
+++ nfs-server/mountd.c	2006/01/12 14:37:35
@@ -76,7 +76,7 @@
 	0
 };
 
-char		argbuf[MNTPATHLEN + 1];
+char		argbuf[PATH_MAX + 1];
 char		*auth_file = NULL;
 static char	*program_name;
 int		need_reinit = 0;
@@ -97,6 +97,9 @@
 /*
  * MOUNT
  * This is what the whole protocol is all about
+ *
+ * Note: librpc gets us MNTPATHLEN length strings, but realpath
+ * needs a PATH_MAX length output buffer.
  */
 fhstatus *
 mountproc_mnt_1_svc(dirpath *argp, struct svc_req *rqstp)
@@ -105,7 +108,7 @@
 	struct stat	stbuf;
 	nfs_client	*cp;
 	nfs_mount	*mp;
-	char		nargbuf[MNTPATHLEN + 1];
+	char		nargbuf[PATH_MAX + 1];
 	int		saved_errno = 0;
 #ifdef WANT_LOG_MOUNTS
 	struct in_addr	addr;