[SSSD] [PATCH] NSS: Add sss_readrep_copy_string

Stephen Gallagher sgallagh at redhat.com
Wed Jan 18 14:21:38 UTC 2012


On Wed, 2012-01-18 at 09:05 +0100, Jan Zelený wrote:
> > 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.
> 
> Ack


Pushed to master
-------------- 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/20120118/df2365ef/attachment.sig>


More information about the sssd-devel mailing list