Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2022 17:35:02 +0900 (JST)
From:      Yasuhiro Kimura <yasu@FreeBSD.org>
To:        freebsd-current@freebsd.org
Subject:   Re: getnetgrent(3) fails to parse long netgroup entry if it is stored in NIS
Message-ID:  <20220316.173502.1588712462049603767.yasu@FreeBSD.org>
In-Reply-To: <YT2PR01MB97302820DC8F84743AE0FC25DD109@YT2PR01MB9730.CANPRD01.PROD.OUTLOOK.COM> <YT2PR01MB9730984331ED290D85ADFE4DDD119@YT2PR01MB9730.CANPRD01.PROD.OUTLOOK.COM>
References:  <20220316.014814.1921859297745365117.yasu@FreeBSD.org> <YT2PR01MB97302820DC8F84743AE0FC25DD109@YT2PR01MB9730.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220316.173502.1588712462049603767.yasu>