pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS

Difference between
modified post f551bf by Anonymous on Thu 19th Oct 2023 19:26
original post 8c3d3 by Anonymous on Thu 19th Oct 2023 18:05
Download diff
Show old version | new version | both versions

    
11
diff --git a/daemon/acl.c b/daemon/acl.c
22
index 1d1eac4..9c30eeb 100644
33
--- a/daemon/acl.c
44
+++ b/daemon/acl.c
55
@@ -223,6 +223,19 @@ static int map_name_2_sid(nfs41_daemon_globals *nfs41dg, int query, DWORD *sid_l
66
             name = "roland_mainz";
77
             dprintf(ACLLVL, "map_name_2_sid: remap 1616 --> roland_mainz\n");
88
         }
99
+        else if (!strcmp(name, "swulsch")) {
1010
+            name = "siegfried_wulsch";
1111
+            dprintf(ACLLVL, "map_name_2_sid: remap swulsch --> siegfried_wulsch\n");
1212
+        }
1313
+        else if (!strcmp(name, "197609")) {
1414
+            name = "siegfried_wulsch";
1515
+            dprintf(ACLLVL, "map_name_2_sid: remap 197609 --> siegfried_wulsch\n");
1616
+        }
1717
+        else if (!strcmp(name, "1818")) {
1818
+            name = "siegfried_wulsch";
1919
+            dprintf(ACLLVL, "map_name_2_sid: remap 1818 --> siegfried_wulsch\n");
2020
+        }
2121
+
2222
     }
2323
 #endif /* NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID */
2424
2525
diff --git a/daemon/daemon_debug.h b/daemon/daemon_debug.h
26-
index f484d58..85b0507 100644
26+
index f484d58..b77e7d7 100644
2727
--- a/daemon/daemon_debug.h
2828
+++ b/daemon/daemon_debug.h
2929
@@ -34,6 +34,11 @@
3030
 #define DEFAULT_DEBUG_LEVEL 1
3131
3232
3333
+#define DASSERT(exp) \
3434
+    if (!(exp)) { \
35-
+        dprintf(0, "ASSERTION '%s' in %s/%ld failed.\n", \
35+
+        eprintf("ASSERTION '%s' in '%s'/%ld failed.\n", \
36-
+            __FILE__, (long)__LINE__, ""#exp""); }
36+
+            ""#exp"", __FILE__, (long)__LINE__); }
3737
+
3838
 /* daemon_debug.h */
3939
 void set_debug_level(int level);
4040
 void dprintf(int level, LPCSTR format, ...);
4141
diff --git a/daemon/lookup.c b/daemon/lookup.c
42-
index ea0a9d2..a2862de 100644
42+
index ea0a9d2..f72afe5 100644
4343
--- a/daemon/lookup.c
4444
+++ b/daemon/lookup.c
4545
@@ -85,7 +85,8 @@ static void init_component_args(
4646
     args->attr_request.arr[1] = FATTR4_WORD1_MODE
4747
         | FATTR4_WORD1_NUMLINKS | FATTR4_WORD1_SYSTEM
4848
         | FATTR4_WORD1_TIME_ACCESS | FATTR4_WORD1_TIME_CREATE
4949
-        | FATTR4_WORD1_TIME_MODIFY;
5050
+        | FATTR4_WORD1_TIME_MODIFY
5151
+        | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP;
5252
5353
     args->getrootattr.attr_request = &args->attr_request;
5454
     res->root.path = path;
55-
diff --git a/daemon/name_cache.c b/daemon/name_cache.c
55+
@@ -210,8 +211,12 @@ static int server_lookup(
56-
index eaa0f36..3770214 100644
56+
     if (count == 0) {
57-
--- a/daemon/name_cache.c
57+
         if (target_out)
58-
+++ b/daemon/name_cache.c
58+
             *target_out = dir;
59-
@@ -401,7 +401,11 @@ struct nfs41_name_cache {
59+
-        if (info_out)
60-
 static __inline bool_t name_cache_enabled(
60+
+        if (info_out) {
61-
     IN struct nfs41_name_cache *cache)
61+
+            /* fixme: need |copy_nfs41_file_info()| */
62-
 {
62+
             memcpy(info_out, res->getrootattr.info, sizeof(nfs41_file_info));
63-
+#if 1
63+
+            info_out->owner = info_out->owner_buf;
64-
+    return 0; /* fixme: caching of owner/owner_group not supported yet */
64+
+            info_out->owner_group = info_out->owner_group_buf;
65-
+#else
65+
+        }
66-
     return cache->expiration > 0;
66+
     } else if (count == 1) {
67-
+#endif
67+
         if (parent_out)
68-
 }
68+
             *parent_out = dir;
69-
69+
@@ -258,8 +263,12 @@ static int server_lookup(
70-
 static __inline void name_cache_entry_rename(
70+
         if (i == count-1) {
71-
diff --git a/daemon/nfs41_types.h b/daemon/nfs41_types.h
71+
             if (target_out)
72-
index c5bad79..18a763a 100644
72+
                 *target_out = file;
73-
--- a/daemon/nfs41_types.h
73+
-            if (info_out)
74-
+++ b/daemon/nfs41_types.h
74+
+            if (info_out) {
75-
@@ -236,6 +236,10 @@ typedef struct __nfs41_file_info {
75+
+                /* fixme: need |copy_nfs41_file_info()| */
76-
     char                    *owner;
76+
                 memcpy(info_out, res->getattr[i].info, sizeof(nfs41_file_info));
77-
     char                    *owner_group;
77+
+                info_out->owner = info_out->owner_buf;
78-
     uint32_t                aclsupport;
78+
+                info_out->owner_group = info_out->owner_group_buf;
79-
+
79+
+            }
80-
+    /* Buffers */
80+
         } else if (i == count-2) {
81-
+    char owner_buf[NFS4_OPAQUE_LIMIT+1];
81+
             if (parent_out)
82-
+    char owner_group_buf[NFS4_OPAQUE_LIMIT+1];
82+
                 *parent_out = file;
83-
 } nfs41_file_info;
83+
diff --git a/daemon/name_cache.c b/daemon/name_cache.c
84-
84+
index eaa0f36..2b7c257 100644
85-
 #endif /* !__NFS41_DAEMON_TYPES_H__ */
85+
--- a/daemon/name_cache.c
86-
diff --git a/daemon/nfs41_xdr.c b/daemon/nfs41_xdr.c
86+
+++ b/daemon/name_cache.c
87-
index 176b613..67c9bf6 100644
87+
@@ -99,6 +99,8 @@ struct attr_cache_entry {
88-
--- a/daemon/nfs41_xdr.c
88+
     unsigned                type : 4;
89-
+++ b/daemon/nfs41_xdr.c
89+
     unsigned                invalidated : 1;
90-
@@ -1802,19 +1802,33 @@ static bool_t decode_file_attrs(
90+
     unsigned                delegated : 1;
91-
                 return FALSE;
91+
+    char                    owner[NFS4_OPAQUE_LIMIT+1];
92-
         }
92+
+    char                    owner_group[NFS4_OPAQUE_LIMIT+1];
93-
         if (attrs->attrmask.arr[1] & FATTR4_WORD1_OWNER) {
93+
 };
94-
-            char *ptr = &info->owner[0];
94+
 #define ATTR_ENTRY_SIZE sizeof(struct attr_cache_entry)
95-
+            if (info->owner == NULL)
95+
96-
+                info->owner = info->owner_buf;
96+
@@ -304,6 +306,14 @@ static void attr_cache_update(
97-
+
97+
     if (info->attrmask.count >= 2) {
98-
+            char *ptr = info->owner;
98+
         if (info->attrmask.arr[1] & FATTR4_WORD1_MODE)
99-
             uint32_t owner_len;
99+
             entry->mode = info->mode;
100-
             if (!xdr_bytes(xdr, &ptr, &owner_len,
100+
+        if (info->attrmask.arr[1] & FATTR4_WORD1_OWNER) {
101-
-                            NFS4_OPAQUE_LIMIT))
101+
+            DASSERT(info->owner != NULL);
102-
+                            NFS4_OPAQUE_LIMIT)) {
102+
+            (void)strcpy(entry->owner, info->owner);
103-
+                info->owner = NULL;
103+
+        }
104-
                 return FALSE;
104+
+        if (info->attrmask.arr[1] & FATTR4_WORD1_OWNER_GROUP) {
105-
+            }
105+
+            DASSERT(info->owner_group != NULL);
106-
+            DASSERT(owner_len > 0);
106+
+            (void)strcpy(entry->owner_group, info->owner_group);
107-
+            DASSERT(owner_len < sizeof(info->owner_group_buf));
107+
+        }
108-
             info->owner[owner_len] = '\0';
108+
         if (info->attrmask.arr[1] & FATTR4_WORD1_NUMLINKS)
109-
         }
109+
             entry->numlinks = info->numlinks;
110-
         if (attrs->attrmask.arr[1] & FATTR4_WORD1_OWNER_GROUP) {
110+
         if (info->attrmask.arr[1] & FATTR4_WORD1_TIME_ACCESS) {
111-
-            char *ptr = &info->owner_group[0];
111+
@@ -341,6 +351,14 @@ static void copy_attrs(
112-
+            if (info->owner_group == NULL)
112+
     dst->type = src->type;
113-
+                info->owner_group = info->owner_group_buf;
113+
     dst->numlinks = src->numlinks;
114-
+
114+
     dst->mode = src->mode;
115-
+            char *ptr = info->owner_group;
115+
+    DASSERT(src->owner != NULL);
116-
             uint32_t owner_group_len;
116+
+//    if (dst->owner == NULL)
117-
             if (!xdr_bytes(xdr, &ptr, &owner_group_len,
117+
+        dst->owner = dst->owner_buf;
118-
-                            NFS4_OPAQUE_LIMIT))
118+
+    (void)strcpy(dst->owner, src->owner);
119-
+                            NFS4_OPAQUE_LIMIT)) {
119+
+    DASSERT(src->owner_group != NULL);
120-
+                info->owner_group = NULL;
120+
+//    if (dst->owner_group == NULL)
121-
                 return FALSE;
121+
+        dst->owner_group = dst->owner_group_buf;
122-
+            }
122+
+    (void)strcpy(dst->owner_group, src->owner_group);
123-
+            DASSERT(owner_group_len > 0);
123+
     dst->fileid = src->fileid;
124-
+            DASSERT(owner_group_len < sizeof(info->owner_group_buf));
124+
     dst->hidden = src->hidden;
125-
             info->owner_group[owner_group_len] = '\0';
125+
     dst->system = src->system;
126+
@@ -353,7 +371,8 @@ static void copy_attrs(
126133
         }
133134
135-
         bitmap4 og_attr_request = { 0 };
136-
-        nfs41_file_info og_info = { 0 };
137-
-        char owner[NFS4_OPAQUE_LIMIT], group[NFS4_OPAQUE_LIMIT];
138-
+        char owner[NFS4_OPAQUE_LIMIT], owner_group[NFS4_OPAQUE_LIMIT];
139-
         nfsacl41 acl = { 0 };
140135
141-
-        /*
136+
@@ -401,7 +420,11 @@ struct nfs41_name_cache {
142-
-         * gisburn:
137+
 static __inline bool_t name_cache_enabled(
143-
-         * 1. We should cache owner/group information
138+
     IN struct nfs41_name_cache *cache)
144-
-         * 2. We should always ask for
139+
 {
145-
-         * FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP with the other
140+
+#if 0
146-
-         * attributes
141+
+    return 0; /* fixme: caching of owner/owner_group not supported yet */
147-
-         */
142+
+#else
148-
-        og_attr_request.count = 2;
143+
     return cache->expiration > 0;
149-
-        og_attr_request.arr[1] = FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP;
144+
+#endif
150-
-        og_info.owner = owner;
145+
 }
151-
-        og_info.owner_group = group;
146+
152-
-        status = nfs41_getattr(state->session, &state->file, &og_attr_request, &og_info);
147+
 static __inline void name_cache_entry_rename(
153-
-        if (status) {
148+
diff --git a/daemon/nfs41_daemon.c b/daemon/nfs41_daemon.c
154-
-            eprintf("get_stat_data: nfs41_cached_getattr() failed with %d\n",
149+
index 42bfc6c..bc69fa8 100644
155-
-            status);
150+
--- a/daemon/nfs41_daemon.c
156-
-        }
151+
+++ b/daemon/nfs41_daemon.c
157-
-
152+
@@ -402,6 +402,7 @@ VOID ServiceStart(DWORD argc, LPTSTR *argv)
158-
         uid_t map_uid = -1;
153+
 #ifdef NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN
159-
         gid_t gid_dummy = -1;
154+
     /* force enable for cygwin getent passwd/group testing */
160-
         gid_t map_gid = -1;
155+
     cmd_args.ldap_enable = TRUE;
161-
         char *at_ch; /* pointer to '@' */
156+
+    DASSERT(cmd_args.ldap_enable == FALSE);
157+
 #endif /* NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN */
162158
163-
+        DASSERT(info.owner != NULL);
159+
     nfs41_server_list_init();
164-
+        DASSERT(info.owner_group != NULL);
160+
diff --git a/daemon/nfs41_types.h b/daemon/nfs41_types.h
165-
+        (void)strcpy(owner, info.owner?info.owner:"<FIXME_OWNER>");
161+
index c5bad79..18a763a 100644
166-
+        (void)strcpy(owner_group, info.owner_group?info.owner_group:"<FIXME_GROUP>");
162+
--- a/daemon/nfs41_types.h
163+
+++ b/daemon/nfs41_types.h
167168
+
168-
         /*
169+
+    /* Buffers */
169-
          * Map owner to local uid
170+
+    char owner_buf[NFS4_OPAQUE_LIMIT+1];
170-
          *
171+
+    char owner_group_buf[NFS4_OPAQUE_LIMIT+1];
171-
@@ -697,12 +684,12 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
172+
 } nfs41_file_info;
178173
179-
         if (nfs41_idmap_name_to_ids(
174+
 #endif /* !__NFS41_DAEMON_TYPES_H__ */
180-
             nfs41dg->idmapper,
175+
diff --git a/daemon/nfs41_xdr.c b/daemon/nfs41_xdr.c
181-
-            og_info.owner,
176+
index 176b613..67c9bf6 100644
182-
+            owner,
177+
--- a/daemon/nfs41_xdr.c
183-
             &map_uid,
178+
+++ b/daemon/nfs41_xdr.c
184-
             &gid_dummy) == 0) {
179+
@@ -1802,19 +1802,33 @@ static bool_t decode_file_attrs(
185-
              args->owner_local_uid = map_uid;
180+
                 return FALSE;
192181
         }
193-
182+
         if (attrs->attrmask.arr[1] & FATTR4_WORD1_OWNER) {
194-
         /*
183+
-            char *ptr = &info->owner[0];
195-
@@ -721,12 +708,12 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
184+
+            if (info->owner == NULL)
196-
          * ("gisgrp") or username@domain ("gisgrp@sun.com")
185+
+                info->owner = info->owner_buf;
197-
          */
186+
+
198-
         /* stomp over '@' */
187+
+            char *ptr = info->owner;
199-
-        if (at_ch = strchr(og_info.owner_group, '@'))
188+
             uint32_t owner_len;
200-
+        if (at_ch = strchr(owner_group, '@'))
189+
             if (!xdr_bytes(xdr, &ptr, &owner_len,
201-
             *at_ch = '\0';
190+
-                            NFS4_OPAQUE_LIMIT))
202-
191+
+                            NFS4_OPAQUE_LIMIT)) {
203-
         if (nfs41_idmap_group_to_gid(
192+
+                info->owner = NULL;
204-
             nfs41dg->idmapper,
193+
                 return FALSE;
205-
-            og_info.owner_group,
194+
+            }
206-
+            owner_group,
195+
+            DASSERT(owner_len > 0);
207-
             &map_gid) == 0) {
196+
+            DASSERT(owner_len < sizeof(info->owner_group_buf));
208-
             args->owner_group_local_gid = map_gid;
197+
             info->owner[owner_len] = '\0';
209198
         }
210-
@@ -734,12 +721,12 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
199+
         if (attrs->attrmask.arr[1] & FATTR4_WORD1_OWNER_GROUP) {
211-
             args->owner_group_local_gid = NFS_GROUP_NOGROUP_GID;
200+
-            char *ptr = &info->owner_group[0];
212-
             eprintf("get_stat_data: "
201+
+            if (info->owner_group == NULL)
213-
                 "no group mapping for '%s', fake gid=%d\n",
202+
+                info->owner_group = info->owner_group_buf;
214-
-                og_info.owner_group, args->owner_group_local_gid);
203+
+
215-
+                owner_group, args->owner_group_local_gid);
204+
+            char *ptr = info->owner_group;
216-
         }
205+
             uint32_t owner_group_len;
217-
206+
             if (!xdr_bytes(xdr, &ptr, &owner_group_len,
218-
         dprintf(1, "handle_open: stat: owner=%u/'%s', owner_group=%u/'%s'\n",
207+
-                            NFS4_OPAQUE_LIMIT))
219-
-            (unsigned int)args->owner_local_uid, og_info.owner,
208+
+                            NFS4_OPAQUE_LIMIT)) {
220-
-            (unsigned int)args->owner_group_local_gid, og_info.owner_group);
209+
+                info->owner_group = NULL;
221-
+            (unsigned int)args->owner_local_uid, owner,
210+
                 return FALSE;
222-
+            (unsigned int)args->owner_group_local_gid, owner_group);
211+
+            }
223-
 #endif /* NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES */
212+
+            DASSERT(owner_group_len > 0);
224-
     } else {
213+
+            DASSERT(owner_group_len < sizeof(info->owner_group_buf));
225-
         nfs41_file_info createattrs = { 0 };
214+
             info->owner_group[owner_group_len] = '\0';
226-
diff --git a/sys/nfs41_build_features.h b/sys/nfs41_build_features.h
215+
         }
227-
index 93ee7a9..d43334a 100644
216+
         if (attrs->attrmask.arr[1] & FATTR4_WORD1_SPACE_AVAIL) {
228-
--- a/sys/nfs41_build_features.h
217+
diff --git a/daemon/open.c b/daemon/open.c
229-
+++ b/sys/nfs41_build_features.h
218+
index 13e82b2..f1d7f20 100644
230-
@@ -32,19 +32,19 @@
219+
--- a/daemon/open.c
231-
 /*
220+
+++ b/daemon/open.c
232-
  * NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES - return local uid/gid values
221+
@@ -629,7 +629,7 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
233-
  */
222+
         status = NO_ERROR;
234-
-// #define NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES 1
223+
     } else if (args->symlink.len) {
235-
+#define NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES 1
224+
         /* handle cygwin symlinks */
225+
-        nfs41_file_info createattrs;
236232
237-
 /*
233+
 #ifdef NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES
238-
  * NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID - give NFS
234+
-        bitmap4 og_attr_request = { 0 };
239-
  * files which do not map to a local account a SID in the
235+
-        nfs41_file_info og_info = { 0 };
240-
  * Unix_User+x/Unix_Group+x range
236+
-        char owner[NFS4_OPAQUE_LIMIT], group[NFS4_OPAQUE_LIMIT];
241-
  */
237+
-        nfsacl41 acl = { 0 };
242-
-// #define NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID 1
238+
-
243-
+#define NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID 1
239+
-        /*
244-
240+
-         * gisburn:
245-
 /*
241+
-         * 1. We should cache owner/group information
246-
  * NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN - use Cygwin /usr/bin/getent
242+
-         * 2. We should always ask for
247-
  * as "name service"
243+
-         * FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP with the other
248-
  */
244+
-         * attributes
249-
-// #define NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN 1
245+
-         */
250-
+#define NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN 1
246+
-        og_attr_request.count = 2;
251-
247+
-        og_attr_request.arr[1] = FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP;
252-
 #endif /* !_NFS41_DRIVER_BUILDFEATURES_ */
248+
-        og_info.owner = owner;
253-
249+
-        og_info.owner_group = group;
254-
250+
-        status = nfs41_getattr(state->session, &state->file, &og_attr_request, &og_info);
255-
251+
-        if (status) {
256-
252+
-            eprintf("get_stat_data: nfs41_cached_getattr() failed with %d\n",
257-
253+
-            status);
258-
254+
-        }
259-
255+
-
260-
256+
+        char owner[NFS4_OPAQUE_LIMIT], owner_group[NFS4_OPAQUE_LIMIT];
261-
257+
         uid_t map_uid = -1;
262-
258+
         gid_t gid_dummy = -1;
263-
259+
         gid_t map_gid = -1;
264-
260+
         char *at_ch; /* pointer to '@' */
265261
266-
262+
+        DASSERT((info.attrmask.arr[1] & FATTR4_WORD1_OWNER) != 0);
267-
263+
+        DASSERT((info.attrmask.arr[1] & FATTR4_WORD1_OWNER_GROUP) != 0);
268-
264+
+        DASSERT(info.owner != NULL);
269-
265+
+        DASSERT(info.owner_group != NULL);
270-
266+
+        DASSERT(info.owner == info.owner_buf);
271-
267+
+        DASSERT(info.owner_group == info.owner_group_buf);
272-
268+
+        (void)strcpy(owner, info.owner?info.owner:"<FIXME_OWNER>");
273-
269+
+        (void)strcpy(owner_group, info.owner_group?info.owner_group:"<FIXME_GROUP>");
274-
270+
+
275-
271+
         /*
276-
272+
          * Map owner to local uid
277-
273+
          *
278-
274+
@@ -697,12 +685,12 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
279-
275+
          *  ("gisburn") or username@domain ("gisburn@sun.com")
280-
276+
          */
281-
277+
         /* stomp over '@' */
282-
278+
-        if (at_ch = strchr(og_info.owner, '@'))
283-
279+
+        if (at_ch = strchr(owner, '@'))
284-
280+
             *at_ch = '\0';
285281
286-
282+
         if (nfs41_idmap_name_to_ids(
287-
283+
             nfs41dg->idmapper,
288-
284+
-            og_info.owner,
289-
285+
+            owner,
290-
286+
             &map_uid,
291-
287+
             &gid_dummy) == 0) {
292-
288+
              args->owner_local_uid = map_uid;
293-
289+
@@ -711,7 +699,7 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
294-
290+
             args->owner_local_uid = NFS_USER_NOBODY_UID;
295-
291+
             eprintf("get_stat_data: "
296-
292+
                 "no username mapping for '%s', fake uid=%d\n",
297-
293+
-                og_info.owner, args->owner_local_uid);
298-
294+
+                owner, args->owner_local_uid);
299-
295+
         }
300296
301-
297+
         /*
302-
298+
@@ -721,12 +709,12 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
303-
299+
          * ("gisgrp") or username@domain ("gisgrp@sun.com")
304-
300+
          */
305-
301+
         /* stomp over '@' */
306-
302+
-        if (at_ch = strchr(og_info.owner_group, '@'))
307-
303+
+        if (at_ch = strchr(owner_group, '@'))
308-
304+
             *at_ch = '\0';
309305
310-
306+
         if (nfs41_idmap_group_to_gid(
311-
307+
             nfs41dg->idmapper,
312-
308+
-            og_info.owner_group,
313-
309+
+            owner_group,
314-
310+
             &map_gid) == 0) {
315-
311+
             args->owner_group_local_gid = map_gid;
316-
312+
         }
317-
313+
@@ -734,12 +722,12 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
318-
314+
             args->owner_group_local_gid = NFS_GROUP_NOGROUP_GID;
319-
315+
             eprintf("get_stat_data: "
320-
316+
                 "no group mapping for '%s', fake gid=%d\n",
321-
317+
-                og_info.owner_group, args->owner_group_local_gid);
322-
318+
+                owner_group, args->owner_group_local_gid);
323-
319+
         }
324320
325-
321+
         dprintf(1, "handle_open: stat: owner=%u/'%s', owner_group=%u/'%s'\n",
326-
322+
-            (unsigned int)args->owner_local_uid, og_info.owner,
327-
323+
-            (unsigned int)args->owner_group_local_gid, og_info.owner_group);
328-
324+
+            (unsigned int)args->owner_local_uid, owner,
329-
325+
+            (unsigned int)args->owner_group_local_gid, owner_group);
330-
326+
 #endif /* NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES */
331-
327+
     } else {
332-
328+
         nfs41_file_info createattrs = { 0 };
333-
329+
diff --git a/sys/nfs41_build_features.h b/sys/nfs41_build_features.h
334-
330+
index 93ee7a9..d43334a 100644
335-
331+
--- a/sys/nfs41_build_features.h
336-
332+
+++ b/sys/nfs41_build_features.h
337-
333+
@@ -32,19 +32,19 @@
338-
334+
 /*
339-
335+
  * NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES - return local uid/gid values
340-
336+
  */
341-
337+
-// #define NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES 1
342-
338+
+#define NFS41_DRIVER_FEATURE_LOCAL_UIDGID_IN_NFSV3ATTRIBUTES 1
343339
344-
340+
 /*
345-
341+
  * NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID - give NFS
346-
342+
  * files which do not map to a local account a SID in the
347-
343+
  * Unix_User+x/Unix_Group+x range
348-
344+
  */
349-
345+
-// #define NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID 1
350-
346+
+#define NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID 1
351347
352-
348+
 /*
353-
349+
  * NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN - use Cygwin /usr/bin/getent
354-
350+
  * as "name service"
355-
351+
  */
356-
352+
-// #define NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN 1
357-
353+
+#define NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN 1
358354
359-
355+
 #endif /* !_NFS41_DRIVER_BUILDFEATURES_ */
360356

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at