[Nsspampgsql-devel] error with " DECLARE nss_pgsql_internal_allusers_curs SCROLL CURSOR FOR FOR READ ONLY"

Stephen Gran sgran at debian.org
Sat Apr 14 07:00:37 UTC 2012


This one time, at band camp, Coiby Xu said:
> Hi all,
> 
> I'm using libnss_pgsql module but there's problems with it. If I exute
> "getent passwd", the following messages show
> in /var/lib/pgsql/data/pg_log/postgresql-Sat.log. And the system is still
> using /etc/passwd and /etc/group to authenticate ssh uses.
> 
> ERROR:  syntax error at or near "FOR" at character 61
> > STATEMENT:  DECLARE nss_pgsql_internal_allusers_curs SCROLL CURSOR FOR
> >  FOR READ ONLY
> > ERROR:  current transaction is aborted, commands ignored until end of
> > transaction block
> > STATEMENT:  FETCH FROM nss_pgsql_internal_allusers_curs
> 
> 
> Eveny I modify codes nss-pgsql.conf like:
> 
> > getpwnam        = SELECT login AS
> > username,passwd,gecos,('/var/lib/gforge/chroot/home/users/' || login) AS
> > homedir,shell,uid,gid FROM nss_passwd WHERE login = $1
> 
> to
> 
> > getpwnam        = SELECT  AS
> > ,passwd,gecos,('/var/lib/gforge/chroot/home/users/' || login) AS
> > homedir,shell,uid,gid FROM nss_passwd WHERE login = $1
> 
> The previous error message  would show. I can't figure out why. Can anyone
> give some advice? Thanks!

The cursor declaration is:
    asprintf(&stmt, "DECLARE nss_pgsql_internal_%s_curs SCROLL CURSOR FOR "
                    "%s FOR READ ONLY", what, getcfg(what));

So, you are somehow calling `getent allusers` with no config for that.
This sounds like a config error to me, but I can't tell without seeing
your config.

Cheers,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/nsspampgsql-devel/attachments/20120414/39e5f2a5/attachment.pgp>


More information about the Nsspampgsql-devel mailing list