Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34517 - sys-auth/pam-pgsql ebuild
Summary: sys-auth/pam-pgsql ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://pgfoundry.org/frs/?group_id=10...
Whiteboard: [sunrise-overlay]
Keywords: EBUILD, InOverlay
: 91585 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-27 07:02 UTC by Alessandro Pisani
Modified: 2010-03-11 14:59 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild (pam_pgsql-0.5.2_p5.ebuild,909 bytes, text/plain)
2003-11-27 07:02 UTC, Alessandro Pisani
Details
pam_pgsql-0.5.2.7.1.ebuild (pam_pgsql-0.5.2.7.1.ebuild,1023 bytes, text/plain)
2004-07-29 16:16 UTC, steveb
Details
pam_pgsql.conf (pam_pgsql.conf,395 bytes, text/plain)
2004-07-29 16:17 UTC, steveb
Details
pam_pgsql-0.6.1.ebuild (pam_pgsql-0.6.1.ebuild,932 bytes, text/plain)
2005-11-21 17:32 UTC, steveb
Details
pam_pgsql-1.0.0.ebuild (pam_pgsql-1.0.0.ebuild,959 bytes, text/plain)
2006-08-11 03:36 UTC, Jakub Moc (RETIRED)
Details
Diff to build pam-pgsql-0.6.3 with recent gcc and postgresql 8.2.x (pam_get_service.c.diff,344 bytes, patch)
2008-01-22 20:00 UTC, Torsten Krah
Details | Diff
pam_pgsql-0.6.4.ebuild (pam-pgsql-0.6.4.ebuild,1.14 KB, text/plain)
2008-11-26 14:22 UTC, Claudinei Matos
Details
pam-pgsql-0.6.4-no_strict_aliasing.patch (pam-pgsql-0.6.4-no_strict_aliasing.patch,679 bytes, patch)
2008-11-26 14:25 UTC, Claudinei Matos
Details | Diff
pam-pgsql-0.6.4-pam_get_service.patch (pam-pgsql-0.6.4-pam_get_service.patch,333 bytes, patch)
2008-11-26 14:27 UTC, Claudinei Matos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Pisani 2003-11-27 07:02:03 UTC
PAM module for authentication with Postgresql
package ported from debian sources, using gentoo's pam_mysql ebuild as model

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Alessandro Pisani 2003-11-27 07:02:46 UTC
Created attachment 21365 [details]
ebuild
Comment 2 Scott Brooks 2003-12-09 09:33:34 UTC
Just for reference sake, you should save the attachment as pam_pgsql-0.5.2_p5.ebuild in order to get the latest code.

Also, I'm not sure if this is the proper place to say this, but I would like to see this ebuild included in gentoo.
Comment 3 Daniel Black (RETIRED) gentoo-dev 2004-04-01 23:02:36 UTC
FYI as mentioned in gentoo-security@g.o (ref http://www.debian.org/security/2004/dsa-469) there is SQL injection bug in this. See Debian sources for patch.
Comment 4 steveb 2004-07-29 16:16:46 UTC
Created attachment 36439 [details]
pam_pgsql-0.5.2.7.1.ebuild

This is the ebuild I did for my own installation. It uses the original 0.5.2
release and the patch for debian sid.
Comment 5 steveb 2004-07-29 16:17:46 UTC
Created attachment 36441 [details]
pam_pgsql.conf

This file goes with the pam_pgsql-0.5.2.7.1.ebuild.
Comment 6 Davin Boling 2005-04-09 06:12:19 UTC
Bug ping. Any update on this into the main tree?
Comment 7 steveb 2005-04-09 06:34:26 UTC
Sorry. I can't tell you why this is not in portage jet and when it will hit portage or if it will ever hit portage.
Comment 8 Cedric Godin 2005-05-16 05:59:29 UTC
any news ?

the project is also on pgfoundry which is (one of) the official site for PostgreSQL-related software :

http://pgfoundry.org/frs/download.php/284/pam-pgsql-1.0.0.tgz

is this tgz compatible with the attached ebuild ?
Comment 9 Cedric Godin 2005-05-16 07:18:43 UTC
oops found the bug: 92659
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-04 07:38:09 UTC
Masatomo, I do not know if you might be interested in this .. there is no way
for me to test this currently ...
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-09-02 16:28:44 UTC
*** Bug 91585 has been marked as a duplicate of this bug. ***
Comment 12 steveb 2005-09-02 18:28:04 UTC
Well... I would love to help to maintain this ebuild, but I am not a Gentoo 
developer. If it is possible to get a developer status, then I would like to 
apply for the position to become a developer. 
 
 
Comment 13 steveb 2005-11-21 17:32:27 UTC
Created attachment 73341 [details]
pam_pgsql-0.6.1.ebuild

This file goes into sys-auth/pam_pgsql
Comment 14 steveb 2005-11-21 17:40:41 UTC
I just updated the pam_pgsql ebuild. It is NOT supported by Gentoo and will 
probably never be in portage. If someone needs PAM support for PostgreSQL, then 
use the sys-auth/libnss-pgsql package from portage. 
Comment 15 Giampaolo Tomassoni 2006-01-31 16:58:26 UTC
(In reply to comment #14)
> I just updated the pam_pgsql ebuild. It is NOT supported by Gentoo and will 
> probably never be in portage. If someone needs PAM support for PostgreSQL, then 
> use the sys-auth/libnss-pgsql package from portage. 

To my knowledge, libnss-pgsql is not a complete replacement: you can't authenticate a user unless encrypting the password field with the same hashing used by pam.

Actually, I do need pam-pgsql on a couple of systems of mines, and I would really appreciate if this package will finally be included among the portage packages.
Comment 16 Torsten Krah 2006-04-15 02:38:33 UTC
pam_pgsql is still needed.
The pgsql from pgfoundry doesn't allow custom queries and uses old configuration style in compare to sourceforge's pam_pgsql.

I need this modul on many systems, especially on mail ones, so libnss-pgsql isnt a full replacement.

kind regards
Comment 17 Giampaolo Tomassoni 2006-06-07 11:58:48 UTC
Any news about this matter?
Comment 18 Torsten Krah 2006-06-07 20:03:31 UTC
What kind of news? Its still needed - or what do you exspect?

kind regards
Comment 19 Giampaolo Tomassoni 2006-06-08 04:48:44 UTC
Well, I was just asking if there is any new about adding it to the portage tree. I see that pam-pgsql-1.0.0 fixes the security problem that was affecting previous versions, so I would wonder if there is any evident reason for pam-pgsql to still be out of the portage tree.
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-06-08 05:32:22 UTC
A modified ebuild for pam_pgsql-0.6.3 in now in our Sunrise Project overlay.

svn co http://overlays.gentoo.org/svn/proj/sunrise

Please, test and enjoy!
Comment 21 Torsten Krah 2006-06-08 08:32:32 UTC
1.0?

0.6.3 is the latest released on http://sourceforge.net/projects/pam-pgsql.

kind regards
Comment 22 Gustavo Felisberto (RETIRED) gentoo-dev 2006-06-08 08:44:15 UTC
The web site for this project moved out of sf.

http://pgfoundry.org/frs/?group_id=1000039
Comment 23 Giampaolo Tomassoni 2006-06-08 08:57:03 UTC
Right, but Jakub is probably right too: the update time of the sf 0.6.3 is more recent than the 1.0.0 from pgf...
Comment 24 Torsten Krah 2006-06-08 09:20:41 UTC
As far as i know, these are 2 different projects - look at pgsql.conf file, 0.6.1> allows you custom queries, 1.0.0 not, may it be?

kind regards

Comment 25 Jakub Moc (RETIRED) gentoo-dev 2006-06-08 09:29:08 UTC
(In reply to comment #24)
> As far as i know, these are 2 different projects - look at pgsql.conf file,
> 0.6.1> allows you custom queries, 1.0.0 not, may it be?

Shrug... :) 

http://pgfoundry.org/frs/shownotes.php?release_id=230

<snip>
Release Name: pam-pgsql 1.0.0

Notes:
Initial Import from http://sourceforge.net/projects/pam-pgsql/

With latest patches on the website applied.  Plus a reconfiguration of the way data is queried.

Protection against SQL injections is in the form of PQexecParams.
</snip>

Anyway, both versions are in overlay now.

http://overlays.gentoo.org/proj/sunrise/browser/sys-auth/pam_pgsql/pam_pgsql-0.6.3.ebuild
http://overlays.gentoo.org/proj/sunrise/browser/sys-auth/pam_pgsql/pam_pgsql-1.0.0.ebuild
Comment 26 Giampaolo Tomassoni 2006-06-09 00:45:50 UTC
Mmmh, donno if it is sane to mix them: 1.0.0 from pgf is dated 2005-05-04, 0.6.3 from sf is dated 2006-05-08. Version 1.0.0 is supposed to be younger then 0.6.3, so...

Ok, two suggestions:

1) Ask to the two project leaders the why and how the split;

2) Look at what other did: what is the package SuSE is adopting, in example?
Comment 27 Jakub Moc (RETIRED) gentoo-dev 2006-06-09 04:00:49 UTC
(In reply to comment #26)
> Mmmh, donno if it is sane to mix them: 1.0.0 from pgf is dated 2005-05-04,
> 0.6.3 from sf is dated 2006-05-08. Version 1.0.0 is supposed to be younger then
> 0.6.3, so...

You won't mix them, they are both the same slot, you need to pick one. Additionally, 0.6.3 is package.masked in the overlay b/c of the possible SQL injection issues. You are also free to not use either of them, they are provided for users' convenience only. ;)
Comment 28 Giampaolo Tomassoni 2006-06-09 06:04:21 UTC
Well, maybe I'm missing something, but it seems to me that the sf 0.6.x version already addresses the security issue. In the debian/changelog file inside the package I read the following:

...omissis...

pam-pgsql (0.6) experimental; urgency=low

  ...omissis...
  * Moved to PQexecParams (obsoletes need for data escaping)
  ...omissis...


Which means to me that the security issue (i.e.: uncomplete escaping of sql paramenters) was resolved.

I have the strong belief that the pgf's package is a port from the sf's 0.5.x version, and the fact that their changelog reports a locally-made adaption to the PQexecParams call in order to circumvent security issues is a proof of this.

Anyhow, I just placed a message on the two projects' forums asking for further infos about the "competing" projects. We will see their replies...

In the meanwhile, I'm personally going to stick with the sf's 0.6.3 version.
Comment 29 Jakub Moc (RETIRED) gentoo-dev 2006-08-11 03:36:10 UTC
Created attachment 93974 [details]
pam_pgsql-1.0.0.ebuild
Comment 30 Torsten Krah 2006-08-11 03:51:11 UTC
The 1.0 ebuild from pgfoundry breaks the old 0.6.1 configuration:

auth_succ_query     - query to be executed after successful authentication
auth_fail_query     - query to be executed after failed authentication

aren't supported - the 0.6.1 already has the injection issues fixed, so i dont see any reason to switch to pgfoundry module which will break things.

kind regards
Comment 31 Giampaolo Tomassoni 2006-08-12 15:20:56 UTC
Torsten's note makes me much more affirmative about the fact we are mixing two branches from different packages.

I urge to stick to the sf one and burn the 1.0's from pgf!
Comment 32 Torsten Krah 2006-08-14 01:35:38 UTC
Yeah we are going to mix them.

I vote for your suggestion - stick with the sf one ( 0.6.3 is latest release afaik) and  burn the 1.0 from pgf. 
Comment 33 Jan Pobrislo 2008-01-16 18:55:18 UTC
The sourceforge page now uses name libpam-pgsql. What about having two different packages that block each other? Like libpam-pgsql and pam-pgsql. This way users won't be confused. BTW there's only 1.0 version now on sunrise. 
Comment 34 Giampaolo Tomassoni 2008-01-16 19:08:34 UTC
(In reply to comment #33)
> The sourceforge page now uses name libpam-pgsql. What about having two
> different packages that block each other? Like libpam-pgsql and pam-pgsql.

This is fine to me.
Comment 35 Torsten Krah 2008-01-22 20:00:21 UTC
Created attachment 141596 [details, diff]
Diff to build pam-pgsql-0.6.3 with recent gcc and postgresql 8.2.x

stdlib.h include is missing, NULL is unknown. This patch fixes the build error.
Comment 36 Claudinei Matos 2008-11-26 14:22:33 UTC
Created attachment 173463 [details]
pam_pgsql-0.6.4.ebuild

I did a new ebuild as there's a pam-pgsql 0.6.4 available since 2008-05-24

Also I've did updated ebuild to use postgresql-base.

obs.: this ebuild still need no_strict_antialising and pam_get_service patches.
Comment 37 Claudinei Matos 2008-11-26 14:25:58 UTC
Created attachment 173465 [details, diff]
pam-pgsql-0.6.4-no_strict_aliasing.patch

Little patch to avoid warnings of poor programming practices (it should be fixed by the pam-pgsql developers):
"warning: dereferencing type-punned pointer will break strict-aliasing rules"
Comment 38 Claudinei Matos 2008-11-26 14:27:16 UTC
Created attachment 173467 [details, diff]
pam-pgsql-0.6.4-pam_get_service.patch

pam_get_service.c still missing stdlib.h include reference.
Comment 39 Claudinei Matos 2008-11-26 14:31:47 UTC
I've already posted an updated ebuild to 0.6.4 version.

Any new about when will it hit portage tree? I'm OK having my own layman repository at my network but it should be great if this package get in portage tree.
Comment 40 Claudinei Matos 2008-11-26 14:44:40 UTC
As this ebuild uses postgresql-base, if the system where this library is installed also have libnss-pgsql installed, it may be needed to update libnss-pgsql to use postgresql-base as well.

(In reply to comment #36)
> Created an attachment (id=173463) [edit]
> pam_pgsql-0.6.4.ebuild
> 
> I did a new ebuild as there's a pam-pgsql 0.6.4 available since 2008-05-24
> 
> Also I've did updated ebuild to use postgresql-base.
> 
> obs.: this ebuild still need no_strict_antialising and pam_get_service patches.
> 
Comment 41 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-03-11 13:54:59 UTC
After over six years this bug will finally be closed! :P

I've added pam-pgsql to the tree, but with a snapshot of the current development repository as I've contributed upstream a new buildsystem that works properly.

Please remove the old ebuild from sunrise whenever possible.
Comment 42 steveb 2010-03-11 14:36:10 UTC
(In reply to comment #41)
> After over six years this bug will finally be closed! :P
> 
You are my hero.


> I've added pam-pgsql to the tree, but with a snapshot of the current
> development repository as I've contributed upstream a new buildsystem that
> works properly.
> 
> Please remove the old ebuild from sunrise whenever possible.
> 
Comment 43 Giampaolo Tomassoni 2010-03-11 14:59:46 UTC
Great new! Thanks!