Re: getnetgrent(3) fails to parse long netgroup entry if it is stored in NIS

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Wed, 16 Mar 2022 08:35:02 UTC
From: Rick Macklem <rmacklem@uoguelph.ca>
Subject: Re: getnetgrent(3) fails to parse long netgroup entry if it is stored in NIS
Date: Tue, 15 Mar 2022 23:15:30 +0000

> "man 5 netgroup" notes that a netgroup line is limited to
> 1024bytes.
> 
> Are you sure you haven't just exceeded this limit?

Thanks for pointing out. It's exactly the cause of my problem. I
didn't know there is such limit.

From: Rick Macklem <rmacklem@uoguelph.ca>
Subject: Re: getnetgrent(3) fails to parse long netgroup entry if it is stored in NIS
Date: Wed, 16 Mar 2022 05:12:49 +0000

> Oh, and you can have netgroups in netgroups, so you can
> do something like...
> 
> net0 net1,net2
> net1 (host1,,),(host2,,)
> net2 (host3,,),(host4,,)
> 
> then net0 has all 4 hosts in it.
> 
> I think you need to break the large netgroup up into sub netgroups
> where each one is <= 1024 bytes long.

I fixed the problem in this way. Thank you so much!

---
Yasuhiro Kimura