From owner-freebsd-audit Sun Apr 15 17:28: 2 2001 Delivered-To: freebsd-audit@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-32.dsl.lsan03.pacbell.net [63.207.60.32]) by hub.freebsd.org (Postfix) with ESMTP id E01EA37B496; Sun, 15 Apr 2001 17:27:58 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 46891676E0; Sun, 15 Apr 2001 17:27:58 -0700 (PDT) Date: Sun, 15 Apr 2001 17:27:58 -0700 From: Kris Kennaway To: audit@FreeBSD.org, hackers@freebsd.org Subject: OpenBSD interesting commits Message-ID: <20010415172758.A17079@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I've put a mailbox containing some of the 'interesting commits' I've flagged from the OpenBSD CVS commit mailing list at http://www.freebsd.org/~kris/openbsd.mbox There are some easy commits there, but I don't have time to do much myself (it's enough work just reading the commit lists). Perhaps someone else does: if you commit something, or look into it and discover it to not be relevant to FreeBSD, please let me know which messages to remove from the mailbox (i.e. by Message-ID). Kris --ibTvN161/egqYuK8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE62jyNWry0BWjoQKURAryuAJ0UK/rO66Fb4bbG37nqT3BmmG4QJACfc2bK 3Qjn7Bni/BgQOZrO9jpBq0A= =XvOx -----END PGP SIGNATURE----- --ibTvN161/egqYuK8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Apr 16 5:54:25 2001 Delivered-To: freebsd-audit@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id C6E0137B42C; Mon, 16 Apr 2001 05:54:20 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f3GCsFU02210; Mon, 16 Apr 2001 14:54:16 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: arch@freebsd.org, audit@freebsd.org Subject: [PATCH] Axing VOP_BWRITE From: Poul-Henning Kamp Date: Mon, 16 Apr 2001 14:54:15 +0200 Message-ID: <2208.987425655@critter> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have made a patch which axes VOP_BWRITE: http://phk.freebsd.dk/patch/buf_write.patch 20010416 buf_write.patch This patch removes the VOP_BWRITE() vector. VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. As a followup to this patch, all uses of bwrite(bp) should be changed to BUF_BWRITE(bp) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Apr 16 13:31:26 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 0A23537B424 for ; Mon, 16 Apr 2001 13:31:24 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id f3GKVLN82942; Mon, 16 Apr 2001 16:31:21 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20010415172758.A17079@xor.obsecurity.org> References: <20010415172758.A17079@xor.obsecurity.org> Date: Mon, 16 Apr 2001 16:31:19 -0400 To: Kris Kennaway , audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: OpenBSD interesting commits, lpr Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 5:27 PM -0700 4/15/01, Kris Kennaway wrote: >I've put a mailbox containing some of the 'interesting commits' >I've flagged from the OpenBSD CVS commit mailing list at > > http://www.freebsd.org/~kris/openbsd.mbox > >There are some easy commits there, but I don't have time to do >much myself (it's enough work just reading the commit lists). I've glanced at the ones related to lpr/*, and I'm pretty sure that all but the 'lpc' one about "sigjmp & statics begone" are either already applied to freebsd, or are not applicable (our versions of lpr & friends are considerably different than openbsd's). I haven't check that 'lpc' one at all, yet. I'll do further checking of those later on, probably next weekend. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Apr 16 13:34:12 2001 Delivered-To: freebsd-audit@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-27.dsl.lsan03.pacbell.net [63.207.60.27]) by hub.freebsd.org (Postfix) with ESMTP id 0C51A37B43F for ; Mon, 16 Apr 2001 13:34:10 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 2A26F66D8B; Mon, 16 Apr 2001 13:34:06 -0700 (PDT) Date: Mon, 16 Apr 2001 13:34:06 -0700 From: Kris Kennaway To: Garance A Drosihn Cc: Kris Kennaway , audit@FreeBSD.ORG Subject: Re: OpenBSD interesting commits, lpr Message-ID: <20010416133406.A12642@xor.obsecurity.org> References: <20010415172758.A17079@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from drosih@rpi.edu on Mon, Apr 16, 2001 at 04:31:19PM -0400 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 16, 2001 at 04:31:19PM -0400, Garance A Drosihn wrote: > At 5:27 PM -0700 4/15/01, Kris Kennaway wrote: > >I've put a mailbox containing some of the 'interesting commits' > >I've flagged from the OpenBSD CVS commit mailing list at > > > > http://www.freebsd.org/~kris/openbsd.mbox > > > >There are some easy commits there, but I don't have time to do > >much myself (it's enough work just reading the commit lists). >=20 > I've glanced at the ones related to lpr/*, and I'm pretty sure > that all but the 'lpc' one about "sigjmp & statics begone" are > either already applied to freebsd, or are not applicable (our > versions of lpr & friends are considerably different than > openbsd's). I haven't check that 'lpc' one at all, yet. >=20 > I'll do further checking of those later on, probably next weekend. Thanks, I suspected as such. Kris --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE621c9Wry0BWjoQKURAv9dAJ9wq0IQ3KaOSusLEGO10vD1MQAjKQCeOgp7 X9H+OtHIoN13fRSmOrEyaKw= =rekP -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Apr 16 17:58:49 2001 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 8AFF237B42C for ; Mon, 16 Apr 2001 17:58:46 -0700 (PDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3H0xJS75502 for ; Mon, 16 Apr 2001 20:59:19 -0400 (EDT) (envelope-from arr@watson.org) Date: Mon, 16 Apr 2001 20:59:19 -0400 (EDT) From: "Andrew R. Reiter" To: freebsd-audit@freebsd.org Subject: audit work: mbox fixes Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I started making some diffs for -CURRENT today on fixing some bugs that were already fixed in openbsd, per kkenn's topic. I only finished up 2 so far, but kris figured i should start bouncing them off of you guys. If you guys could checkout: http://www.watson.org/~arr/fbsd-audit/libexec/getty/ & http://www.watson.org/~arr/fbsd-audit/sbin/newfs/ Thanks! Andrew *-------------................................................. | Andrew R. Reiter | arr@fledge.watson.org | "It requires a very unusual mind | to undertake the analysis of the obvious" -- A.N. Whitehead To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Apr 16 18:49:55 2001 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 6ACCA37B440 for ; Mon, 16 Apr 2001 18:49:52 -0700 (PDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3H1oOY76134 for ; Mon, 16 Apr 2001 21:50:25 -0400 (EDT) (envelope-from arr@watson.org) Date: Mon, 16 Apr 2001 21:50:24 -0400 (EDT) From: "Andrew R. Reiter" To: freebsd-audit@freebsd.org Subject: more audit work... chpass (openbsd sync) Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-261229086-987472224=:76109" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-261229086-987472224=:76109 Content-Type: TEXT/PLAIN; charset=US-ASCII hi, attached is another diff for chpass to disallow non-printables in the passwd file. this is another obsd sync up. you can also find the diff at www.watson.org/~arr/fbsd-audit/usr.bin/chpass/ andrew *-------------................................................. | Andrew R. Reiter | arr@fledge.watson.org | "It requires a very unusual mind | to undertake the analysis of the obvious" -- A.N. Whitehead --0-261229086-987472224=:76109 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="edit.c.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: LS0tIGVkaXQuYy5vcmlnCU1vbiBBcHIgMTYgMTc6NDQ6NTkgMjAwMQ0KKysr IGVkaXQuYwlNb24gQXByIDE2IDE3OjQ4OjUyIDIwMDENCkBAIC0xODQsMTAg KzE4NCwxMCBAQA0KIAlzdHJ1Y3QgcGFzc3dkICpwdzsNCiB7DQogCUVOVFJZ ICplcDsNCi0JY2hhciAqcDsNCisJY2hhciAqcSwgKnA7DQogCXN0cnVjdCBz dGF0IHNiOw0KIAlGSUxFICpmcDsNCi0JaW50IGxlbiwgbGluZTsNCisJdW5z aWduZWQgaW50IGxlbiwgbGluZTsNCiAJc3RhdGljIGNoYXIgYnVmW0xJTkVf TUFYXTsNCiANCiAJaWYgKCEoZnAgPSBmb3Blbih0ZW1wbmFtZSwgInIiKSkp DQpAQCAtMjI1LDcgKzIyNSwxMSBAQA0KIAkJCQkJZ290byBiYWQ7DQogCQkJ CX0NCiAJCQkJd2hpbGUgKGlzc3BhY2UoKisrcCkpOw0KLQkJCQlpZiAoZXAt PmV4Y2VwdCAmJiBzdHJwYnJrKHAsIGVwLT5leGNlcHQpKSB7DQorCQkJCWZv ciAocSA9IHA7ICpxICYmIGlzcHJpbnQoKnEpOyBxKyspIHsNCisJCQkJCWlm IChlcC0+ZXhjZXB0ICYmIHN0cmNocihlcC0+ZXhjZXB0LCpxKSkNCisJCQkJ CQlicmVhazsNCisJCQkJfQ0KKwkJCQlpZiAoKnEpIHsNCiAJCQkJCXdhcm54 KA0KIAkJCQkgICAiaWxsZWdhbCBjaGFyYWN0ZXIgaW4gdGhlIFwiJXNcIiBm aWVsZCIsDQogCQkJCQkgICAgZXAtPnByb21wdCk7DQo= --0-261229086-987472224=:76109-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 0:23:20 2001 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id D69D037B424 for ; Tue, 17 Apr 2001 00:23:17 -0700 (PDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3H7Noe79742 for ; Tue, 17 Apr 2001 03:23:50 -0400 (EDT) (envelope-from arr@watson.org) Date: Tue, 17 Apr 2001 03:23:49 -0400 (EDT) From: "Andrew R. Reiter" To: freebsd-audit@freebsd.org Subject: audit work: leave.c usage() fix (more obsd sync) Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1426310504-987492229=:79724" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1426310504-987492229=:79724 Content-Type: TEXT/PLAIN; charset=US-ASCII hi, attached is a patch again for -current for leave.c. the sync up with obsd was the call usage() if the number of arguments is greater than two. with -Wall compile, it was also, of course, complaining about the register char *cp not being initialized, so I just modified it to be set to NULL. can also be found at http://www.watson.org/~arr/fbsd-audit/usr.bin/leave/ andrew *-------------................................................. | Andrew R. Reiter | arr@fledge.watson.org | "It requires a very unusual mind | to undertake the analysis of the obvious" -- A.N. Whitehead --0-1426310504-987492229=:79724 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="leave.c.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: LS0tIGxlYXZlLmMub3JpZwlUdWUgQXByIDE3IDAwOjExOjM1IDIwMDENCisr KyBsZWF2ZS5jCVR1ZSBBcHIgMTcgMDA6MTY6MTggMjAwMQ0KQEAgLTY5LDcg KzY5LDcgQEANCiB7DQogCXJlZ2lzdGVyIHVfaW50IHNlY3M7DQogCXJlZ2lz dGVyIGludCBob3VycywgbWludXRlczsNCi0JcmVnaXN0ZXIgY2hhciBjLCAq Y3A7DQorCXJlZ2lzdGVyIGNoYXIgYywgKmNwID0gTlVMTDsNCiAJc3RydWN0 IHRtICp0LCAqbG9jYWx0aW1lKCk7DQogCXRpbWVfdCBub3csIHRpbWUoKTsN CiAJaW50IHBsdXNub3csIHRfMTJfaG91cjsNCkBAIC04NCw3ICs4NCw5IEBA DQogCQljcCA9IGZnZXRzKGJ1Ziwgc2l6ZW9mKGJ1ZiksIHN0ZGluKTsNCiAJ CWlmIChjcCA9PSBOVUxMIHx8ICpjcCA9PSAnXG4nKQ0KIAkJCWV4aXQoMCk7 DQotCX0gZWxzZQ0KKwl9IGVsc2UgaWYgKGFyZ2MgPiAyKQ0KKwkJdXNhZ2Uo KTsNCisJZWxzZQ0KIAkJY3AgPSBhcmd2WzFdOw0KIA0KIAlpZiAoKmNwID09 ICcrJykgew0K --0-1426310504-987492229=:79724-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 11:17: 8 2001 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id CC90E37B424 for ; Tue, 17 Apr 2001 11:17:05 -0700 (PDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3HIHcR88738 for ; Tue, 17 Apr 2001 14:17:38 -0400 (EDT) (envelope-from arr@watson.org) Date: Tue, 17 Apr 2001 14:17:38 -0400 (EDT) From: "Andrew R. Reiter" To: freebsd-audit@freebsd.org Subject: audit work: fd_set overflow fixing Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, some more sync up patches coming soon for fixing fd_set overflow problems. after discussing with kkenn, it is felt that kqueue/kevent will be used instead of select(2). much of openbsd has been moving to poll(2) (not poll(3), afaik) as well as a couple other ways. kkenn felt (if i am incorrect let me know :-)) that if the move was just from select to poll, then it would just be better to use kqueue and kevent. i offered up the idea of doing a #ifdef conditional for using either kqueue or poll... but im not sure this is beneficial. anyway, im posting this here for comments prior to doing the patches :-) thanks, andrew *-------------................................................. | Andrew R. Reiter | arr@fledge.watson.org | "It requires a very unusual mind | to undertake the analysis of the obvious" -- A.N. Whitehead To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 11:24:27 2001 Delivered-To: freebsd-audit@freebsd.org Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.161.193]) by hub.freebsd.org (Postfix) with ESMTP id 42F7037B422 for ; Tue, 17 Apr 2001 11:24:15 -0700 (PDT) (envelope-from mheffner@vt.edu) Received: from mail.vt.edu (gkar.cc.vt.edu [198.82.161.190]) by lennier.cc.vt.edu (8.11.0/8.11.0) with ESMTP id f3HIO9u513130; Tue, 17 Apr 2001 14:24:09 -0400 (EDT) Received: from enterprise.muriel.penguinpowered.com ([198.82.100.151]) by gkar.cc.vt.edu (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0GBY0080X8G7PU@gkar.cc.vt.edu>; Tue, 17 Apr 2001 14:24:08 -0400 (EDT) Date: Tue, 17 Apr 2001 14:23:30 -0400 (EDT) From: Mike Heffner Subject: RE: audit work: leave.c usage() fix (more obsd sync) In-reply-to: To: "Andrew R. Reiter" Cc: freebsd-audit@freebsd.org Message-id: MIME-version: 1.0 X-Mailer: XFMail 1.4.7 on FreeBSD Content-type: multipart/signed; boundary="_=XFMail.1.4.7.FreeBSD:20010417142330:433=_"; micalg=pgp-md5; protocol="application/pgp-signature" X-Priority: 3 (Normal) Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format --_=XFMail.1.4.7.FreeBSD:20010417142330:433=_ Content-Type: text/plain; charset=us-ascii Why don't you go ahead and axe register all together? By the way, great job! :) On 17-Apr-2001 Andrew R. Reiter wrote: | hi, | | attached is a patch again for -current for leave.c. the sync up with obsd | was the call usage() if the number of arguments is greater than two. with | -Wall compile, it was also, of course, complaining about the register char | *cp not being initialized, so I just modified it to be set to NULL. | | can also be found at http://www.watson.org/~arr/fbsd-audit/usr.bin/leave/ Mike -- Mike Heffner Blacksburg, VA http://filebox.vt.edu/users/mheffner --_=XFMail.1.4.7.FreeBSD:20010417142330:433=_ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE63IoiFokZQs3sv5kRAo5PAJ9JH2UGnGS90QQppqLmbUSb6spv5QCfcyXc 9/giGjOUBnMXC0Amh/zM7a4= =vlqx -----END PGP SIGNATURE----- --_=XFMail.1.4.7.FreeBSD:20010417142330:433=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 11:27:18 2001 Delivered-To: freebsd-audit@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [64.0.106.45]) by hub.freebsd.org (Postfix) with ESMTP id 2C25237B424 for ; Tue, 17 Apr 2001 11:27:16 -0700 (PDT) (envelope-from scanner@jurai.net) Received: from localhost (scanner@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id OAA38335; Tue, 17 Apr 2001 14:27:13 -0400 (EDT) Date: Tue, 17 Apr 2001 14:27:13 -0400 (EDT) From: To: Mike Heffner Cc: "Andrew R. Reiter" , freebsd-audit@FreeBSD.ORG Subject: RE: audit work: leave.c usage() fix (more obsd sync) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > By the way, great job! :) Indeed! You all have been doing some good work! Which is very much appreciated! ============================================================================= -Chris Watson (316) 326-3862 | FreeBSD Consultant, FreeBSD Geek Work: scanner@jurai.net | Open Systems Inc., Wellington, Kansas Home: scanner@deceptively.shady.org | http://open-systems.net ============================================================================= WINDOWS: "Where do you want to go today?" LINUX: "Where do you want to go tomorrow?" BSD: "Are you guys coming or what?" ============================================================================= irc.openprojects.net #FreeBSD -Join the revolution! ICQ: 20016186 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 11:32:54 2001 Delivered-To: freebsd-audit@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-27.dsl.lsan03.pacbell.net [63.207.60.27]) by hub.freebsd.org (Postfix) with ESMTP id 8014737B424 for ; Tue, 17 Apr 2001 11:32:50 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id A8FEE66B38; Tue, 17 Apr 2001 11:32:48 -0700 (PDT) Date: Tue, 17 Apr 2001 11:32:48 -0700 From: Kris Kennaway To: Mike Heffner Cc: "Andrew R. Reiter" , freebsd-audit@FreeBSD.ORG Subject: Re: audit work: leave.c usage() fix (more obsd sync) Message-ID: <20010417113248.A92866@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mheffner@vt.edu on Tue, Apr 17, 2001 at 02:23:30PM -0400 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 17, 2001 at 02:23:30PM -0400, Mike Heffner wrote: > Why don't you go ahead and axe register all together? If you have the opportunity, while you're touching these files you might like to go through the OpenBSD CVS repo and patch across other commits in the same file/program. For example, there may be other unchecked string operations which were fixed in earlier/later commits. OpenBSD have a cvsweb repo on their website if you don't have a local CVS repo handy. Kris --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE63IxQWry0BWjoQKURAkI/AJ9Ha1lOrbbHwTefcUM1pLMx9lKozwCgwWqx zb2vPY48+6CzrxNlQHREBog= =pCDS -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 11:42:36 2001 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 0304337B43E for ; Tue, 17 Apr 2001 11:42:33 -0700 (PDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3HIgs489378; Tue, 17 Apr 2001 14:42:54 -0400 (EDT) (envelope-from arr@watson.org) Date: Tue, 17 Apr 2001 14:42:53 -0400 (EDT) From: "Andrew R. Reiter" To: Kris Kennaway Cc: Mike Heffner , freebsd-audit@FreeBSD.ORG Subject: Re: audit work: leave.c usage() fix (more obsd sync) In-Reply-To: <20010417113248.A92866@xor.obsecurity.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 17 Apr 2001, Kris Kennaway wrote: > If you have the opportunity, while you're touching these files you > might like to go through the OpenBSD CVS repo and patch across other > commits in the same file/program. For example, there may be other > unchecked string operations which were fixed in earlier/later commits. I've been pondering this, but was wanting to concentrate on more "security" related updates. When looking at the cvsweb repo, I check to see (sometimes :-)) whether or not there are other updates that are worth the time. My next push will be for some common fd_set fixes (though, as the other email states, we'll probably use kqueue instead of poll) and then to continue work on the openbsd.mbox fixes. I will put my copy of openbsd.mbox up at http://www.watson.org/~arr/fbsd-audit/ shortly which will just state if a cvs commit has been done in fbsd (a patch has been written, not necesarily commited). But, yes, I've been staying close to what open has done in their patches, for #1) consistency and #2) I definetly trust much of their work. Andrew *-------------................................................. | Andrew R. Reiter | arr@fledge.watson.org | "It requires a very unusual mind | to undertake the analysis of the obvious" -- A.N. Whitehead To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Apr 17 11:47: 3 2001 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id E507837B440 for ; Tue, 17 Apr 2001 11:47:01 -0700 (PDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3HIlYK89530 for ; Tue, 17 Apr 2001 14:47:34 -0400 (EDT) (envelope-from arr@watson.org) Date: Tue, 17 Apr 2001 14:47:34 -0400 (EDT) From: "Andrew R. Reiter" To: freebsd-audit@freebsd.org Subject: audit work: consistency on my part Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, to keep things consistent, etc, i am changing my filenaming scheme on my diffs to: file[.extension]<.dateofcurrent>.diff just an fyi if anyone's actually checking these out :-) andrew *-------------................................................. | Andrew R. Reiter | arr@fledge.watson.org | "It requires a very unusual mind | to undertake the analysis of the obvious" -- A.N. Whitehead To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Fri Apr 20 7:40: 7 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by hub.freebsd.org (Postfix) with ESMTP id C370A37B422; Fri, 20 Apr 2001 07:39:45 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from vic.sabbo.net (dialup14-27.iptelecom.net.ua [212.9.229.91]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id RAA87242; Fri, 20 Apr 2001 17:39:39 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.11.3/8.11.2) with ESMTP id f3KEd1228351; Fri, 20 Apr 2001 17:39:01 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3AE049FC.60613D17@FreeBSD.org> Date: Fri, 20 Apr 2001 17:38:52 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.77 [en] (WinNT; U) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: audit@FreeBSD.org Cc: hackers@FreeBSD.org Subject: Merging ln(1) ``-h'' option from NetBSD [patch] Content-Type: multipart/mixed; boundary="------------9D96218EA2955EAD73F8C911" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------9D96218EA2955EAD73F8C911 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Please somebody take a look at attached patch that adds ``-h'' option to the ln(1) command (obtained from NetBSD, which has it since 1997). In addition, I've tried to minimise diffs between our code and NetBSD's one, so there are several changes that at a first glance look superfluous. -Maxim --------------9D96218EA2955EAD73F8C911 Content-Type: text/plain; charset=koi8-r; name="ln.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ln.diff" Index: ln.1 =================================================================== RCS file: /home/ncvs/src/bin/ln/ln.1,v retrieving revision 1.14 diff -d -u -r1.14 ln.1 --- ln.1 2000/11/20 11:39:37 1.14 +++ ln.1 2001/04/20 14:36:37 @@ -44,11 +44,11 @@ .Nd make links .Sh SYNOPSIS .Nm -.Op Fl fisv +.Op Fl fhinsv .Ar source_file .Op target_file .Nm -.Op Fl fisv +.Op Fl fhinsv .Ar source_file ... .Op target_dir .Nm link @@ -79,6 +79,14 @@ option overrides any previous .Fl i options.) +.It Fl h +If the +.Ar target_file +or +.Ar target_dir +is a symbolic link, do not follow it. This is most useful with the +.Fl f +option, to replace a symlink which may point to a directory. .It Fl i Cause .Nm @@ -94,6 +102,12 @@ option overrides any previous .Fl f options.) +.It Fl n +Same as +.Fl h , +for compatibility with other +.Nm +implementations. .It Fl s Create a symbolic link. .It Fl v @@ -168,12 +182,18 @@ and .Fl v options are non-standard and their use in scripts is not recommended. -.Sh HISTORY -An +.Sh STANDARDS +The .Nm -command appeared in -.At v1 . +utility conforms to +.St -p1003.2-92 . +.Pp The simplified .Nm link command conforms to .St -susv2 . +.Sh HISTORY +An +.Nm +command appeared in +.At v1 . Index: ln.c =================================================================== RCS file: /home/ncvs/src/bin/ln/ln.c,v retrieving revision 1.18 diff -d -u -r1.18 ln.c --- ln.c 2000/08/17 16:08:06 1.18 +++ ln.c 2001/04/20 14:36:37 @@ -57,6 +57,7 @@ int fflag; /* Unlink existing files. */ int iflag; /* Interactive mode. */ +int hflag; /* Check new name for symlink first. */ int sflag; /* Symbolic, not hard, link. */ int vflag; /* Verbose output. */ /* System link call. */ @@ -65,6 +66,7 @@ int linkit __P((char *, char *, int)); void usage __P((void)); +int main __P((int, char *[])); int main(argc, argv) @@ -73,7 +75,8 @@ { struct stat sb; int ch, exitval; - char *p, *sourcedir; + char *p; + char *sourcedir; /* * Test for the special case where the utility is called as @@ -92,12 +95,16 @@ usage(); } - while ((ch = getopt(argc, argv, "fisv")) != -1) + while ((ch = getopt(argc, argv, "fhinsv")) != -1) switch (ch) { case 'f': fflag = 1; iflag = 0; break; + case 'h': + case 'n': + hflag = 1; + break; case 'i': iflag = 1; fflag = 0; @@ -122,13 +129,22 @@ switch(argc) { case 0: usage(); + /* NOTREACHED */ case 1: /* ln target */ exit(linkit(argv[0], ".", 1)); + /* NOTREACHED */ case 2: /* ln target source */ exit(linkit(argv[0], argv[1], 0)); + /* NOTREACHED */ } /* ln target1 target2 directory */ sourcedir = argv[argc - 1]; + if (hflag && lstat(sourcedir, &sb) == 0 && S_ISLNK(sb.st_mode)) { + /* we were asked not to follow symlinks, but found one at + the target--simulate "not a directory" error */ + errno = ENOTDIR; + err(1, "%s", sourcedir); + } if (stat(sourcedir, &sb)) err(1, "%s", sourcedir); if (!S_ISDIR(sb.st_mode)) @@ -136,6 +152,7 @@ for (exitval = 0; *argv != sourcedir; ++argv) exitval |= linkit(*argv, sourcedir, 1); exit(exitval); + /* NOTREACHED */ } int @@ -161,18 +178,20 @@ } } - /* If the source is a directory, append the target's name. */ - if (isdir || ((exists = !stat(source, &sb)) && S_ISDIR(sb.st_mode))) { + /* If the source is a directory (and not a symlink if hflag), + append the target's name. */ + if (isdir || + (!lstat(source, &sb) && S_ISDIR(sb.st_mode)) || + (!hflag && !stat(source, &sb) && S_ISDIR(sb.st_mode))) { if ((p = strrchr(target, '/')) == NULL) p = target; else ++p; (void)snprintf(path, sizeof(path), "%s/%s", source, p); source = path; - exists = !lstat(source, &sb); - } else - exists = !lstat(source, &sb); + } + exists = !lstat(source, &sb); /* * If the file exists, then unlink it forcibly if -f was specified * and interactively if -i was specified. @@ -214,8 +233,9 @@ usage() { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: ln [-fisv] file1 file2", - " ln [-fisv] file ... directory", + "usage: ln [-fhinsv] file1 file2", + " ln [-fhinsv] file ... directory", " link file1 file2"); exit(1); + /* NOTREACHED */ } --------------9D96218EA2955EAD73F8C911-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Fri Apr 20 9:38:30 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mailf.telia.com (mailf.telia.com [194.22.194.25]) by hub.freebsd.org (Postfix) with ESMTP id C4C3737B621 for ; Fri, 20 Apr 2001 09:38:16 -0700 (PDT) (envelope-from watchman@ludd.luth.se) Received: from d1o907.telia.com (d1o907.telia.com [195.252.38.241]) by mailf.telia.com (8.11.2/8.11.0) with ESMTP id f3KGcEp17886 for ; Fri, 20 Apr 2001 18:38:14 +0200 (CEST) Received: from ludd.luth.se (h63n2fls21o907.telia.com [213.66.203.63]) by d1o907.telia.com (8.8.8/8.8.8) with ESMTP id SAA21471 for ; Fri, 20 Apr 2001 18:38:13 +0200 (CEST) Message-ID: <3AE065DD.D8FEF0B@ludd.luth.se> Date: Fri, 20 Apr 2001 18:37:49 +0200 From: Joachim =?iso-8859-1?Q?Str=F6mbergson?= Organization: Acne X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-RC i386) X-Accept-Language: en-US MIME-Version: 1.0 To: FreeBSD-Audit Subject: New du functionality by newbie - audit and comments? Content-Type: multipart/mixed; boundary="------------0FA2C1064A487E34BCE49AFC" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------0FA2C1064A487E34BCE49AFC Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Aloha! I'm slowly trying to learn the skills needed to start contributing back to the FreeBSD. And this I guess is my first real shot at it! .-) I have for some time missed the ability in the default du to turn off the interim output, and simply get a grand total at the end. Right or wrong I decided to add this to the du myself. I have done preliminary testing on the system, and AFAIK it works as intended. Also, some preliminary benchmarks (measuring run times repeated runs on fairly large parts of the file system) suggests that you do gain a bit performane by using my silent option (very unsurprising, since I'm turning off a lot of output) The option added is called Silent mode and the flag currently choosen is -S. A unified diff is included with this mail. Any comments, checks and or suggestions would be appreciated. Any possiblilty that a thing like this could/would be added to the system in due time? -- Cheers! Joachim - Alltid i harmonisk svängning --- FairLight ------ FairLight ------ FairLight ------ FairLight --- Joachim Strömbergson ASIC SoC designer, nice to CUTE animals Phone: +46(0)31 - 27 98 47 Web: http://www.ludd.luth.se/~watchman --------------- Spamfodder: regeringen@regeringen.se --------------- --------------0FA2C1064A487E34BCE49AFC Content-Type: text/plain; charset=us-ascii; name="du.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="du.diff" --- du.c Fri Apr 20 18:11:01 2001 +++ /usr/src/usr.bin/du/du.c Fri Apr 20 18:02:32 2001 @@ -105,19 +105,17 @@ int listall; int depth; int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag, hflag, ch, notused, rval; - int silentflag; char **save; Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag = 0; - silentflag = 0; - + save = argv; ftsoptions = 0; depth = INT_MAX; - while ((ch = getopt(argc, argv, "HLPSasd:chkrx")) != -1) + while ((ch = getopt(argc, argv, "HLPasd:chkrx")) != -1) switch (ch) { - case 'H': + case 'H': Hflag = 1; break; case 'L': @@ -125,16 +123,12 @@ usage(); Lflag = 1; break; - case 'P': + case 'P': if (Lflag) usage(); Pflag = 1; break; - case 'S': - silentflag = 1; - cflag = 1; - break; - case 'a': + case 'a': aflag = 1; break; case 's': @@ -238,15 +232,11 @@ if (p->fts_level <= depth) { if (hflag) { (void) prthumanval(howmany(p->fts_number, blocksize)); - if (!silentflag) { - (void) printf("\t%s\n", p->fts_path); - } + (void) printf("\t%s\n", p->fts_path); } else { - if (!silentflag) { (void) printf("%ld\t%s\n", howmany(p->fts_number, blocksize), p->fts_path); - } } } break; @@ -266,17 +256,11 @@ if (hflag) { (void) prthumanval(howmany(p->fts_statp->st_blocks, blocksize)); - - if (!silentflag) { (void) printf("\t%s\n", p->fts_path); - } - } else { - if (!silentflag) { (void) printf("%qd\t%s\n", howmany(p->fts_statp->st_blocks, blocksize), p->fts_path); - } } } @@ -349,7 +333,6 @@ abval = fabs(*val); - unit_sz = abval ? ilogb(abval) / 10 : 0; if (unit_sz >= UNIT_MAX) { @@ -383,6 +366,6 @@ usage() { (void)fprintf(stderr, - "usage: du [-H | -L | -P | -S] [-a | -s | -d depth] [-c] [-h | -k] [-x] [file ...]\n"); + "usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k] [-x] [file ...]\n"); exit(EX_USAGE); } --------------0FA2C1064A487E34BCE49AFC-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Fri Apr 20 10: 1:11 2001 Delivered-To: freebsd-audit@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 86A0337B423 for ; Fri, 20 Apr 2001 10:01:07 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f3KH12i22366; Fri, 20 Apr 2001 10:01:02 -0700 Date: Fri, 20 Apr 2001 10:01:02 -0700 From: Brooks Davis To: =?iso-8859-1?Q?Joachim_Str=F6mbergson?= Cc: FreeBSD-Audit Subject: Re: New du functionality by newbie - audit and comments? Message-ID: <20010420100102.C14059@Odin.AC.HMC.Edu> References: <3AE065DD.D8FEF0B@ludd.luth.se> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="E13BgyNx05feLLmH" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3AE065DD.D8FEF0B@ludd.luth.se>; from watchman@ludd.luth.se on Fri, Apr 20, 2001 at 06:37:49PM +0200 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --E13BgyNx05feLLmH Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 20, 2001 at 06:37:49PM +0200, Joachim Str=F6mbergson wrote: > I'm slowly trying to learn the skills needed to start contributing back > to the FreeBSD. And this I guess is my first real shot at it! .-) >=20 > I have for some time missed the ability in the default du to turn off > the interim output, and simply get a grand total at the end. Right or > wrong I decided to add this to the du myself. I have done preliminary > testing on the system, and AFAIK it works as intended. >=20 > Also, some preliminary benchmarks (measuring run times repeated runs on > fairly large parts of the file system) suggests that you do gain a bit > performane by using my silent option (very unsurprising, since I'm > turning off a lot of output) >=20 > The option added is called Silent mode and the flag currently choosen is > -S. How does this differ from -s? $ du -s 643223 . > A unified diff is included with this mail. Any comments, checks and or > suggestions would be appreciated. The diff appears to contain a number of no-op whitespace changes so didn't try it. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --E13BgyNx05feLLmH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE64GtNXY6L6fI4GtQRAo0VAKDHFHI4sVgFDHYMeWw8YxLlsrSvbQCeLnHJ ENbw4uIbUH2sVVuqlwt+/+k= =pDyu -----END PGP SIGNATURE----- --E13BgyNx05feLLmH-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Apr 21 6: 6:22 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id BB29837B422 for ; Sat, 21 Apr 2001 06:06:16 -0700 (PDT) (envelope-from roam@ringworld.nanolink.com) Received: (qmail 47955 invoked by uid 1000); 21 Apr 2001 13:04:40 -0000 Date: Sat, 21 Apr 2001 16:04:40 +0300 From: Peter Pentchev To: Joachim Strombergson Cc: FreeBSD-Audit Subject: Re: New du functionality by newbie - audit and comments? Message-ID: <20010421160440.C47557@ringworld.oblivion.bg> Mail-Followup-To: Joachim Strombergson , FreeBSD-Audit References: <3AE065DD.D8FEF0B@ludd.luth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3AE065DD.D8FEF0B@ludd.luth.se>; from watchman@ludd.luth.se on Fri, Apr 20, 2001 at 06:37:49PM +0200 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Well, I wouldn't want to be one to pour cold water on others' efforts, but this patch does not seem to be too useful to me :) If you call du(1) with only a single path argument, then the output of -s and -S is nearly identical - with 'total' instead of the path. If you call du(1) with no path arguments, then again, the output of -s and -S is nearly identical, with 'total' instead of '.'. The only difference is there when you call du(1) with more than one path argument. If using -S, only one line shall be output, with the grand total. If using -s, there shall be a line for each path, but no grand total. If using -cs, there shall be a line for each path, *and* a grand total line. This is the only case when your patch matters, but even then, I think using "du -cs | tail -1" does exactly the same job :) And the output saved is not that much - unless you have specified LOTS of paths on the command line, but this isn't such a realistic scenario IMHO. So, sorry to say that, but I really do not think there is much benefit in this :) Other than that.. The patch itself is reversed - when using 'diff' to produce a patch, put the old file first, then the new one. Besides, as Brooks Davis already pointed out, there seem to be a lot of whitespace changes unrelated to the new -S functionality. Still - it's great to see another soul contributing to FreeBSD! G'luck, Peter -- This would easier understand fewer had omitted. On Fri, Apr 20, 2001 at 06:37:49PM +0200, Joachim Strombergson wrote: > Aloha! > > I'm slowly trying to learn the skills needed to start contributing back > to the FreeBSD. And this I guess is my first real shot at it! .-) > > I have for some time missed the ability in the default du to turn off > the interim output, and simply get a grand total at the end. Right or > wrong I decided to add this to the du myself. I have done preliminary > testing on the system, and AFAIK it works as intended. > > Also, some preliminary benchmarks (measuring run times repeated runs on > fairly large parts of the file system) suggests that you do gain a bit > performane by using my silent option (very unsurprising, since I'm > turning off a lot of output) > > The option added is called Silent mode and the flag currently choosen is > -S. > > A unified diff is included with this mail. Any comments, checks and or > suggestions would be appreciated. > > Any possiblilty that a thing like this could/would be added to the > system in due time? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Apr 21 15: 7: 0 2001 Delivered-To: freebsd-audit@freebsd.org Received: from maild.telia.com (maild.telia.com [194.22.190.3]) by hub.freebsd.org (Postfix) with ESMTP id 5A8E437B422 for ; Sat, 21 Apr 2001 15:06:57 -0700 (PDT) (envelope-from watchman@ludd.luth.se) Received: from d1o907.telia.com (d1o907.telia.com [195.252.38.241]) by maild.telia.com (8.9.3/8.9.3) with ESMTP id AAA19407; Sun, 22 Apr 2001 00:06:51 +0200 (CEST) Received: from ludd.luth.se (h63n2fls21o907.telia.com [213.66.203.63]) by d1o907.telia.com (8.8.8/8.8.8) with ESMTP id AAA25541; Sun, 22 Apr 2001 00:06:49 +0200 (CEST) Message-ID: <3AE20464.7DA961BE@ludd.luth.se> Date: Sun, 22 Apr 2001 00:06:28 +0200 From: Joachim =?iso-8859-1?Q?Str=F6mbergson?= Organization: Acne X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-RC i386) X-Accept-Language: en-US MIME-Version: 1.0 To: Peter Pentchev Cc: FreeBSD-Audit , Brooks Davis Subject: Re: New du functionality by newbie - audit and comments? References: <3AE065DD.D8FEF0B@ludd.luth.se> <20010421160440.C47557@ringworld.oblivion.bg> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Aloha! Ahem... oops! It looks like I made a pretty nice fool out of myslf with my posting. The "newbie" label was obviously correct though. As Brooks pointed out, and Peter expanded on, my "patch" and added functionality adds nothing that's really there. I just wasn't able to clue it out by reading the man page [1]. I was however able to hack the code to build the same functionality into the poor du command twice. Quite a feat! ;-) I'm sorry for bothering you all with this. It's obviously back to school for me - and I will learn to generate correct diffs to. [1] If it's ok after this embarrasing thing, would it be ok to humbly suggest instead a rewrite/sharpening of the man page to call/talk about the "-s" option as a silent option? - Basically explain what the "-s" produces as output, and not as much what it does internally to implement the functionality, which it does right now. -- Cheers! Joachim - Alltid i harmonisk svängning --- FairLight ------ FairLight ------ FairLight ------ FairLight --- Joachim Strömbergson ASIC SoC designer, nice to CUTE animals Phone: +46(0)31 - 27 98 47 Web: http://www.ludd.luth.se/~watchman --------------- Spamfodder: regeringen@regeringen.se --------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Apr 21 16:51:58 2001 Delivered-To: freebsd-audit@freebsd.org Received: from phoenix.welearn.com.au (unknown [139.130.44.81]) by hub.freebsd.org (Postfix) with ESMTP id 4816737B423 for ; Sat, 21 Apr 2001 16:51:54 -0700 (PDT) (envelope-from sue@phoenix.welearn.com.au) Received: (from sue@localhost) by phoenix.welearn.com.au (8.9.3/8.9.3) id KAA19337; Sun, 22 Apr 2001 10:02:17 +1000 (EST) (envelope-from sue) Date: Sun, 22 Apr 2001 10:02:11 +1000 From: Sue Blake To: =?iso-8859-1?Q?Joachim_Str=F6mbergson?= Cc: Peter Pentchev , FreeBSD-Audit , Brooks Davis Subject: Re: New du functionality by newbie - audit and comments? Message-ID: <20010422100209.D4964@welearn.com.au> References: <3AE065DD.D8FEF0B@ludd.luth.se> <20010421160440.C47557@ringworld.oblivion.bg> <3AE20464.7DA961BE@ludd.luth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.4i In-Reply-To: =?iso-8859-1?Q?=3C3AE20464=2E7DA961BE=40ludd=2Eluth=2Ese=3E=3B_from_Joac?= =?iso-8859-1?Q?him_Str=F6mbergson_on_Sun=2C_Apr_22=2C_2001_at_12:06:28AM?= =?iso-8859-1?Q?_+0200?= Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Apr 22, 2001 at 12:06:28AM +0200, Joachim Strömbergson wrote: > Aloha! > > Ahem... oops! > > It looks like I made a pretty nice fool out of myslf with my posting. > The "newbie" label was obviously correct though. But you (all) achieved more than you realise. Nobody knew I was here. I saw you make a big mistake, I saw you corrected politely, I saw you say OK and look at other ways to help. Next time I'm afraid to offer something, I will remember your story and I will be encouraged to go ahead and try my best. There could be hundreds of others, silent like me, who are encouraged by your story. Some of them will become the people who take FreeBSD into tomorrow. Thank you for helping others to feel comfortable. [No need to reply, but if you want more list discussion we should move it to freebsd-chat] -- Regards, -*Sue*- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message