mountd: get_exportlist() cleanup From: J. Bruce Fields Comment clarification, minor style cleanup. Signed-off-by: J. Bruce Fields --- utils/mountd/mountd.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- nfs-utils-1.2.1.orig/utils/mountd/mountd.c +++ nfs-utils-1.2.1/utils/mountd/mountd.c @@ -609,20 +609,17 @@ get_exportlist(void) for (exp = exportlist[i].p_head; exp; exp = exp->m_next) { e = lookup_or_create_elist_entry(&elist, exp); - /* We need to check if we should remove - previous ones. */ + /* exports to "*" absorb any others */ if (i == MCL_ANONYMOUS && e->ex_groups) { remove_all_clients(e); continue; } - - if (i != MCL_FQDN && e->ex_groups) { + /* non-FQDN's absorb FQDN's they contain: */ + if (i != MCL_FQDN && e->ex_groups) prune_clients(exp, e); - } - if (exp->m_export.e_hostname [0] != '\0') { + if (exp->m_export.e_hostname[0] != '\0') insert_group(e, exp->m_export.e_hostname); - } } }