Date: Thu, 15 Dec 2011 22:06:01 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> Cc: FreeBSD Ports List <freebsd-ports@FreeBSD.org> Subject: Re: Global and User package database Message-ID: <20111215210600.GA61709@azathoth.lan> In-Reply-To: <CAOgwaMvoHakdYpGNhYdswvTb5xnGBWfMmp4hpC9U3he4SYtWEg@mail.gmail.com> References: <CAOgwaMvoHakdYpGNhYdswvTb5xnGBWfMmp4hpC9U3he4SYtWEg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 15, 2011 at 02:10:57PM -0500, Mehmet Erol Sanliturk wrote: > Dear All , >=20 >=20 > In the new PkgNG : >=20 > https://github.com/pkgng/pkgng/blob/master/pkg/add.c >=20 >=20 > the following statement is written : >=20 > if (geteuid() !=3D 0) { > warnx("adding packages can only be done as root"); > return (EX_NOPERM); > } >=20 >=20 > Instead of the above statement , is it possible to use a statement > as follows ( which it may be defined as a function to be called from all > the related > functions / programs ) : >=20 >=20 >=20 > if (geteuid() =3D=3D 0) { >=20 > package_db_path =3D ... global path name ... , etc. ; >=20 >=20 > PKGDB_PLACE =3D PKGDB_DEFAULT ... etc. >=20 >=20 > } else > { >=20 >=20 > package_db_path =3D ... local path name , ie. > in $HOME about user path name ... , etc. ; >=20 > PKGDB_PLACE =3D PKGDB_USER ... etc. >=20 > } >=20 > if (pkgdb_open(&db, PKGDB_PLACE) !=3D EPKG_OK) { > return (EX_IOERR); > } >=20 >=20 > ( Replace PKGDB_PLACE by a suitable name ... ) >=20 >=20 > In that way , it will be possible to install packages into user home > directory , > instead of global package directory . >=20 > For security concerns , user-installed packages will not be usable global= ly > , or > convenient only for the user . >=20 >=20 >=20 > Thank you very much . >=20 > Mehmet Erol Sanliturk This is an interesting idea, but it deserves more thinking about it, becaus= e it could have more impacts. Could you please fill an issue on the github so that we won't forget the id= ea and will be able to discuss it. I don't think we will propose that feature for 1.0 but maybe it could be discussed for 2.0 :) regards, Bapt --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7qYTgACgkQ8kTtMUmk6EyoZwCgufXfYB5wg564BcjVzAlm+E0S rCMAn1IluFDQ0I6HJDJlbL9pWDwE8lDk =ECbh -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111215210600.GA61709>