Patch for bin/54446

Xin LI delphij at delphij.net
Tue Nov 25 19:33:51 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

insomniac wrote:
> Hi to everyone,
> I wrote a patch for the bin/54446 PR, fixing pkg_delete(1) that doesn't
> honour symlinks, and portupgrades leads to failing services.
> 
> Actually, this patch fixes that for all the utilities as it acts
> directly in the lib.
> 
> I tested the patch on a few x86 machines, ranging from 7.0 to -HEAD.
> Testing and further reviewing are welcome and encouraged.
> 
> pkg_delete now seems to work fine; moreover I found other bugs, like
> memory leaks, missing checks of function return values, and wrong return
> values.
> 
> The patch has already been reviewed by attilio@ , it applies to
> src/usr.sbin/pkg_install/lib/plist.c and is located at
> 
> http://insomniac.slackware.it/plist.c.diff

I have made a small change: use malloc() here and use strlcpy().  Other
parts looks just fine.

(BTW I think we need to cc portmgr@ for approval)

Cheers,
- --
Xin LI <delphij at delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkksw5EACgkQi+vbBBjt66CVaACfRah4OMrOiFZKzJ3DvzjTnl3K
sE8AnRQeL3lKC/fSnzJn89IQHMAgoudI
=loiW
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plist.diff
Type: text/x-patch
Size: 2912 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20081126/7bf6c22a/plist.bin


More information about the freebsd-current mailing list