Re: bin/144411: [patch] mtree(8) doesn't reject non-regular files for -X
The following reply was made to PR bin/144411; it has been noted by GNATS. From: Garrett Cooper To: bug-followup Cc: Bruce Evans Subject: Re: bin/144411: [patch] mtree(8) doesn't reject non-regular files for -X Date: Wed, 13 Oct 2010 00:18:06 -0700 --001636c933da11631d04927a65d8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Forwarding the feedback received so the information gets captured in th= e PR. Thanks for the help with the review Bruce! -Garrett -- Forwarded message -- From: Bruce Evans Date: Tue, Oct 12, 2010 at 9:02 PM Subject: Re: bin/144411: [patch] mtree(8) doesn't reject non-regular files for -X To: Garrett Cooper Cc: Bruce Evans , freebsd-bugs@freebsd.org On Sun, 10 Oct 2010, Garrett Cooper wrote: > ... > =A0 I've been sitting on this PR for a while and I'd like to wrap it > up and move on, if that's ok. Here's a patch with a more suitable > comment above the stat(2) call. % Index: usr.sbin/mtree/excludes.c % =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D % --- usr.sbin/mtree/excludes.c (revision 213667) % +++ usr.sbin/mtree/excludes.c (working copy) % @@ -30,9 +30,10 @@ % =A0#include % =A0__FBSDID("$FreeBSD$"); % % +#include % +#include % +#include =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* XXX for mtree.h = */ % =A0#include % -#include =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* XXX for mtree.h = */ % -#include % % =A0#include % =A0#include % @@ -63,11 +64,22 @@ % =A0void % =A0read_excludes_file(const char *name) % =A0{ % + =A0 =A0 struct stat exclude_stat; % + =A0 =A0 struct exclude *e; % =A0 =A0 =A0 FILE *fp; % =A0 =A0 =A0 char *line, *str; % - =A0 =A0 struct exclude *e; % =A0 =A0 =A0 size_t len; % % + =A0 /* % + =A0 * Make sure that the path we're dealing with points to a regular file, % + =A0 =A0 =A0* because the exclude list should be a regular file, not a d= irectory, % + =A0 =A0 =A0* etc. % + =A0 =A0 =A0*/ % + =A0 =A0 if (stat(name, &exclude_stat) !=3D 0) % + =A0 =A0 =A0 =A0 =A0 =A0 err(EXIT_FAILURE, "stat: %s", name); % + =A0 =A0 if (!S_ISREG(exclude_stat.st_mode)) % + =A0 =A0 =A0 =A0 =A0 =A0 errx(EXIT_FAILURE, "invalid exclude file: %s", = name); % + % =A0 =A0 =A0 fp =3D fopen(name, "r"); % =A0 =A0 =A0 if (fp =3D=3D 0) % =A0 =A0 =A0 =A0 =A0 =A0 =A0 err(1, "%s", name); I like the main part of the patch. The reordering of the includes may be premature or incomplete. =A0Old sources include first since it was a prerequisite for all POSIX headers, and most FreeBSD man pages and style(9) still say to do this although POSIX dropped this requirement in 2001 or earlier and FreeBSD mostly removed this requirement in ~2002-2003. =A0So now, the include of might not be needed at all, but it is hard to tell since there is so much pollution in other headers. =A0I would keep the include of first if it is kept. Bruce --001636c933da11631d04927a65d8 Content-Type: text/plain; charset=US-ASCII; name="bin.144411.diff.txt" Content-Disposition: attachment; filename="bin.144411.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gf7v7you0 SW5kZXg6IHVzci5zYmluL210cmVlL2V4Y2x1ZGVzLmMKPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLnNiaW4v bXRyZWUvZXhjbHVkZXMuYwkocmV2aXNpb24gMjEzNjY3KQorKysgdXNyLnNiaW4vbXRyZWUvZXhj bHVkZXMuYwkod29ya2luZyBjb3B5KQpAQCAtMzAsOSArMzAsMTAgQEAKICNpbmNsdWRlIDxzeXMv Y2RlZnMuaD4KIF9fRkJTRElEKCIkRnJlZUJTRCQi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wKQogCQllcnIoMSwgIiVzIiwgbmFtZSk7 Cg== --001636c933da11631d04927a65d8-- ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubs
kern/151435: Reference leak in ip_dooptions()
>Number: 151435 >Category: kern >Synopsis: Reference leak in ip_dooptions() >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 13 20:00:18 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Andrew Boyer >Release:head >Organization: Avere Systems >Environment: N/A >Description: SVN 194760 changed ifa_ifwithaddr() so that it returns a reference along with the ifa. ifa_ifwithaddr_check() was added to simplify things for callers who didn't want to deal with a reference. On line 344 of sys/netinet/ip_options.c, there's a call to ifa_ifwithaddr() that does not store a return value. It looks like it should have been converted to ifa_ifwithaddr_check(). This is only an issue if packets with IPOPT_TS_PRESPEC set are received, so it's not likely been a problem for anyone. >How-To-Repeat: Unknown - found by code review. >Fix: --- sys/netinet/ip_options.c +++ sys/netinet/ip_options.c @@ -341,7 +341,7 @@ dropit: } (void)memcpy(&ipaddr.sin_addr, sin, sizeof(struct in_addr)); - if (ifa_ifwithaddr((SA)&ipaddr) == NULL) + if (ifa_ifwithaddr_check((SA)&ipaddr) == 0) continue; cp[IPOPT_OFFSET] += sizeof(struct in_addr); off += sizeof(struct in_addr); >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
Re: bin/149403: truss(1) hangs when user input is requested
The following reply was made to PR bin/149403; it has been noted by GNATS. From: Ilya Bakulin To: bug-follo...@freebsd.org, mwisnicki+free...@gmail.com Cc: Subject: Re: bin/149403: truss(1) hangs when user input is requested Date: Thu, 14 Oct 2010 00:02:25 +0400 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMQ0KDQpTZWVtcyB0 aGF0IHRydXNzKDEpIGlzIG5vdCBzdXBwb3NlZCB0byB0cmFuc2ZlciBhbnkgY29udHJvbCB0byB0 aGUgdHJhY2VkIHByb2dyYW0gKGp1ZGdpbmcgYnkgc291cmNlDQpjb2RlKSwgc28gdGhpcyBpcyBu b3QgYSBidWcuDQoNCi0gLS0gDQpSZWdhcmRzLA0KSWx5YSBCYWt1bGluDQpodHRwOi8va2liYWIu Y29tDQp4bXBwOi8va2liYWI2MTJAamFiYmVyLnJ1DQotLS0tLUJFR0lOIFBHUCBTSUdOQVRVUkUt LS0tLQ0KVmVyc2lvbjogR251UEcgdjIuMC4xNSAoRnJlZUJTRCkNCg0KaUVZRUFSRUNBQVlGQWt5 MkVGY0FDZ2tRbzl2bGoxb2Fkd2dWMUFDZlZib1dCNjZQcGxmc01HOUlZU1lla2txZw0KRnF3QW13 VFFDdmRDRG0wR0dpUDMzckFFcXpBWnZYNTMNCj1xUnhTDQotLS0tLUVORCBQR1AgU0lHTkFUVVJF LS0tLS0NCg== ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
Re: bin/149403: truss(1) hangs when user input is requested
The following reply was made to PR bin/149403; it has been noted by GNATS. From: Marcin Wisnicki To: Ilya Bakulin Cc: bug-follo...@freebsd.org Subject: Re: bin/149403: truss(1) hangs when user input is requested Date: Wed, 13 Oct 2010 22:35:36 +0200 On Wed, Oct 13, 2010 at 22:02, Ilya Bakulin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Seems that truss(1) is not supposed to transfer any control to the traced > program (judging by source > code), so this is not a bug. > Code does not matter. User wants to trace a program, uses truss to do it and it doesn't work. A bug from user's perspective. Especially when it works on other operating systems. If fixing it is hard and no one is willing to do it any time soon, then truss(1) should have a note in BUGS section documenting this and other long-time known deficiencies (like broken -f option). > - -- > Regards, > Ilya Bakulin > http://kibab.com > xmpp://kibab...@jabber.ru > -BEGIN PGP SIGNATURE- > Version: GnuPG v2.0.15 (FreeBSD) > > iEYEARECAAYFAky2EFcACgkQo9vlj1oadwgV1ACfVboWB66PplfsMG9IYSYekkqg > FqwAmwTQCvdCDm0GGiP33rAEqzAZvX53 > =qRxS > -END PGP SIGNATURE- > ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
misc/151441: iwi module
>Number: 151441 >Category: misc >Synopsis: iwi module >Confidential: no >Severity: non-critical >Priority: medium >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 14 01:40:07 UTC 2010 >Closed-Date: >Last-Modified: >Originator: faizal >Release:pcbsd >Organization: student >Environment: FreeBSD pcbsd-8459 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sat Jul 17 11:59:09 PDT 2010 r...@build8x32.pcbsd.org:/usr/obj/usr/local_storage/pcbsd-build81-x32/fbsd-source/8.1/sys/PCBSD i386 >Description: iwi module for intel wireless network card not work properly,i'm using Hp nc6220 >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
bin/151442: pc-sysinstall patch to fix bug in image decompression code
>Number: 151442 >Category: bin >Synopsis: pc-sysinstall patch to fix bug in image decompression code >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Oct 14 01:50:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: John Hixson >Release:9.0-CURRENT >Organization: iXsystems >Environment: FreeBSD thinkbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #6: Sat Sep 25 05:21:08 PDT 2010 j...@thinkbsd:/usr/obj/usr/src/sys/THINKBSD amd64 >Description: Leftover code from a previous patch being removed. >How-To-Repeat: >Fix: Patch attached with submission follows: --- usr.sbin/pc-sysinstall/backend/functions-disk.sh2010-10-13 15:28:33.0 -0700 +++ usr.sbin/pc-sysinstall.decompress/backend/functions-disk.sh 2010-09-28 20:24:03.0 -0700 @@ -507,6 +507,17 @@ DEST="${DISK}" fi + if iscompressed "${IMAGE}" + then +local COMPRESSION + +get_compression_type "${IMAGE}" +COMPRESSION="${VAL}" + +decompress_file "${IMAGE}" "${COMPRESSION}" +IMAGE="${VAL}" + fi + write_image "${IMAGE}" "${DEST}" check_disk_layout "${DEST}" fi >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"