From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RKiz4-0005xm-EA for garchives@archives.gentoo.org; Mon, 31 Oct 2011 03:56:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3436721C043 for ; Mon, 31 Oct 2011 03:56:26 +0000 (UTC) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j93C6DDL029926 for ; Mon, 3 Oct 2005 12:06:14 GMT Received: by wproxy.gmail.com with SMTP id i6so140984wra for ; Mon, 03 Oct 2005 05:14:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:x-face:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:sender; b=Uo8j3S9SmQCpHc60qTiaJnp7+I2yScfn2S2Wkgc/Rz2wAlOBun6TPt58SgVE08o+u5CtMu17QXEcu+3FDdsKROxvAuIfFH6a78L4iMhPmVKy8K8/DgEXVaDZhQLpxVW3H+nev1GlJmvOm/eAo0kNx3CzAzpWQCi+rd4FHFHFZ/4= Received: by 10.54.63.13 with SMTP id l13mr753659wra; Mon, 03 Oct 2005 05:14:18 -0700 (PDT) Received: from ?192.168.0.2? ( [151.44.23.224]) by mx.gmail.com with ESMTP id 12sm1948279wrl.2005.10.03.05.14.16; Mon, 03 Oct 2005 05:14:18 -0700 (PDT) From: "Diego 'Flameeyes' =?iso-8859-1?q?Petten=F2?=" To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: user/group manipultaion feedback request. Date: Mon, 3 Oct 2005 14:00:23 +0200 User-Agent: KMail/1.8.91 References: <1128322169.6208.355.camel@thor.tres.org> <200510031204.58995@enterprise.flameeyes.is-a-geek.org> <1128339545.6208.390.camel@thor.tres.org> In-Reply-To: <1128339545.6208.390.camel@thor.tres.org> X-Face: +=-v@W}H`=.Bn2t&97Un7{[.c0aP0"8)JI?7Z?E>l>ZNY|,=?utf-8?q?mL=5C3bs=0A=09xW=23jRz=7CVa=5C?=@NIS3-'W[F.^YLqK=rS:D*Ke`Y5giI@$(xIBQ<0i740;wuI{lYd>>=?utf-8?q?eFVDuAr=0A=09=3Br=5B*=7E/zd=604dEI?= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Message-Id: <200510031400.29672@enterprise.flameeyes.is-a-geek.org> Sender: "=?UTF-8?Q?Diego=20\"Flameeyes\"=20Petten=C3=B2?=" X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id j93C6DDL029926 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: c300319f-67e2-4d5d-885f-e9d578896575 X-Archives-Hash: 108be34e1074267fc65fc9929ebe94bb On Monday 03 October 2005 13:39, Tres Melton wrote: > I've coded the parts that=20 > extract and parse the information from the /etc/{passwd,group} files I think with this you're already out of portability. /etc/passwd structur= e in=20 Linux and FreeBSD is different, and on Darwin the users part is completel= y=20 another story. Take a look to enewuser/enewgroup functions on eutils ecla= ss. > find This is mostly compatible a part a couple of commands (like -printf) and = the=20 fact that it *needs* that you give him a path to work on. > ps This is different from OS to OS, the Linux version is not portable. Have = a=20 look to pgrep, but that's not completely portable, too. > tar As long as you use the basic commands, it should be safe. You cannot igno= re=20 the format of the archive, tho, as just bsdtar and later GNU tars support= =20 that. > gzip ? (or something else to compress things with) That's just the same. > Although Gentoo is my primary goal I want things to work on a > minimal system of any flavor of *nix that has bash. You'll probably have not to use directly the /etc/{passwd,group} files, a= s=20 they are not universal. Every os uses its own ways to access those data, = and=20 things do not get better when adding pam as a variable in all this. Take a look to egetent, egethome functions in eutils and portability ecla= ss if=20 you want to take a look to what is done now. That is still incomplete,=20 though, so you will probably have other things to arrange... You're wellcome to join gentoo-alt mailing list to discuss of portability= in=20 case :) --=20 Diego "Flameeyes" Petten=F2 - http://dev.gentoo.org/~flameeyes/ Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE --=20 gentoo-dev@gentoo.org mailing list