summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/007-map.patch
blob: e031fef2f8c2d8ae08e120066dda86bc296dcc6e (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
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
Upstream-Status: Inappropriate [other]
Upstream is not making further releases of this software.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>

# Patch origin: nfs-server source RPM from openSUSE 10.3

--- nfs-server/auth.c
+++ nfs-server/auth.c	2002/11/08 12:49:13
@@ -595,7 +595,6 @@
 	cp->clnt_addr.s_addr = INADDR_ANY;
 	cp->flags = 0;
 	cp->m = NULL;
-	cp->umap = NULL;
 
 	if (hname == NULL) {
 		if (anonymous_client != NULL) {
@@ -1200,10 +1199,9 @@
 			free (mp->path);
 			if (mp->o.clnt_nisdomain)
 				free(mp->o.clnt_nisdomain);
+			if (mp->umap)
+				ugid_free_map(mp->umap);
 			free (mp);
-		}
-		if (cp->umap != NULL) {
-			ugid_free_map(cp->umap);
 		}
 		free (cp);
 	}
--- nfs-server/auth.h
+++ nfs-server/auth.h	2002/11/08 12:50:24
@@ -66,6 +66,11 @@
 	char *			path;
 	nfs_options		o;
 	dev_t			mount_dev;
+	/*
+	 * This is the uid/gid map.
+	 * See ugid_map.c for details
+	 */
+	struct ugid_map *	umap;
 	/* Original NFS client */
 	struct nfs_client *	origin;
 } nfs_mount;
@@ -77,12 +82,6 @@
 	char *			clnt_name;
 	unsigned short		flags;
 	nfs_mount *		m;
-
-	/*
-	 * This is the uid/gid map.
-	 * See ugid_map.c for details
-	 */
-	struct ugid_map *	umap;
 } nfs_client;
 
 #define AUTH_CLNT_WILDCARD	0x0001
--- nfs-server/ugid_map.c
+++ nfs-server/ugid_map.c	2002/11/08 12:49:14
@@ -401,12 +401,11 @@
 static ugid_map *
 ugid_get_map(nfs_mount *mountp)
 {
-	nfs_client	*clientp = mountp->client;
 	struct ugid_map	*umap;
 	unsigned int	how;
 
-	if (clientp->umap == NULL) {
-		clientp->umap = umap = (ugid_map *) xmalloc(sizeof(ugid_map));
+	if (mountp->umap == NULL) {
+		mountp->umap = umap = (ugid_map *) xmalloc(sizeof(ugid_map));
 		memset(umap, 0, sizeof(ugid_map));
 
 		for (how = 0; how < 4; how++) {
@@ -415,7 +414,7 @@
 		}
 	}
 
-	return clientp->umap;
+	return mountp->umap;
 }
 
 static void