2005-05-23 10:16:00

by Olaf Kirch

[permalink] [raw]
Subject: Small nfs-utils patch

Without this patch, showmount -e would sometimes display
host names that should really have been subsumed under a
wildcard entry.

The problem was that the code in get_exportlist would always
skip the next group entry after removing one FQDN.

Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
[email protected] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax


Attachments:
(No filename) (389.00 B)
nfs-utils-1.0.6-showmount.patch (756.00 B)
Download all attachments

2005-10-07 04:47:26

by NeilBrown

[permalink] [raw]
Subject: Re: Small nfs-utils patch

On Monday May 23, [email protected] wrote:
> Without this patch, showmount -e would sometimes display
> host names that should really have been subsumed under a
> wildcard entry.
>
> The problem was that the code in get_exportlist would always
> skip the next group entry after removing one FQDN.

Thanks. I've committed it to the sourceforge CVS.
(Hey, turn-around of less than 5 months! You can't complain
about that!! :-)

NeilBrown

>
> Olaf
> --
> Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
> [email protected] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
>
> Without this patch, showmount -e would sometimes display
> host names that should really have been subsumed under a
> wildcard entry.
>
> The problem was that the code in get_exportlist would always
> skip the next group entry after removing one FQDN.
>
> Signed-off-by: Olaf Kirch <[email protected]>
>
> Index: nfs-utils-1.0.7/utils/mountd/mountd.c
> ===================================================================
> --- nfs-utils-1.0.7.orig/utils/mountd/mountd.c
> +++ nfs-utils-1.0.7/utils/mountd/mountd.c
> @@ -409,11 +409,9 @@ get_exportlist(void)
> xfree(c->gr_name);
> xfree(c);
> xfree (hp);
> - if ((c = *cp) == NULL)
> - break;
> + continue;
> }
> - else
> - xfree (hp);
> + xfree (hp);
> }
> cp = &(c->gr_next);
> }


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs