From owner-freebsd-arch@FreeBSD.ORG Mon Jul 3 03:52:49 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFFEC16A403 for ; Mon, 3 Jul 2006 03:52:49 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A0B143E43 for ; Mon, 3 Jul 2006 03:52:49 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k633qYSo039835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Jul 2006 20:52:35 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44A89481.3020709@errno.com> Date: Sun, 02 Jul 2006 20:52:33 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.2 (X11/20060508) MIME-Version: 1.0 To: freebsd-arch@freebsd.org X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: a.bittau@cs.ucl.ac.uk Subject: RFC: raw 802.11 packet transmit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2006 03:52:50 -0000 Andrea Bittau and I have been working on a facility for injecting (i.e. transmitting) 802.11 frames via bpf. It's to the point where we're looking for feedback before committing to head. The idea is that you can send 802.11 frames with bpf using the DLT_IEEE802_11 and DLT_IEEE802_11_RADIO data link types. The DLT_IEEE802_11 case takes a mostly formed 802.11 frame and passes it through the tx path normally used for sending 802.11 management frames. In this case drivers may fillin bits of the 802.11 header like the sequence number and apply the tx rate control algorithm. With DLT_IEEE802_11_RADIO user code passes a special data structure at the front of each frame that completely specifies how the frame should be treated and a new tx path is used that honors these parameters. Drivers must be modified for this mechanism to be effective; legacy drivers will fall back to the above tx path and the parameters will be ignored. Even with proper raw tx support not all drivers may be capable of handling all the parameters passed in (e.g. some cards will stomp on the sequence number). There are several unresolved issues; most notably how to handle 802.11 ACK's. We've talked about mechanisms like generating ACK's in the driver based on dynamically filled in mac tables but I'm not happy with adding more complexity to drivers. John Bickett's raw xmit support for madwifi (for the MIT Roofnet project) lets the h/w handle ACK's and dispatches events on tx complete so user code can track tx status (e.g. to implement tx rate control). I'm considering this or some other mechanism for returning tx completion status. The kernel patches and a set of test tools can be found at: http://www.freebsd.org/~sam/tx80211 The patch is for HEAD. The tools go in src/tools/tools/net80211 (the tarball includes the existing tools so you can save the old dir and put this new stuff in place). Check out the README files in the tools area. Most testing has been done with ath but I've also verified ral and ural work at least some. None of my wi cards work but Andrea did the wi mods and has something that works (the wi cards I tried were Lucent Gold, and Intersil Prism w/ sta rev 1.7.4 firmware). Note the ral mods are only for 256x cards; I don't have any 266x cards. iwi and ipw are not capable of packet injection. Sam From owner-freebsd-arch@FreeBSD.ORG Tue Jul 4 18:39:03 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0746A16A500; Tue, 4 Jul 2006 18:39:03 +0000 (UTC) (envelope-from jari.aalto@cante.net) Received: from fep32-app.kolumbus.fi (fep32-0.kolumbus.fi [193.229.0.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5F2D43D45; Tue, 4 Jul 2006 18:39:01 +0000 (GMT) (envelope-from jari.aalto@cante.net) Received: from bongo.cante.net ([81.197.0.130]) by fep32-app.kolumbus.fi with ESMTP id <20060704183855.UPMF8407.fep32-app.kolumbus.fi@bongo.cante.net>; Tue, 4 Jul 2006 21:38:55 +0300 Received: from fw.cante.net ([192.168.1.3] helo=cante) by bongo.cante.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1Fxpmu-0005Cy-Sz; Tue, 04 Jul 2006 21:38:20 +0300 Received: from jaalto by cante with local (Exim 4.62) (envelope-from ) id 1Fxpms-0003TT-T4; Tue, 04 Jul 2006 21:38:18 +0300 To: Ceri Davies Mail-Copies-To: poster References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> From: jari.aalto@cante.net (Jari Aalto+mail.linux) Message-Id: Date: Tue, 04 Jul 2006 21:38:18 +0300 Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "login: please move nologin under /bin directory" <374525@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, anibal@debian.org Subject: Re: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 18:39:03 -0000 | > > | I think that this suggestion should go to upstream as well. Having | > > | nologin in /bin does not make sense only for Debian, of course. | > > | | | FreeBSD-arch AT FreeBSD.org is better for "move x to y" type discussions. | | > Tomasz (shadow upstream) mentioned me that nologin lies in /sbin in | > OpenBSD so that he's tempted to default installing it there. | > | > As already mentioned elsewhere, I have no strong opinion on this for | > what to do in Debian and I'm ready to listen to suggestions and | > various rationales.... | | We (FreeBSD) have only recently moved it from /sbin to /usr/sbin; see | http://marc.theaimsgroup.com/?l=freebsd-current&m=107755834602236&w=2 | for the discussion we had, if it's of any use. Thanks for the URL. About the /sbin comment 1: "Bloating of the root filesystem". I don't see that to be problem here. I think it would be better to keep things logically separate and resserver /usr for other things. About comment 3: There is no reason for nologin(8) to be in /sbin, since it isn't needed in single-user mode", this has weight. However nologin is a system utility it would be better kept directly under root directory, if /sbin is not ideal, then it should go to /bin -- to same place as "login". Jari From owner-freebsd-arch@FreeBSD.ORG Tue Jul 4 19:24:55 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1053216A4E0 for ; Tue, 4 Jul 2006 19:24:55 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-0-0-cust107.cdif.cable.ntl.com [81.104.168.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F31E43D45 for ; Tue, 4 Jul 2006 19:24:54 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.62 (FreeBSD)) (envelope-from ) id 1FxqVt-0004ZF-KC; Tue, 04 Jul 2006 20:24:49 +0100 Date: Tue, 4 Jul 2006 20:24:49 +0100 From: Ceri Davies To: "Jari Aalto+mail.linux" Message-ID: <20060704192449.GC76109@submonkey.net> Mail-Followup-To: Ceri Davies , "Jari Aalto+mail.linux" , "login: please move nologin under /bin directory" <374525@bugs.debian.org>, "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: [security] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "openssh-server: [security] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, mstone@debian.org, anibal@debian.org, freebsd-arch@freebsd.org References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5G06lTa6Jq83wMTw" Content-Disposition: inline In-Reply-To: X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.11 Sender: Ceri Davies Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "login: please move nologin under /bin directory" <374525@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, anibal@debian.org Subject: Re: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 19:24:55 -0000 --5G06lTa6Jq83wMTw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 04, 2006 at 09:38:18PM +0300, Jari Aalto+mail.linux wrote: > However nologin is a system utility it would be better kept > directly under root directory, if /sbin is not ideal, then > it should go to /bin -- to same place as "login". That's up to you; we don't consider it a system utility, that's all. Our hier(7) is pretty clear, and we try to stick to it: /bin/ user utilities fundamental to both single-user and multi-user environments /sbin/ system programs and administration utilities fundamental to both single-user and multi-user environments Since it isn't either of the above, it goes under /usr (in FreeBSD; you are, of course, free to disagree). Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --5G06lTa6Jq83wMTw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEqsCBocfcwTS3JF8RAjYBAJ9U1M7fIrp9StS36dWvozsOck7Y/gCeKlRQ 33OZnaTc355YGzEjwZKChfA= =N5Hd -----END PGP SIGNATURE----- --5G06lTa6Jq83wMTw-- From owner-freebsd-arch@FreeBSD.ORG Wed Jul 5 05:53:06 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 046FF16A4DA; Wed, 5 Jul 2006 05:53:06 +0000 (UTC) (envelope-from jari.aalto@cante.net) Received: from fep01-app.kolumbus.fi (fep01-0.kolumbus.fi [193.229.0.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFBDC43D45; Wed, 5 Jul 2006 05:53:04 +0000 (GMT) (envelope-from jari.aalto@cante.net) Received: from bongo.cante.net ([81.197.0.130]) by fep01-app.kolumbus.fi with ESMTP id <20060705055300.NIRI11715.fep01-app.kolumbus.fi@bongo.cante.net>; Wed, 5 Jul 2006 08:53:00 +0300 Received: from fw.cante.net ([192.168.1.3] helo=cante) by bongo.cante.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1Fy0JJ-0006Jr-Ra; Wed, 05 Jul 2006 08:52:29 +0300 Received: from jaalto by cante with local (Exim 4.62) (envelope-from ) id 1Fy0JI-00072N-Hc; Wed, 05 Jul 2006 08:52:28 +0300 To: Ceri Davies Mail-Copies-To: poster References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> From: jari.aalto@cante.net (Jari Aalto+mail.linux) Message-Id: Date: Wed, 05 Jul 2006 08:52:28 +0300 Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "login: please move nologin under /bin directory" <374525@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, anibal@debian.org Subject: Re: Bug#366546: [Debian] login: please move nologin under /bin directory X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 05:53:06 -0000 | On Tue, Jul 04, 2006 at 09:38:18PM +0300, Jari Aalto+mail.linux wrote: | | > However nologin is a system utility it would be better kept | > directly under root directory, if /sbin is not ideal, then | > it should go to /bin -- to same place as "login". | | That's up to you; we don't consider it a system utility, that's all. | | Our hier(7) is pretty clear, and we try to stick to it: | | /bin/ user utilities fundamental to both single-user and | multi-user environments FHS 2.3 reads /bin contains commands that may be used by both the system administrator and by users, but which are required when no other filesystems are mounted (e.g. in single user mode). ============================================================ | /sbin/ system programs and administration utilities fundamental | to both single-user and multi-user environments Utilities used for system administration (and other root-only commands) are stored in /sbin, /usr/sbin, and /usr/local/sbin. /sbin contains binaries essential for booting, restoring, recovering, and/or ====================================================... repairing the system | Since it isn't either of the above, it goes under /usr (in FreeBSD; you | are, of course, free to disagree). Thank you for explaining. As Debian follows the FHS, the correct place here seems to be /bin according to FHS. (as where "login" is also located) Jari From owner-freebsd-arch@FreeBSD.ORG Wed Jul 5 06:01:40 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9F1616A4DD; Wed, 5 Jul 2006 06:01:39 +0000 (UTC) (envelope-from christian.perrier@onera.fr) Received: from onera.onera.fr (onera.onera.fr [144.204.65.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5723243D45; Wed, 5 Jul 2006 06:01:38 +0000 (GMT) (envelope-from christian.perrier@onera.fr) Received: from cc-mykerinos.onera (localhost [127.0.0.1]) by onera.onera.fr with ESMTP id k6561NOx017164; Wed, 5 Jul 2006 08:01:23 +0200 (MEST) Received: by cc-mykerinos.onera (Postfix, from userid 1000) id 4462D40A276; Wed, 5 Jul 2006 07:42:51 +0200 (CEST) Date: Wed, 5 Jul 2006 07:42:51 +0200 From: Christian Perrier To: Ceri Davies , "Jari Aalto+mail.linux" , "login: please move nologin under /bin directory" <374525@bugs.debian.org>, "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: [security] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "openssh-server: [security] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, mstone@debian.org, anibal@debian.org, freebsd-arch@FreeBSD.org Message-ID: <20060705054251.GF5220@djedefre.onera> References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S5HS5MvDw4DmbRmb" Content-Disposition: inline In-Reply-To: <20060704192449.GC76109@submonkey.net> User-Agent: Mutt/1.5.11+cvs20060403 Cc: Subject: Re: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Jari Aalto+mail.linux" , "login: please move nologin under /bin directory" <374525@bugs.debian.org> List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 06:01:40 -0000 --S5HS5MvDw4DmbRmb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > That's up to you; we don't consider it a system utility, that's all. >=20 > Our hier(7) is pretty clear, and we try to stick to it: >=20 > /bin/ user utilities fundamental to both single-user and > multi-user environments >=20 > /sbin/ system programs and administration utilities fundamental > to both single-user and multi-user environments As a first reaction and as one of the shadow maintainer, I'm now inclined to agree with the choice of the FreeBSD team here. The rationale is clear... I'd like to hear the one from OpenBSD to put nologin in /sbin though.. they might have a different definition of what goes in /sbin However, others might have a different point of view in Debian and I'd like to get all possible advices. I might even consider asking our Technical Commitee after a discussion in debian-devel (which I don't put much hope in based on past experience). In short, let's take a deep breath and think about all this. The standard we have to comply with in Debian is the FHS 2.3, from the policy. It states: /bin : Essential user command binaries (for use by all users) /bin contains commands that may be used by both the system administrator and by users, but which are required when no other filesystems are mounted (e.g. in single user mode). It may also contain commands which are used indirectly by scripts. /sbin : System binaries Utilities used for system administration (and other root-only commands) are stored in /sbin, /usr/sbin, and /usr/local/sbin. /sbin contains binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in /bin. [18] Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. Locally-installed system administration programs should be placed into /usr/local/sbin. [19] The question then shortens down to "will we need nologin when /usr is not mounted". Do we have existing or future use cases? PS: let's shorten down the CC list of these mails. My own point here is to decide what to do in Debian so we might want to stop bothering FreeBSD developers (which I took the opportunity to sy "hi" to....I have some good old friends over there). --S5HS5MvDw4DmbRmb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEq1Fb1OXtrMAUPS0RAr/YAJ9YGmD2ve9BomZ8doAJjUxvK2s2yQCeKbKa kDPfBYU6E1mGYIqHSsUL6ZQ= =fCXw -----END PGP SIGNATURE----- --S5HS5MvDw4DmbRmb-- From owner-freebsd-arch@FreeBSD.ORG Wed Jul 5 13:31:08 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1549716A4DD for ; Wed, 5 Jul 2006 13:31:08 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from pd3mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B82143D45 for ; Wed, 5 Jul 2006 13:31:07 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd2mr2so.prod.shaw.ca (pd2mr2so-qfe3.prod.shaw.ca [10.0.141.109]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0J1X000C9MVU2AA0@l-daemon> for freebsd-arch@freebsd.org; Wed, 05 Jul 2006 07:31:06 -0600 (MDT) Received: from pn2ml3so.prod.shaw.ca ([10.0.121.147]) by pd2mr2so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0J1X0030WMVUDQJ0@pd2mr2so.prod.shaw.ca> for freebsd-arch@freebsd.org; Wed, 05 Jul 2006 07:31:06 -0600 (MDT) Received: from hexahedron.daemonology.net ([24.82.18.31]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with SMTP id <0J1X00JN5MVTF1E0@l-daemon> for freebsd-arch@freebsd.org; Wed, 05 Jul 2006 07:31:06 -0600 (MDT) Received: (qmail 12291 invoked from network); Wed, 05 Jul 2006 13:31:00 +0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; Wed, 05 Jul 2006 13:31:00 +0000 Date: Wed, 05 Jul 2006 06:30:59 -0700 From: Colin Percival In-reply-to: <20060705054251.GF5220@djedefre.onera> To: "Jari Aalto+mail.linux" , "login: please move nologin under /bin directory" <374525@bugs.debian.org> Message-id: <44ABBF13.8030602@freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Enigmail-Version: 0.94.0.0 References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> User-Agent: Thunderbird 1.5 (X11/20060416) Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, Ceri Davies , mstone@debian.org, freebsd-arch@freebsd.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, anibal@debian.org Subject: Re: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 13:31:08 -0000 Christian Perrier wrote: > As a first reaction and as one of the shadow maintainer, I'm now > inclined to agree with the choice of the FreeBSD team here. > > The rationale is clear... > > I'd like to hear the one from OpenBSD to put nologin in /sbin > though.. they might have a different definition of what goes in /sbin FWIW, nologin was in /sbin in BSD 4.4; this is almost certainly why OpenBSD still has /sbin/nologin. I moved FreeBSD's nologin to /usr/sbin two years ago, because 1. nologin needs to be statically linked to avoid linker environment security issues, 2. logging attempts to log in to a nologinned account requires that syslog code be pulled in (which significantly increases the size of a statically linked binary), 3. we like to keep the root filesystem small, and 4. Since nologin is intended for use in multiuser mode, there's no reason for it to be on the root filesystem -- in single user mode, users who aren't supposed to be allowed to login will never get to the point of running a shell (nologin or otherwise). In short, under the BSD hierarchy rules, nologin should be in /usr/sbin; any systems behaving otherwise are doing so for historical reasons only. Colin Percival From owner-freebsd-arch@FreeBSD.ORG Wed Jul 5 15:10:08 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47BDD16A4DF for ; Wed, 5 Jul 2006 15:10:08 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-0-0-cust107.cdif.cable.ntl.com [81.104.168.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F94443D45 for ; Wed, 5 Jul 2006 15:10:07 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.62 (FreeBSD)) (envelope-from ) id 1Fy90q-00061C-E8; Wed, 05 Jul 2006 16:10:00 +0100 Date: Wed, 5 Jul 2006 16:10:00 +0100 From: Ceri Davies To: "Jari Aalto+mail.linux" Message-ID: <20060705151000.GD76109@submonkey.net> Mail-Followup-To: Ceri Davies , "Jari Aalto+mail.linux" , "login: please move nologin under /bin directory" <374525@bugs.debian.org>, "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: [security] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "openssh-server: [security] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, mstone@debian.org, anibal@debian.org, freebsd-arch@freebsd.org References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZJcv+A0YCCLh2VIg" Content-Disposition: inline In-Reply-To: X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.11 Sender: Ceri Davies Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, "login: please move nologin under /bin directory" <374525@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, anibal@debian.org Subject: Re: Bug#366546: [Debian] login: please move nologin under /bin directory X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 15:10:08 -0000 --ZJcv+A0YCCLh2VIg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 05, 2006 at 08:52:28AM +0300, Jari Aalto+mail.linux wrote: > | On Tue, Jul 04, 2006 at 09:38:18PM +0300, Jari Aalto+mail.linux wrote: > |=20 > | > However nologin is a system utility it would be better kept > | > directly under root directory, if /sbin is not ideal, then > | > it should go to /bin -- to same place as "login". > |=20 > | That's up to you; we don't consider it a system utility, that's all. > |=20 > | Our hier(7) is pretty clear, and we try to stick to it: > |=20 > | /bin/ user utilities fundamental to both single-user and > | multi-user environments >=20 > FHS 2.3 reads >=20 > > /bin contains commands that may be used by both the system > administrator and by users, but which are required=20 > when no other filesystems are mounted (e.g. in single user mode). > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > As Debian follows the FHS, the correct place here seems to be > /bin according to FHS. (as where "login" is also located) =46rom my reading, it isn't, since it isn't "required when no other filesystems are mounted". Obviously, I'm not familiar with your FHS, or the historical interpretations thereof, though. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --ZJcv+A0YCCLh2VIg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEq9ZIocfcwTS3JF8RAqWiAJ4wmnI34yF/8u+wjKo/72TogNe+/QCfXLLg MNKOPHUJwHHtMrJuZgJuypI= =Lzp0 -----END PGP SIGNATURE----- --ZJcv+A0YCCLh2VIg-- From owner-freebsd-arch@FreeBSD.ORG Wed Jul 5 15:18:43 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C83A816A4DA for ; Wed, 5 Jul 2006 15:18:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6087143D60 for ; Wed, 5 Jul 2006 15:18:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k65FFpUk098553; Wed, 5 Jul 2006 09:15:51 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 05 Jul 2006 09:15:56 -0600 (MDT) Message-Id: <20060705.091556.513891519.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <28872.1151526546@critter.freebsd.dk> References: <20060628150227.R75801@fledge.watson.org> <28872.1151526546@critter.freebsd.dk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: yar@comp.chem.msu.su, arch@freebsd.org Subject: Re: SET, CLR, ISSET in types.h for _KERNEL builds X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 15:18:43 -0000 In message: <28872.1151526546@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In message <20060628150227.R75801@fledge.watson.org>, "Andrew R. Reiter" writes : : : > : >I apologize for top posting, but I lost the email that I think my : >point/question pertains to. : > : >Part of this seems to be for compatibility / merging from drivers of other : >OSes, no? If I am wrong, ignore me :-). If this is the case, would it be : >better to create some common other area for things of this nature so that : >it suffices to allow builds, but does not infect other areas of our own : >code base? : : That's what I proposed too: #include This is even lamer. It makes no sense to invent a stupid place for a compatibility define. Might as well put the definition of NULL in limits.h. I'm killing this idea because people hate it. Warner From owner-freebsd-arch@FreeBSD.ORG Wed Jul 5 15:44:49 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99E1B16A543 for ; Wed, 5 Jul 2006 15:44:49 +0000 (UTC) (envelope-from arr@watson.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19DC243DE4 for ; Wed, 5 Jul 2006 15:44:04 +0000 (GMT) (envelope-from arr@watson.org) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.13.6/8.13.6) with ESMTP id k65Fh9t5039978; Wed, 5 Jul 2006 11:43:13 -0400 (EDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.13.6/8.13.6/Submit) with ESMTP id k65Fh4B8039971; Wed, 5 Jul 2006 11:43:04 -0400 (EDT) (envelope-from arr@watson.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Wed, 5 Jul 2006 11:43:04 -0400 (EDT) From: "Andrew R. Reiter" To: "M. Warner Losh" In-Reply-To: <20060705.091556.513891519.imp@bsdimp.com> Message-ID: <20060705114233.G38456@fledge.watson.org> References: <20060628150227.R75801@fledge.watson.org> <28872.1151526546@critter.freebsd.dk> <20060705.091556.513891519.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: arch@freebsd.org, phk@phk.freebsd.dk, yar@comp.chem.msu.su Subject: Re: SET, CLR, ISSET in types.h for _KERNEL builds X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 15:44:49 -0000 On Wed, 5 Jul 2006, M. Warner Losh wrote: :In message: <28872.1151526546@critter.freebsd.dk> : "Poul-Henning Kamp" writes: :: In message <20060628150227.R75801@fledge.watson.org>, "Andrew R. Reiter" writes :: : :: > :: >I apologize for top posting, but I lost the email that I think my :: >point/question pertains to. :: > :: >Part of this seems to be for compatibility / merging from drivers of other :: >OSes, no? If I am wrong, ignore me :-). If this is the case, would it be :: >better to create some common other area for things of this nature so that :: >it suffices to allow builds, but does not infect other areas of our own :: >code base? :: :: That's what I proposed too: #include : :This is even lamer. It makes no sense to invent a stupid place for a :compatibility define. Might as well put the definition of NULL in :limits.h. : :I'm killing this idea because people hate it. Please explain which "idea" you're killing ... because your post-July 4th attitude does not make it clear. THANKS! : :Warner : : -- arr@watson.org From owner-freebsd-arch@FreeBSD.ORG Thu Jul 6 06:01:04 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A88116A4E7 for ; Thu, 6 Jul 2006 06:01:04 +0000 (UTC) (envelope-from christian.perrier@onera.fr) Received: from onera.onera.fr (onera.onera.fr [144.204.65.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B16C43D5E for ; Thu, 6 Jul 2006 06:01:01 +0000 (GMT) (envelope-from christian.perrier@onera.fr) Received: from cc-mykerinos.onera (localhost [127.0.0.1]) by onera.onera.fr with ESMTP id k6660roG026476; Thu, 6 Jul 2006 08:00:53 +0200 (MEST) Received: by cc-mykerinos.onera (Postfix, from userid 1000) id C24C740AC56; Thu, 6 Jul 2006 07:34:50 +0200 (CEST) Date: Thu, 6 Jul 2006 07:34:50 +0200 From: Christian Perrier To: "Jari Aalto+mail.linux" , "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: [security] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, "openssh-server: [security] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org>, anibal@debian.org Message-ID: <20060706053450.GQ22256@djedefre.onera> References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> <44ABBF13.8030602@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nO3oAMapP4dBpMZi" Content-Disposition: inline In-Reply-To: <44ABBF13.8030602@freebsd.org> User-Agent: Mutt/1.5.11+cvs20060403 Cc: Subject: Re: Bug#374525: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 06:01:04 -0000 --nO3oAMapP4dBpMZi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Colin Percival: > FWIW, nologin was in /sbin in BSD 4.4; this is almost certainly why > OpenBSD still has /sbin/nologin. >=20 > I moved FreeBSD's nologin to /usr/sbin two years ago, because Thanks a lot for taking time to detail all this. This is very helpful to make a decision. I like such interesting collaboration. The balance is currently more and more in favor of /usr/sbin for Debian...which is nice because this is what we use right now..:-) Reformulation: Jari, you need to bring strong arguments if you want us to change this, now..:-). This is not a "go away" answer but I think that maintaining your request for moving nologin to /bin will need you to give work to our Technical Committee..:-) --nO3oAMapP4dBpMZi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFErKD51OXtrMAUPS0RAsaEAJ4vffS1+rWEAYHWS+mo8smLY0j7vACePHtC uDtmApbhyQDCrE2/4OUpXlw= =/tE2 -----END PGP SIGNATURE----- --nO3oAMapP4dBpMZi-- From owner-freebsd-arch@FreeBSD.ORG Thu Jul 6 15:04:35 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D56A216A4E6 for ; Thu, 6 Jul 2006 15:04:35 +0000 (UTC) (envelope-from jari.aalto@cante.net) Received: from fep02-app.kolumbus.fi (fep02-0.kolumbus.fi [193.229.0.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3C5543D45 for ; Thu, 6 Jul 2006 15:04:34 +0000 (GMT) (envelope-from jari.aalto@cante.net) Received: from bongo.cante.net ([81.197.0.130]) by fep02-app.kolumbus.fi with ESMTP id <20060706150432.KBXG15296.fep02-app.kolumbus.fi@bongo.cante.net>; Thu, 6 Jul 2006 18:04:32 +0300 Received: from ns2.cante.net ([192.168.1.3] helo=cante) by bongo.cante.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1FyVOg-000130-Fn; Thu, 06 Jul 2006 18:04:06 +0300 Received: from jaalto by cante with local (Exim 4.62) (envelope-from ) id 1FyVOa-0004Vd-Rf; Thu, 06 Jul 2006 18:04:00 +0300 To: Christian Perrier Mail-Copies-To: poster References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> <44ABBF13.8030602@freebsd.org> From: jari.aalto@cante.net (Jari Aalto+mail.linux) Message-Id: Date: Thu, 06 Jul 2006 18:04:00 +0300 Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, anibal@debian.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org> Subject: Re: Bug#374525: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 15:04:35 -0000 | Colin Percival: | | > FWIW, nologin was in /sbin in BSD 4.4; this is almost certainly why | > OpenBSD still has /sbin/nologin. | >=20 | > I moved FreeBSD's nologin to /usr/sbin two years ago, because | | | Thanks a lot for taking time to detail all this. This is very helpful | to make a decision. I like such interesting collaboration. | | The balance is currently more and more in favor of /usr/sbin for | Debian...which is nice because this is what we use right now..:-) | | Reformulation: Jari, you need to bring strong arguments if you want us | to change this, now..:-). This is not a "go away" answer but I think | that maintaining your request for moving nologin to /bin will need you | to give work to our Technical Committee..:-) Please go ahead, I have no objections. Glad to see this issue resolved. Jari From owner-freebsd-arch@FreeBSD.ORG Thu Jul 6 16:22:43 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A67F16A4DE; Thu, 6 Jul 2006 16:22:43 +0000 (UTC) (envelope-from kloczek@zie.pg.gda.pl) Received: from smtp.zie.pg.gda.pl (smtp.zie.pg.gda.pl [153.19.33.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4637C43D46; Thu, 6 Jul 2006 16:22:41 +0000 (GMT) (envelope-from kloczek@zie.pg.gda.pl) Received: from localhost (smtp-scanner.admins.zie [192.168.111.20]) by smtp.zie.pg.gda.pl (Postfix) with ESMTP id AF80619C05F; Thu, 6 Jul 2006 18:22:35 +0200 (CEST) Received: from smtp.zie.pg.gda.pl ([192.168.111.230]) by localhost (smtp-scanner.admins.zie [192.168.111.20]) (amavisd-new, port 10024) with ESMTP id 26004-03; Thu, 6 Jul 2006 18:22:33 +0200 (CEST) Received: by smtp.zie.pg.gda.pl (Postfix, from userid 2732) id 4BF0619C038; Thu, 6 Jul 2006 18:22:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by smtp.zie.pg.gda.pl (Postfix) with ESMTP id 3E6125C00B; Thu, 6 Jul 2006 18:22:33 +0200 (CEST) Date: Thu, 6 Jul 2006 18:22:33 +0200 (CEST) From: =?UTF-8?Q?Tomasz_K=C5=82oczko?= To: Colin Percival , "login: please move nologin under /bin directory" <374525@bugs.debian.org> In-Reply-To: <44ABBF13.8030602@freebsd.org> Message-ID: References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> <44ABBF13.8030602@freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="569415955-1443178169-1152202953=:3049" X-Virus-Scanned: amavisd-new at zie.pg.gda.pl X-Mailman-Approved-At: Thu, 06 Jul 2006 16:38:07 +0000 Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, debian-bugs-dist@lists.debian.org, "Jari Aalto+mail.linux" , Ceri Davies , mstone@debian.org, freebsd-arch@freebsd.org, anibal@debian.org, Shadow package maintainers , "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org> Subject: Re: Bug#374525: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 16:22:43 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --569415955-1443178169-1152202953=:3049 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 5 Jul 2006, Colin Percival wrote: > Christian Perrier wrote: > > As a first reaction and as one of the shadow maintainer, I'm now > > inclined to agree with the choice of the FreeBSD team here. > >=20 > > The rationale is clear... > >=20 > > I'd like to hear the one from OpenBSD to put nologin in /sbin > > though.. they might have a different definition of what goes in /sbin >=20 > FWIW, nologin was in /sbin in BSD 4.4; this is almost certainly why > OpenBSD still has /sbin/nologin. >=20 > I moved FreeBSD's nologin to /usr/sbin two years ago, because > 1. nologin needs to be statically linked to avoid linker environment > security issues, Key word in this case is "avoiding". If some bad things sits in ld.so why= =20 not fix this directly ? Also strange thing IMO is in this case is nologin static linking. Yes I=20 know about ssh pass LD_* but IMO fixing this by static linking is=20 incorrect way because this is only next "avoiding" .. kloczek --=20 ----------------------------------------------------------- *Ludzie nie maj=C4=85 problem=C3=B3w, tylko sobie sami je stwarzaj=C4=85* ----------------------------------------------------------- Tomasz K=C5=82oczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@rudy.mif.pg.gd= a.pl* --569415955-1443178169-1152202953=:3049-- From owner-freebsd-arch@FreeBSD.ORG Fri Jul 7 05:37:03 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 841F016A4DF for ; Fri, 7 Jul 2006 05:37:03 +0000 (UTC) (envelope-from christian.perrier@onera.fr) Received: from onera.onera.fr (onera.onera.fr [144.204.65.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA49243D46 for ; Fri, 7 Jul 2006 05:37:02 +0000 (GMT) (envelope-from christian.perrier@onera.fr) Received: from cc-mykerinos.onera (localhost [127.0.0.1]) by onera.onera.fr with ESMTP id k675alOV012412; Fri, 7 Jul 2006 07:36:47 +0200 (MEST) Received: by cc-mykerinos.onera (Postfix, from userid 1000) id 1D6C840AC74; Fri, 7 Jul 2006 07:36:46 +0200 (CEST) Date: Fri, 7 Jul 2006 07:36:46 +0200 From: Christian Perrier To: 366546-maintonly@bugs.debian.org Message-ID: <20060707053646.GG5413@djedefre.onera> References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> <44ABBF13.8030602@freebsd.org> <44ADEDB7.9000107@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WplhKdTI2c8ulnbP" Content-Disposition: inline In-Reply-To: <44ADEDB7.9000107@freebsd.org> User-Agent: Mutt/1.5.11+cvs20060403 Cc: "login: please move nologin under /bin directory" <374525@bugs.debian.org>, freebsd-arch@freebsd.org, mstone@debian.org, "Jari Aalto+mail.linux" Subject: Re: Bug#366546: Bug#374525: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 05:37:03 -0000 --WplhKdTI2c8ulnbP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (shortening the CC list a little, assuming that ppl from the FreeBSD project read freebsd-arch which seems likely) > FreeBSD's dynamic linker knows about the security issues involving LD_* > (set[ug]id binaries and noexec filesystems) and acts accordingly. Howeve= r, > /usr/sbin/nologin is not set[ug]id, and unlike other shells, we care if a > user can subvert it by preloading libraries. >=20 > Debian might have a different solution to this problem; but this one works > for FreeBSD. >=20 > Colin Percival To refix the context, Tomasz Klockzko, who you're answering to, is not working in the Debian project, but is the upstream author of shadow, which provides two binary packages in Debian, namely login and passwd. nologin is provided in the "login" package. So, in short, Tomasz does not really speak with a Debian-centric reasoning but more with his upstream hat (upstream for "our" nologin of course). --=20 --WplhKdTI2c8ulnbP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFErfLu1OXtrMAUPS0RAjQwAJ4lOl1irz0UgjbtJohRs7Z3EQkBhwCfWZho KRtIJGm6lunTU9jv6tmj0vk= =KRV7 -----END PGP SIGNATURE----- --WplhKdTI2c8ulnbP-- From owner-freebsd-arch@FreeBSD.ORG Fri Jul 7 08:23:28 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6529416A4DD; Fri, 7 Jul 2006 08:23:28 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAC0843D45; Fri, 7 Jul 2006 08:23:27 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 069235138F; Fri, 7 Jul 2006 10:23:26 +0200 (CEST) Received: from localhost (unknown [195.117.102.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 97A1651339; Fri, 7 Jul 2006 10:23:21 +0200 (CEST) Date: Fri, 7 Jul 2006 10:20:24 +0200 From: Pawel Jakub Dawidek To: John Baldwin Message-ID: <20060707082024.GC11794@garage.freebsd.pl> References: <20060627.120424.-1625880159.imp@bsdimp.com> <62426.1151433799@critter.freebsd.dk> <20060627201148.GC24054@garage.freebsd.pl> <200606281036.08090.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TYecfFk8j8mZq+dy" Content-Disposition: inline In-Reply-To: <200606281036.08090.jhb@freebsd.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: Poul-Henning Kamp , gurney_j@resnet.uoregon.edu, freebsd-arch@freebsd.org Subject: Re: Accessing disks via their serial numbers. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 08:23:28 -0000 --TYecfFk8j8mZq+dy Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 28, 2006 at 10:36:07AM -0400, John Baldwin wrote: > On Tuesday 27 June 2006 16:11, Pawel Jakub Dawidek wrote: > > On Tue, Jun 27, 2006 at 06:43:19PM +0000, Poul-Henning Kamp wrote: > > I wrote this twice already in this thread, but let me write it again. > > File systems are not the whole world. For example. I've a disk ad0. > > I configured gbde(4) on top of it. I create file system on top of > > ad0.bde. Now, let's assume I implemented shrinkfs(8) as you suggested, > > how can I shrink gbde(4) provider? >=20 > If you want a label you should label it before gbde(4). This is similar = to=20 > the fact that you can't retroactively add a gmirror under the gbde slice= =20 > either. That's right. And this is how I do it. Unfortunately this is not always the case. First of all, sysinstall doesn't have support for configuring things like gbde/gmirror (which of course can be changed) or you may simply not expect that you will need labels on your disks when you install the system... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --TYecfFk8j8mZq+dy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFErhlIForvXbEpPzQRAtVbAJ4szoIFYH8EShI4yDMVdbG0rmWEvACg1uSu mVREMuvTuE6ikjcMQ5euIo0= =k0Ns -----END PGP SIGNATURE----- --TYecfFk8j8mZq+dy-- From owner-freebsd-arch@FreeBSD.ORG Fri Jul 7 15:15:48 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 132F416A4DF for ; Fri, 7 Jul 2006 15:15:48 +0000 (UTC) (envelope-from jari.aalto@cante.net) Received: from fep01-app.kolumbus.fi (fep01-0.kolumbus.fi [193.229.0.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC14443D77 for ; Fri, 7 Jul 2006 15:15:40 +0000 (GMT) (envelope-from jari.aalto@cante.net) Received: from bongo.cante.net ([81.197.0.130]) by fep01-app.kolumbus.fi with ESMTP id <20060707151534.TWGA11715.fep01-app.kolumbus.fi@bongo.cante.net>; Fri, 7 Jul 2006 18:15:34 +0300 Received: from fw.cante.net ([192.168.1.3] helo=cante) by bongo.cante.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1Fys2t-00037m-St; Fri, 07 Jul 2006 18:15:07 +0300 Received: from jaalto by cante with local (Exim 4.62) (envelope-from ) id 1Fys29-0005cn-Dt; Fri, 07 Jul 2006 18:14:21 +0300 To: Christian Perrier Mail-Copies-To: poster References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> <44ABBF13.8030602@freebsd.org> From: jari.aalto@cante.net (Jari Aalto+mail.linux) Message-Id: Date: Fri, 07 Jul 2006 18:14:21 +0300 Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, anibal@debian.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org> Subject: Re: Bug#374525: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 15:15:48 -0000 | Colin Percival: | | > FWIW, nologin was in /sbin in BSD 4.4; this is almost certainly why | > OpenBSD still has /sbin/nologin. | >=20 | > I moved FreeBSD's nologin to /usr/sbin two years ago, because | | | Thanks a lot for taking time to detail all this. This is very helpful | to make a decision. I like such interesting collaboration. | | The balance is currently more and more in favor of /usr/sbin for | Debian...which is nice because this is what we use right now..:-) | | Reformulation: Jari, you need to bring strong arguments if you want us | to change this, now..:-). This is not a "go away" answer but I think | that maintaining your request for moving nologin to /bin will need you | to give work to our Technical Committee..:-) Please go ahead, I have no objections. Glad to see this issue resolved. Jari From owner-freebsd-arch@FreeBSD.ORG Fri Jul 7 15:44:22 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C3DD16A4DE for ; Fri, 7 Jul 2006 15:44:22 +0000 (UTC) (envelope-from jari.aalto@cante.net) Received: from fep30-app.kolumbus.fi (fep30-0.kolumbus.fi [193.229.0.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8412243D46 for ; Fri, 7 Jul 2006 15:44:19 +0000 (GMT) (envelope-from jari.aalto@cante.net) Received: from bongo.cante.net ([81.197.0.130]) by fep30-app.kolumbus.fi with ESMTP id <20060707154413.FDYK13771.fep30-app.kolumbus.fi@bongo.cante.net>; Fri, 7 Jul 2006 18:44:13 +0300 Received: from ns2.cante.net ([192.168.1.3] helo=cante) by bongo.cante.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1FysUY-0003Ag-R0; Fri, 07 Jul 2006 18:43:42 +0300 Received: from jaalto by cante with local (Exim 4.62) (envelope-from ) id 1FysAF-0005fD-SQ; Fri, 07 Jul 2006 18:22:44 +0300 To: Christian Perrier Mail-Copies-To: poster References: <20060509153807.16297.97467.reportbug@cante> <20060620050937.GB18750@djedefre.onera> <20060704192449.GC76109@submonkey.net> <20060705054251.GF5220@djedefre.onera> <44ABBF13.8030602@freebsd.org> From: jari.aalto@cante.net (Jari Aalto+mail.linux) Message-Id: Date: Fri, 07 Jul 2006 18:22:43 +0300 Cc: "exim4-daemon-heavy: Use /bin/nologin instead of /bin/false in /etc/passwd" <366546-maintonly@bugs.debian.org>, "pidentd: \[security\] use /bin/nologin instead of /bin/false in /etc/passwd" <366545-maintonly@bugs.debian.org>, mstone@debian.org, freebsd-arch@freebsd.org, anibal@debian.org, "openssh-server: \[security\] use /bin/nologin instead of /bin/false" <366541-maintonly@bugs.debian.org> Subject: Re: Bug#374525: [Pkg-shadow-devel] Bug#374525: Bug#366546: Mail delivery failed: returning message to sender X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 15:44:22 -0000 | Colin Percival: | | > FWIW, nologin was in /sbin in BSD 4.4; this is almost certainly why | > OpenBSD still has /sbin/nologin. | >=20 | > I moved FreeBSD's nologin to /usr/sbin two years ago, because | | | Thanks a lot for taking time to detail all this. This is very helpful | to make a decision. I like such interesting collaboration. | | The balance is currently more and more in favor of /usr/sbin for | Debian...which is nice because this is what we use right now..:-) | | Reformulation: Jari, you need to bring strong arguments if you want us | to change this, now..:-). This is not a "go away" answer but I think | that maintaining your request for moving nologin to /bin will need you | to give work to our Technical Committee..:-) Please go ahead, I have no objections. Glad to see this issue resolved. Jari From owner-freebsd-arch@FreeBSD.ORG Fri Jul 7 16:57:36 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E40616A4DE; Fri, 7 Jul 2006 16:57:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FB6B43D46; Fri, 7 Jul 2006 16:57:35 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k67GvXOJ018749; Fri, 7 Jul 2006 12:57:34 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Pawel Jakub Dawidek Date: Fri, 7 Jul 2006 12:57:25 -0400 User-Agent: KMail/1.9.1 References: <20060627.120424.-1625880159.imp@bsdimp.com> <200606281036.08090.jhb@freebsd.org> <20060707082024.GC11794@garage.freebsd.pl> In-Reply-To: <20060707082024.GC11794@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607071257.26394.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 07 Jul 2006 12:57:34 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1589/Fri Jul 7 10:37:51 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Poul-Henning Kamp , gurney_j@resnet.uoregon.edu, freebsd-arch@freebsd.org Subject: Re: Accessing disks via their serial numbers. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 16:57:36 -0000 On Friday 07 July 2006 04:20, Pawel Jakub Dawidek wrote: > On Wed, Jun 28, 2006 at 10:36:07AM -0400, John Baldwin wrote: > > On Tuesday 27 June 2006 16:11, Pawel Jakub Dawidek wrote: > > > On Tue, Jun 27, 2006 at 06:43:19PM +0000, Poul-Henning Kamp wrote: > > > I wrote this twice already in this thread, but let me write it again. > > > File systems are not the whole world. For example. I've a disk ad0. > > > I configured gbde(4) on top of it. I create file system on top of > > > ad0.bde. Now, let's assume I implemented shrinkfs(8) as you suggested, > > > how can I shrink gbde(4) provider? > > > > If you want a label you should label it before gbde(4). This is similar to > > the fact that you can't retroactively add a gmirror under the gbde slice > > either. > > That's right. And this is how I do it. Unfortunately this is not always > the case. First of all, sysinstall doesn't have support for configuring > things like gbde/gmirror (which of course can be changed) or you may > simply not expect that you will need labels on your disks when you > install the system... If you want to label a filesystem that should be part of the filesystem's metadata. If you want to label a region of the disk it seems sensible that one has to label it before putting other stuff into it. Either that or the label's belong in the geom that manages the region you are trying to label (i.e. geom_mbr would manage labels for mbr slices). -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 07:59:56 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7454616A4DD for ; Sat, 8 Jul 2006 07:59:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3DFC43D49 for ; Sat, 8 Jul 2006 07:59:55 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k687vtnx075471 for ; Sat, 8 Jul 2006 01:57:55 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 08 Jul 2006 01:58:01 -0600 (MDT) Message-Id: <20060708.015801.-1303463244.imp@bsdimp.com> To: arch@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: EEPROMs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 07:59:56 -0000 Greetings, I have an embedded arm board that has about 4 different kinds of EEPROMs on it. These EEPROMs and flash parts are connected in various and wonderful ways (spi, i2c, parallel bus, and mabye a custom fpga thing). There's also a number of add-in boards that have a few different eeproms on them as appropriate for the board. Not all of these technologies will be in our final product, but I need to develop drivers to talk to many of them for at least experimental purposes. There's a desire to have all these eeproms available as real devices to the system, some of them even GEOM providers (I think that's the right term). Some of these drivers may be on multiple busses (the AT45DB642, for example, lives on either a SPI bus or a parallel bus). Most of them will be tiny because the 'heavy lifting' for the devices is done in the upper layer (initiating the i2c transfer, doing the spi transaction, etc). Sadly, these devices are all somewhat different in the niggling little details that make them work, so separate drivers will likely be needed for at least some of them. Normally, we'd just create a src/sys/dev directory for each device. We've done it with all the drivers in the system, except for really old legacy jobs, usb (since it was ported from an os that doesn't share quite the same world-view when it comes to drivers (ours is driver centric, theirs is bus centric),and sound (which has a boatload of supported drivers, all living under dev/sound subdirectories). I'm thinking seriously of putting them under dev/eeprom or dev/flash or something like that, and then creating subdirectories under than to help the clutter in src/sys/dev. Before I do such a radical thing, I thought I'd tell people my plans so they don't freak when it hits the tree. Comments? Warner From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 08:09:20 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 877CF16A4DA for ; Sat, 8 Jul 2006 08:09:20 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32C6B43D49 for ; Sat, 8 Jul 2006 08:09:20 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id ADD171703F; Sat, 8 Jul 2006 08:09:18 +0000 (UTC) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 08 Jul 2006 01:58:01 CST." <20060708.015801.-1303463244.imp@bsdimp.com> Date: Sat, 08 Jul 2006 08:09:17 +0000 Message-ID: <48462.1152346157@critter.freebsd.dk> Cc: arch@freebsd.org Subject: Re: EEPROMs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 08:09:20 -0000 In message <20060708.015801.-1303463244.imp@bsdimp.com>, "M. Warner Losh" write s: >I'm thinking seriously of putting them under dev/eeprom or dev/flash >or something like that, and then creating subdirectories under than to >help the clutter in src/sys/dev. I'm seriously for a more scalable /dev directory. -- 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. From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 08:19:57 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C525C16A4DA for ; Sat, 8 Jul 2006 08:19:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57A2343D45 for ; Sat, 8 Jul 2006 08:19:57 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k688Hg8R075726; Sat, 8 Jul 2006 02:17:42 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 08 Jul 2006 02:17:48 -0600 (MDT) Message-Id: <20060708.021748.-457441564.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <48462.1152346157@critter.freebsd.dk> References: <20060708.015801.-1303463244.imp@bsdimp.com> <48462.1152346157@critter.freebsd.dk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: EEPROMs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 08:19:57 -0000 In message: <48462.1152346157@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In message <20060708.015801.-1303463244.imp@bsdimp.com>, "M. Warner Losh" write : s: : : >I'm thinking seriously of putting them under dev/eeprom or dev/flash : >or something like that, and then creating subdirectories under than to : >help the clutter in src/sys/dev. : : I'm seriously for a more scalable /dev directory. /dev or src/sys/dev? I'd rather avoid a whole-sale driver rename, and the resulting MFC chaos that would cause. I'm just looking to add something in a scalable way. Warner From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 08:51:47 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 182E016A50A for ; Sat, 8 Jul 2006 08:51:47 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6EE343D46 for ; Sat, 8 Jul 2006 08:51:46 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 0A8391703F; Sat, 8 Jul 2006 08:51:44 +0000 (UTC) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 08 Jul 2006 02:17:48 CST." <20060708.021748.-457441564.imp@bsdimp.com> Date: Sat, 08 Jul 2006 08:51:44 +0000 Message-ID: <48650.1152348704@critter.freebsd.dk> Cc: arch@freebsd.org Subject: Re: EEPROMs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 08:51:47 -0000 In message <20060708.021748.-457441564.imp@bsdimp.com>, "M. Warner Losh" writes : >: >I'm thinking seriously of putting them under dev/eeprom or dev/flash >: >or something like that, and then creating subdirectories under than to >: >help the clutter in src/sys/dev. >: >: I'm seriously for a more scalable /dev directory. > >/dev or src/sys/dev? [...] /dev Poul-Henning -- 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. From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 15:28:10 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9223016A5F2; Sat, 8 Jul 2006 15:28:04 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.192.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F86943D55; Sat, 8 Jul 2006 15:28:04 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-71-233-168-2.hsd1.ma.comcast.net ([71.233.168.2]) by comcast.net (rwcrmhc13) with ESMTP id <20060708152802m1300sb44qe>; Sat, 8 Jul 2006 15:28:03 +0000 Received: from c-71-233-168-2.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1) with ESMTP id k68FS1P9003696; Sat, 8 Jul 2006 11:28:02 -0400 (EDT) (envelope-from rodrigc@c-71-233-168-2.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1/Submit) id k68FS1s2003695; Sat, 8 Jul 2006 11:28:01 -0400 (EDT) (envelope-from rodrigc) Date: Sat, 8 Jul 2006 11:28:01 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20060708152801.GA3671@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: freebsd-arch@freebsd.org Subject: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 15:28:10 -0000 Hi, One of the pet peeves I have with FreeBSD is that if I have a device with a local filesystem that I want to mount, I need to explicitly know what type of filesystem is on the device in order to mount it from the command-line. For example, mount -t cd9660 mount -t udf mount -t ext2fs mount -t msdosfs Where this is particularly annoying is if I have multiple USB thumb drives with different filesystems on them. What I usually end up doing is something like: file - < /dev/ad0s4 to figure out the filesystem type, and then mount -t [whatever] to mount it. What I would like to do is: mount /dev/ad0s4 /mnt and if I do not specify a filesystem type with -t, the mount program should "magically" figure out how to mount the disk. This is closer to how the mount program behaves on Linux for example. I've come up with a patch that does this, by interpreting an fstype of "" as: - starting with "ufs", iterate over all the local filesystem types that we know about, and try to mount the device Comments? Index: sys/kern/vfs_mount.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_mount.c,v retrieving revision 1.228 diff -u -u -r1.228 vfs_mount.c --- sys/kern/vfs_mount.c 27 Jun 2006 14:46:31 -0000 1.228 +++ sys/kern/vfs_mount.c 8 Jul 2006 14:01:52 -0000 @@ -567,6 +567,34 @@ } static int +vfs_domount_try(struct thread *td, char *fspath, int fsflags, + void *fsdata) +{ + struct vfsconf *vfsp; + int error; + printf("Mounting: %s first\n", "ufs"); + error = vfs_domount(td, "ufs", fspath, fsflags, fsdata); + if (error == 0) { + printf("successfully mounted: %s\n", "ufs"); + } + if (error != 0) { + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { + if ((strcmp("ufs", vfsp->vfc_name) != 0) && + !(vfsp->vfc_flags & VFCF_NETWORK) && + !(vfsp->vfc_flags & VFCF_SYNTHETIC)) { + printf("Mounting: %s\n", vfsp->vfc_name); + error = vfs_domount(td, vfsp->vfc_name, fspath, fsflags, fsdata); + if (error == 0) { + printf("successfully mounted: %s\n", vfsp->vfc_name); + break; + } + } + } + } + return error; +} + +static int vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions) { struct vfsoptlist *optlist; @@ -596,7 +624,7 @@ */ fstypelen = 0; error = vfs_getopt(optlist, "fstype", (void **)&fstype, &fstypelen); - if (error || fstype[fstypelen - 1] != '\0') { + if (error || (fstypelen > 0 && fstype[fstypelen - 1] != '\0')) { error = EINVAL; if (errmsg != NULL) strncpy(errmsg, "Invalid fstype", errmsg_len); @@ -606,6 +634,7 @@ error = vfs_getopt(optlist, "fspath", (void **)&fspath, &fspathlen); if (error || fspath[fspathlen - 1] != '\0') { error = EINVAL; + printf("%s:%d EINVAL\n", __FILE__, __LINE__); if (errmsg != NULL) strncpy(errmsg, "Invalid fspath", errmsg_len); goto bail; @@ -686,7 +715,14 @@ } mtx_lock(&Giant); - error = vfs_domount(td, fstype, fspath, fsflags, optlist); + if (fstypelen > 1) { + /* fstype was specified, go directly to vfs_domount() */ + error = vfs_domount(td, fstype, fspath, fsflags, optlist); + } + else { + /* we do not know the fstype, try to probe for it */ + error = vfs_domount_try(td, fspath, fsflags, optlist); + } mtx_unlock(&Giant); bail: /* copyout the errmsg */ Index: sbin/mount/mount.c =================================================================== RCS file: /home/ncvs/src/sbin/mount/mount.c,v retrieving revision 1.87 diff -u -u -r1.87 mount.c --- sbin/mount/mount.c 10 Jun 2006 01:44:57 -0000 1.87 +++ sbin/mount/mount.c 8 Jul 2006 14:14:47 -0000 @@ -200,7 +200,7 @@ all = init_flags = 0; vfslist = NULL; - vfstype = "ufs"; + vfstype = ""; while ((ch = getopt(argc, argv, "adF:fo:prwt:uv")) != -1) switch (ch) { case 'a': Index: sbin/mount/mount_fs.c =================================================================== RCS file: /home/ncvs/src/sbin/mount/mount_fs.c,v retrieving revision 1.2 diff -u -u -r1.2 mount_fs.c --- sbin/mount/mount_fs.c 13 Nov 2005 01:27:57 -0000 1.2 +++ sbin/mount/mount_fs.c 8 Jul 2006 14:14:47 -0000 @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -82,8 +83,9 @@ int iovlen; int mntflags = 0; int ch; - char *dev, *dir, mntpath[MAXPATHLEN]; + char *dev, *dir, mntpath[MAXPATHLEN], frompath[MAXPATHLEN]; char fstype[32]; + //char errmsg[1024] = { 0 }; char *p, *val; int ret; @@ -121,15 +123,35 @@ dir = argv[1]; (void)checkpath(dir, mntpath); + if (realpath(dev, frompath) != NULL) { + dev = frompath; + } (void)rmslashes(dev, dev); build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1); build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1); build_iovec(&iov, &iovlen, "from", dev, (size_t)-1); - + //build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); + printf("fstype: %s, fspath: %s, from: %s\n", fstype, mntpath, dev); +retry: ret = nmount(iov, iovlen, mntflags); - if (ret < 0) - err(1, "%s", dev); + if (ret < 0 && iov[1].iov_len == 0) { + /* + * If an fstype was not specified, and nmount() failed, + * try again with an fstype of "ufs". This is for backwards + * compatibility with older kernels which do not support + * do_mount_try() with an fstype of "". + */ + iov[1].iov_base = strdup("ufs"); + iov[1].iov_len = 4; + printf("Trying again....\n"); + goto retry; + } + + if (ret < 0) { + //err(1, "%s %s", dev, errmsg); + //err(1, "%s", dev); + } return (ret); } -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 15:37:33 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92A4B16A4E5; Sat, 8 Jul 2006 15:37:33 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 121E143D64; Sat, 8 Jul 2006 15:37:31 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id EF87A2083; Sat, 8 Jul 2006 17:37:26 +0200 (CEST) X-Spam-Tests: none X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id E276A2082; Sat, 8 Jul 2006 17:37:26 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id AD2EF33C28; Sat, 8 Jul 2006 17:37:26 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Craig Rodrigues References: <20060708152801.GA3671@crodrigues.org> Date: Sat, 08 Jul 2006 17:37:26 +0200 In-Reply-To: <20060708152801.GA3671@crodrigues.org> (Craig Rodrigues's message of "Sat, 8 Jul 2006 11:28:01 -0400") Message-ID: <86ac7krtu1.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 15:37:33 -0000 Craig Rodrigues writes: > I've come up with a patch that does this, by interpreting > an fstype of "" as: > - starting with "ufs", iterate over all the local filesystem types > that we know about, and try to mount the device What about cases where there may be several matching file systems? For instance, a clean ext3 file system is also a valid ext2 file system (and vice versa). DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 16:05:53 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B362016A4DA; Sat, 8 Jul 2006 16:05:53 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6568F43D45; Sat, 8 Jul 2006 16:05:53 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.199] ([10.0.0.199]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k68G5oV6075714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Jul 2006 09:05:51 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44AFD7DF.8090002@errno.com> Date: Sat, 08 Jul 2006 09:05:51 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060530) MIME-Version: 1.0 To: Craig Rodrigues References: <20060708152801.GA3671@crodrigues.org> In-Reply-To: <20060708152801.GA3671@crodrigues.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 16:05:53 -0000 Craig Rodrigues wrote: > Hi, > > One of the pet peeves I have with FreeBSD is that > if I have a device with a local filesystem that I want to mount, > I need to explicitly know what type of filesystem is on the > device in order to mount it from the command-line. > > For example, > > mount -t cd9660 > mount -t udf > mount -t ext2fs > mount -t msdosfs > > Where this is particularly annoying is if I have multiple > USB thumb drives with different filesystems on them. > > What I usually end up doing is something like: > file - < /dev/ad0s4 > > to figure out the filesystem type, and then mount -t [whatever] to mount it. > > What I would like to do is: > > mount /dev/ad0s4 /mnt > > and if I do not specify a filesystem type with -t, the mount > program should "magically" figure out how to mount the disk. > This is closer to how the mount program behaves on Linux for example. > > I've come up with a patch that does this, by interpreting > an fstype of "" as: > - starting with "ufs", iterate over all the local filesystem types > that we know about, and try to mount the device > > Comments? <...patch deleted...> Linux has -t auto; haven't looked at how it works. It appears you just try a series of fs types; can't you read the device to infer the filesystem? Sam From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 16:14:34 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA9F116A4DA; Sat, 8 Jul 2006 16:14:34 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63FAE43D46; Sat, 8 Jul 2006 16:14:34 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-71-233-168-2.hsd1.ma.comcast.net ([71.233.168.2]) by comcast.net (rwcrmhc15) with ESMTP id <20060708160932m15004em26e>; Sat, 8 Jul 2006 16:09:32 +0000 Received: from c-71-233-168-2.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1) with ESMTP id k68G9Vv6003907; Sat, 8 Jul 2006 12:09:31 -0400 (EDT) (envelope-from rodrigc@c-71-233-168-2.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1/Submit) id k68G9VS0003906; Sat, 8 Jul 2006 12:09:31 -0400 (EDT) (envelope-from rodrigc) Date: Sat, 8 Jul 2006 12:09:31 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20060708160931.GA3871@crodrigues.org> References: <20060708152801.GA3671@crodrigues.org> <86ac7krtu1.fsf@xps.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86ac7krtu1.fsf@xps.des.no> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 16:14:35 -0000 On Sat, Jul 08, 2006 at 05:37:26PM +0200, Dag-Erling Smrgrav wrote: > What about cases where there may be several matching file systems? > For instance, a clean ext3 file system is also a valid ext2 file > system (and vice versa). Currently, FreeBSD can only mount ext2 with mount -t ext2fs. A better example would probably be udf and cd9660 filesystems. Right now the logic is to iterate over the list of known local filesystems (always starting with "ufs"), skipping over "synthetic" and "network" filesystems, i.e. similar to the list produced by lsvfs: Filesystem Refs Flags -------------------------------- ----- --------------- ufs 8 reiserfs 0 read-only nfs4 0 network ext2fs 0 ntfs 0 cd9660 0 read-only procfs 1 synthetic msdosfs 0 xfs 0 devfs 1 synthetic nfs 0 network The first matching filesystem wins....not perfect, but maybe good enough for a lot of cases. mount -t always works if you want to specify the fstype. -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 16:17:21 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2049616A4DA; Sat, 8 Jul 2006 16:17:21 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B96243D45; Sat, 8 Jul 2006 16:17:20 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-71-233-168-2.hsd1.ma.comcast.net ([71.233.168.2]) by comcast.net (rwcrmhc15) with ESMTP id <20060708161719m15004h5pse>; Sat, 8 Jul 2006 16:17:19 +0000 Received: from c-71-233-168-2.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1) with ESMTP id k68GHJtX003985; Sat, 8 Jul 2006 12:17:19 -0400 (EDT) (envelope-from rodrigc@c-71-233-168-2.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1/Submit) id k68GHJwk003984; Sat, 8 Jul 2006 12:17:19 -0400 (EDT) (envelope-from rodrigc) Date: Sat, 8 Jul 2006 12:17:19 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20060708161719.GB3871@crodrigues.org> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44AFD7DF.8090002@errno.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 16:17:21 -0000 On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: > Linux has -t auto; haven't looked at how it works. I didn't want to implement -t auto, in case that would confuse things in case someone gets around to implementing autofs for FreeBSD, so I just used -t "". > It appears you just try a series of fs types; can't you read the device > to infer the filesystem? I was thinking of doing something like that. You can basically get the same info by doing something like: file - < /dev/ad0s1e /dev/stdin: Unix Fast File system (little-endian) file - < /dev/ad0s4 /dev/stdin: SGI XFS filesystem I leaned away from this approach in mount(8) because: - I didn't want to tie mount(8) to file(1) - I didn't want to build up a table of known superblocks inside mount(8) because every time a new filesystem is added to FreeBSD, mount(8) would need to be updated If there was a way, maybe at the GEOM or filesystem level to "taste" what type of filesystem existed on a device, and/or have a filesystem advertise what type of superblock it has, then that would be a nice way to do it, but I couldn't figure out a way to easily do it. -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 16:38:35 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F407116A4E0; Sat, 8 Jul 2006 16:38:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BA4143D5E; Sat, 8 Jul 2006 16:38:24 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k68GcAx3034638; Sat, 8 Jul 2006 10:38:15 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <44AFDF38.3030707@samsco.org> Date: Sat, 08 Jul 2006 10:37:12 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Craig Rodrigues References: <20060708152801.GA3671@crodrigues.org> <86ac7krtu1.fsf@xps.des.no> <20060708160931.GA3871@crodrigues.org> In-Reply-To: <20060708160931.GA3871@crodrigues.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 16:38:35 -0000 Craig Rodrigues wrote: > On Sat, Jul 08, 2006 at 05:37:26PM +0200, Dag-Erling Smrgrav wrote: > >>What about cases where there may be several matching file systems? >>For instance, a clean ext3 file system is also a valid ext2 file >>system (and vice versa). > > > Currently, FreeBSD can only mount ext2 with mount -t ext2fs. > > A better example would probably be udf and cd9660 filesystems. > > Right now the logic is to iterate over the list of known local > filesystems (always starting with "ufs"), skipping over "synthetic" > and "network" filesystems, > i.e. similar to the list produced by lsvfs: > > Filesystem Refs Flags > -------------------------------- ----- --------------- > ufs 8 > reiserfs 0 read-only > nfs4 0 network > ext2fs 0 > ntfs 0 > cd9660 0 read-only > procfs 1 synthetic > msdosfs 0 > xfs 0 > devfs 1 synthetic > nfs 0 network > > > > The first matching filesystem wins....not perfect, but > maybe good enough for a lot of cases. > > mount -t always works if you want to specify the fstype. > Where is udf in the list? Btw, it's not that udf and cd9660 are compatible, they aren't by any means. It's that the can co-exist on the same media, and often times a UDF filesystem has cd9660 structures available for compatibility. If you added udf to your list above with a higher priority than cd9660, everything should 'just work', and you'd still be able to override it manually. Scott From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 17:38:46 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2432716A4DF; Sat, 8 Jul 2006 17:38:46 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id C547A43D58; Sat, 8 Jul 2006 17:38:45 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k68HceAL076112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Jul 2006 10:38:41 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44AFEDA0.7040308@errno.com> Date: Sat, 08 Jul 2006 10:38:40 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.2 (X11/20060508) MIME-Version: 1.0 To: Craig Rodrigues References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708161719.GB3871@crodrigues.org> In-Reply-To: <20060708161719.GB3871@crodrigues.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 17:38:46 -0000 Craig Rodrigues wrote: > On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: >> Linux has -t auto; haven't looked at how it works. > > I didn't want to implement -t auto, in > case that would confuse things in case someone gets around > to implementing autofs for FreeBSD, so I just used -t "". Oh, I stupidly assumed "auto" meant something similar to what you were doing :) > >> It appears you just try a series of fs types; can't you read the device >> to infer the filesystem? > > I was thinking of doing something like that. You can basically > get the same info by doing something like: > > file - < /dev/ad0s1e > /dev/stdin: Unix Fast File system (little-endian) > > file - < /dev/ad0s4 > /dev/stdin: SGI XFS filesystem > > > I leaned away from this approach in mount(8) because: > - I didn't want to tie mount(8) to file(1) > - I didn't want to build up a table of known superblocks > inside mount(8) because every time a new filesystem is > added to FreeBSD, mount(8) would need to be updated > > If there was a way, maybe at the GEOM or filesystem level to > "taste" what type of filesystem existed on a device, and/or > have a filesystem advertise what type of superblock it has, > then that would be a nice way to do it, but I couldn't figure > out a way to easily do it. I wouldn't expect a program like mount to fork+exec file; I'd expect it to either read directly or use a kernel facility. Sounds like something is missing to do this right. Sam From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 17:40:07 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBE1416A4E1 for ; Sat, 8 Jul 2006 17:40:07 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB4C043D46 for ; Sat, 8 Jul 2006 17:40:04 +0000 (GMT) (envelope-from freebsd-arch@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1FzGmg-0005iF-TK for freebsd-arch@freebsd.org; Sat, 08 Jul 2006 19:40:02 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jul 2006 19:40:02 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jul 2006 19:40:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Ivan Voras Date: Sat, 08 Jul 2006 19:37:08 +0200 Lines: 29 Message-ID: References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708161719.GB3871@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050921) X-Accept-Language: en-us, en In-Reply-To: <20060708161719.GB3871@crodrigues.org> Sender: news Cc: freebsd-current@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 17:40:08 -0000 Craig Rodrigues wrote: > - I didn't want to build up a table of known superblocks > inside mount(8) because every time a new filesystem is > added to FreeBSD, mount(8) would need to be updated There's a similar (in the basic idea, not in details) request on freebsd-geom list - how to detect what GEOM class is set up in an arbitrary provider. That is similar to this thread because both are discussing information that is available on-disk and usable by core system utilities (mount and installer) - so maybe a new library is in order, which will enable users to detect what is on a particular device/parition/provider/etc from on the device. In case of GEOM classes, metadata is written on the last sector, and first few fields ("signature fields") are in common format for all classes, so it's easy to get what class "owns" the device without going into the details of its metadata. Something like: struct devcontentinfo* get_provider_info(char *device_name); where returned value will be an array of found "contents", with a "type" member (enum) describing what it is (GEOM class / file system / swap), a "name" member which holds the ASCII name of the found thing ("UFS", "GEOM_MIRROR"), and an additional "extended_name" which would contain details ("UFSv2", "GEOM_MIRRORv4"). For these examples instead of "extended_name" maybe a version field will be enough ("v4" for GEOM_MIRROR stands for fourth metadata layout version). From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 17:46:16 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A917816A4DA; Sat, 8 Jul 2006 17:46:16 +0000 (UTC) (envelope-from SRS0+45c17c628dd323489a6d+1049+infradead.org+hch@pentafluge.srs.infradead.org) Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4953443D46; Sat, 8 Jul 2006 17:46:15 +0000 (GMT) (envelope-from SRS0+45c17c628dd323489a6d+1049+infradead.org+hch@pentafluge.srs.infradead.org) Received: from hch by pentafluge.infradead.org with local (Exim 4.62 #1 (Red Hat Linux)) id 1FzGsY-0007nh-8M; Sat, 08 Jul 2006 18:46:06 +0100 Date: Sat, 8 Jul 2006 18:46:06 +0100 From: Christoph Hellwig To: Sam Leffler Message-ID: <20060708174606.GA29602@infradead.org> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44AFD7DF.8090002@errno.com> User-Agent: Mutt/1.4.2.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Cc: Craig Rodrigues , freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 17:46:16 -0000 On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: > Linux has -t auto; haven't looked at how it works. It's implemented in mount(8). It has a table of magic numbers and offsets and tries all of them in a well defined order. If everything fails it tries a few heuristics whether the filesystems might be a FAT filesystem as thos don't have magic numbers. From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 18:58:34 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5279F16A4DD; Sat, 8 Jul 2006 18:58:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id B75BB43D45; Sat, 8 Jul 2006 18:58:31 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k68IwIUA035170; Sat, 8 Jul 2006 12:58:23 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <44B00011.9050902@samsco.org> Date: Sat, 08 Jul 2006 12:57:21 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Craig Rodrigues References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708161719.GB3871@crodrigues.org> In-Reply-To: <20060708161719.GB3871@crodrigues.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 18:58:34 -0000 Craig Rodrigues wrote: > On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: > >>Linux has -t auto; haven't looked at how it works. > > > I didn't want to implement -t auto, in > case that would confuse things in case someone gets around > to implementing autofs for FreeBSD, so I just used -t "". > > >>It appears you just try a series of fs types; can't you read the device >>to infer the filesystem? > > > I was thinking of doing something like that. You can basically > get the same info by doing something like: > > file - < /dev/ad0s1e > /dev/stdin: Unix Fast File system (little-endian) > > file - < /dev/ad0s4 > /dev/stdin: SGI XFS filesystem > > > I leaned away from this approach in mount(8) because: > - I didn't want to tie mount(8) to file(1) > - I didn't want to build up a table of known superblocks > inside mount(8) because every time a new filesystem is > added to FreeBSD, mount(8) would need to be updated > > If there was a way, maybe at the GEOM or filesystem level to > "taste" what type of filesystem existed on a device, and/or > have a filesystem advertise what type of superblock it has, > then that would be a nice way to do it, but I couldn't figure > out a way to easily do it. > > Well, by running through a list of possible filesystems and trying each one, you are effectively 'tasting' them. In a brute force way, but still the exact same idea. But really, it's not like filesystems are sprouting up every day, so I don't see the need to spend a lot of time making this elegant and highly extensible. Scott From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 21:56:48 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2A4B16A4DD; Sat, 8 Jul 2006 21:56:47 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 604A543D55; Sat, 8 Jul 2006 21:56:41 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1B58D51393; Sat, 8 Jul 2006 23:56:39 +0200 (CEST) Received: from localhost (dlr167.neoplus.adsl.tpnet.pl [83.24.47.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 97A2951394; Sat, 8 Jul 2006 23:56:32 +0200 (CEST) Date: Sat, 8 Jul 2006 23:53:21 +0200 From: Pawel Jakub Dawidek To: Scott Long Message-ID: <20060708215321.GJ16201@garage.freebsd.pl> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708161719.GB3871@crodrigues.org> <44B00011.9050902@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Swj79WlilW4BQYVz" Content-Disposition: inline In-Reply-To: <44B00011.9050902@samsco.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Craig Rodrigues , freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 21:56:48 -0000 --Swj79WlilW4BQYVz Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 08, 2006 at 12:57:21PM -0600, Scott Long wrote: > Craig Rodrigues wrote: >=20 > >On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: > >>Linux has -t auto; haven't looked at how it works. > >I didn't want to implement -t auto, in > >case that would confuse things in case someone gets around > >to implementing autofs for FreeBSD, so I just used -t "". > >>It appears you just try a series of fs types; can't you read the device > >>to infer the filesystem? > >I was thinking of doing something like that. You can basically > >get the same info by doing something like: > >file - < /dev/ad0s1e > >/dev/stdin: Unix Fast File system (little-endian) > >file - < /dev/ad0s4 > >/dev/stdin: SGI XFS filesystem > >I leaned away from this approach in mount(8) because: > >- I didn't want to tie mount(8) to file(1) > >- I didn't want to build up a table of known superblocks > > inside mount(8) because every time a new filesystem is > > added to FreeBSD, mount(8) would need to be updated > >If there was a way, maybe at the GEOM or filesystem level to > >"taste" what type of filesystem existed on a device, and/or > >have a filesystem advertise what type of superblock it has, > >then that would be a nice way to do it, but I couldn't figure > >out a way to easily do it. >=20 > Well, by running through a list of possible filesystems and trying > each one, you are effectively 'tasting' them. In a brute force way, > but still the exact same idea. [...] One thing I don't like about this idea, is that simple mount(8) command will load all file system kernel modules if we give for example device with no file system on it. Currently I think there is no way to tell from userland mount(8) that because of our call, the kernel has loaded file system module. We could load it from mount(8) instead of waiting for the kernel to do it and then unload if we don't such such file system on the given device... > [...] But really, it's not like filesystems > are sprouting up every day, so I don't see the need to spend a lot of > time making this elegant and highly extensible. What Craig was trying to do over the last few weeks/months was to remove file systems specific code out of mount(8), so this will be a step backwards, I think... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Swj79WlilW4BQYVz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEsClRForvXbEpPzQRAoV3AKDmDsSBmqUrx3XTAaQVPvQFdmlcNACfXCbJ smXjBDifzfy6uvxbTc+12+E= =K68X -----END PGP SIGNATURE----- --Swj79WlilW4BQYVz-- From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 22:32:09 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCFDC16A4DA; Sat, 8 Jul 2006 22:32:09 +0000 (UTC) (envelope-from john@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6137C43D45; Sat, 8 Jul 2006 22:32:09 +0000 (GMT) (envelope-from john@jnielsen.net) Received: from ns1.jnielsen.net (jn@ns1 [69.55.238.237]) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id k68MW7dd009209; Sat, 8 Jul 2006 15:32:07 -0700 (PDT) (envelope-from john@jnielsen.net) Received: (from www@localhost) by ns1.jnielsen.net (8.12.9p2/8.12.9/Submit) id k68MW7Lm009208; Sat, 8 Jul 2006 18:32:07 -0400 (EDT) (envelope-from john@jnielsen.net) X-Authentication-Warning: ns1.jnielsen.net: www set sender to john@jnielsen.net using -f Received: from h35.242.140.67.ip.alltel.net (h35.242.140.67.ip.alltel.net [67.140.242.35]) by newwebmail.jnielsen.net (Horde MIME library) with HTTP; Sat, 08 Jul 2006 18:32:07 -0400 Message-ID: <20060708183207.fp6bvcl40k0wow4w@newwebmail.jnielsen.net> Date: Sat, 08 Jul 2006 18:32:07 -0400 From: John Nielsen To: Craig Rodrigues References: <20060708152801.GA3671@crodrigues.org> <86ac7krtu1.fsf@xps.des.no> In-Reply-To: <86ac7krtu1.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.0.4) / FreeBSD-4.9 X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on ns1.jnielsen.net X-Virus-Status: Clean Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 22:32:09 -0000 Quoting Dag-Erling Sm=F8rgrav : > Craig Rodrigues writes: >> I've come up with a patch that does this, by interpreting >> an fstype of "" as: >> - starting with "ufs", iterate over all the local filesystem types >> that we know about, and try to mount the device > > What about cases where there may be several matching file systems? > For instance, a clean ext3 file system is also a valid ext2 file > system (and vice versa). I've also seen cases where a partition is formatted FAT32, then newfs'ed [ufs] under FreeBSD, but still mount-able as FAT32. (Windows will in fact automount such partitions even if the partition type is 165. grr..) JN