diff options
Diffstat (limited to 'xlators/nfs/server/src')
| -rw-r--r-- | xlators/nfs/server/src/mount3-auth.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xlators/nfs/server/src/mount3-auth.c b/xlators/nfs/server/src/mount3-auth.c index 97c95cbfd23..831d92edbef 100644 --- a/xlators/nfs/server/src/mount3-auth.c +++ b/xlators/nfs/server/src/mount3-auth.c @@ -429,6 +429,15 @@ __export_dir_lookup_netgroup (dict_t *dict, char *key, data_t *val, GF_ASSERT ((*key == '@')); + /** + * If at any point in time as we search through the dictionaries, + * if we were marked as "Found", we should exit out immediately + * and not set anything else in this struct. + */ + if (ngsa->found) { + goto out; + } + /* We use ++key here because keys start with '@' for ngs */ ngentry = ng_file_get_netgroup (nfile, (key + 1)); if (!ngentry) { @@ -452,10 +461,6 @@ __export_dir_lookup_netgroup (dict_t *dict, char *key, data_t *val, ngsa); } - /* If the above search was successful, just return */ - if (ngsa->found) - goto out; - /* Run through the netgroups dict */ if (ngentry->netgroup_ngs) { ngsa->_is_host_dict = _gf_false; |
