[SSSD] [PATCH] NSS: Add sss_readrep_copy_string

Stephen Gallagher sgallagh at redhat.com
Thu Jan 12 20:43:46 UTC 2012


On Wed, 2012-01-11 at 14:14 +0100, Jan Zelený wrote:
> > There were many places in the client code where we were
> > duplicating a loop to copy data in from the response buffer. This
> > patch turns those loops into a function for easier maintenance and
> > easier-to-read *readrep() routines.
> > 
> > The netgroup code required the addition of a "temp" string while doing
> > the copying, since the netgroup struct requires a (const char *) and the
> > buffer manipulation was done using (char *).
> > 
> > This patch follows "[PATCH] NSS: Validate input string lengths" in my
> > tree but will apply without it.
> 
> Just one thing, in nss_netgroup.c I think you might want to use the last 
> argument of sss_readrep_copy_string() instead of testing strlen() afterwards. 
> Other than that the patch should be ok, but I did only visual review, no 
> actual testing.

Good idea. New patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-NSS-Add-sss_readrep_copy_string.patch
Type: text/x-patch
Size: 15477 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120112/c7caa126/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120112/c7caa126/attachment.sig>


More information about the sssd-devel mailing list