Your message dated Sun, 5 Jun 2005 08:46:31 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Fwd: Fixed in upload of postgresql-common 13 to experimental
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 1 Jun 2005 18:17:34 +0000
>From [EMAIL PROTECTED] Wed Jun 01 11:17:34 2005
Return-path: <[EMAIL PROTECTED]>
Received: from smtp9.wanadoo.fr [193.252.22.22] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DdXmX-0003jQ-00; Wed, 01 Jun 2005 11:17:33 -0700
Received: from me-wanadoo.net (localhost [127.0.0.1])
        by mwinf0904.wanadoo.fr (SMTP Server) with ESMTP id 6DF63240016A
        for <[EMAIL PROTECTED]>; Wed,  1 Jun 2005 20:17:02 +0200 (CEST)
Received: from argos.server.maison 
(AToulouse-152-1-32-226.w82-125.abo.wanadoo.fr [82.125.30.226])
        by mwinf0904.wanadoo.fr (SMTP Server) with ESMTP id 1C31D2400149;
        Wed,  1 Jun 2005 20:17:02 +0200 (CEST)
X-ME-UUID: [EMAIL PROTECTED]
Received: from prahal by argos.server.maison with local (Exim 4.50)
        id 1DdXm3-00045n-5c; Wed, 01 Jun 2005 20:17:03 +0200
Date: Wed, 1 Jun 2005 20:17:03 +0200
From: [EMAIL PROTECTED]
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: postgresql-7.4: changing postgres uid breaks pg_ctrcluster
Message-ID: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.12
Sender: [EMAIL PROTECTED]
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.4 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        NO_REAL_NAME autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: postgresql-7.4
Version: 1:7.4.8-4
Severity: normal


pg_ctrlcluster get the postmaster uid and gid from the cluster.
It was 31:32 when i created it.

I had deleted and recreated the postgres account to update it
(you removed its shell and maybe other things so not to miss any
part i used the postinst adduser command to recreate it).
The new uid/gid where (fake ones) 122:122.

Thus running the postgresql-7.4 init script fired pg_ctrcluster
which retrieved the old uid/gid from the cluster (31:32) and
changed the process uid/gid to match the cluster one before
calling pg_ctl. 
pg_ctl was running with an inexistant account. This leads to this
error:

 * Starting PostgreSQL 7.4 database server: main
/usr/lib/postgresql/7.4/bin/pg_id: Success
/usr/lib/postgresql/7.4/bin/pg_ctl: line 114: [: -eq: unary operator expected


the problem is that in pg_id code, l.105:
        if (!pw)
        {
                perror(argv[0]);
                exit(1);
        }

perror returns pg_id program name and success as (!pw) is true
and no other errors happened.

And in pg_ctl , l.114 :
if [ `$PGPATH/pg_id -u` -eq 0 ]
then
    echo "$CMDNAME: cannot be run as root" 1>&2
(...)


here `$PGPATH/pg_id -u` is not a integer anymore but ".../pg_id:
Success".


A quick hack to let it work would be to use:
if $PGPATH/pg_id -u;
then
    echo "$CMDNAME: cannot be run as root" 1>&2

though it would be better if it errors in case the cluster is in
fact owned by "no account". I though about:

uid=$( $PGPATH/pg_id -u 2>/dev/null);
$status=$?

if [ $status -eq 0 ]
then
    if [ $uid -eq 0 ];
    then
      echo "$CMDNAME: cannot be run as root" 1>&2
      (...)
      exit 1
    fi
else
  echo "This user does not exists . You may have changed the uid
of the account used to create this database cluster. You should
dump, drop and reinit a the cluster."
fi



This is a matter of talks as i wonder if pg_id should not return
the uid even if the account does not exists. 
  uid=31(invalid user) 
and let us manage the error in pg_ctl as we wish.


Maybe all this is too much for a special case which may not
appear often as the problem never arise as far as i searched for
this error. Please close this bug if you think so.

Regards
Alban




-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc5usb-serial
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages postgresql-7.4 depends on:
ii  libc6               2.3.5-1              GNU C Library: Shared libraries an
ii  libcomerr2          1.37+1.38-WIP-0509-1 common error description library
ii  libkrb53            1.3.6-3              MIT Kerberos runtime libraries
ii  libpam0g            0.76-22              Pluggable Authentication Modules l
ii  libpq3              1:7.4.8-4            PostgreSQL C client library
ii  libreadline4        4.3-15               GNU readline and history libraries
ii  libssl0.9.7         0.9.7g-1             SSL shared libraries
ii  postgresql-client-7 1:7.4.8-4            front-end programs for PostgreSQL 
ii  postgresql-common   12                   manager for PostgreSQL database cl
ii  zlib1g              1:1.2.2-4            compression library - runtime

-- no debconf information


---------------------------------------
Received: (at 311546-done) by bugs.debian.org; 5 Jun 2005 06:47:02 +0000
>From [EMAIL PROTECTED] Sat Jun 04 23:47:02 2005
Return-path: <[EMAIL PROTECTED]>
Received: from box79162.elkhouse.de [213.9.79.162] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DeouU-00043P-00; Sat, 04 Jun 2005 23:47:02 -0700
Received: from martin by box79162.elkhouse.de with local (Exim 4.50)
        id 1Deotz-0001hi-D9
        for [EMAIL PROTECTED]; Sun, 05 Jun 2005 08:46:31 +0200
Date: Sun, 5 Jun 2005 08:46:31 +0200
From: Martin Pitt <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Fwd: Fixed in upload of postgresql-common 13 to experimental
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,VALID_BTS_CONTROL 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 


--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

This bug only affected experimental, thus can be closed now.

Martin

----- Forwarded message from Martin Pitt <[EMAIL PROTECTED]> -----

=46rom: Martin Pitt <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: Martin Pitt <[EMAIL PROTECTED]>
Subject: Fixed in upload of postgresql-common 13 to experimental
Date: Sat, 04 Jun 2005 10:02:24 -0400
X-Spam-Status: No, score=3D0.0 required=3D4.0 tests=3DAWL,BAYES_50 autolear=
n=3Dno=20
        version=3D3.0.3

tag 311546 + fixed-in-experimental

quit

This message was generated automatically in response to an
upload to the experimental distribution.  The .changes file follows.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat,  4 Jun 2005 15:44:40 +0200
Source: postgresql-common
Binary: postgresql-common
Architecture: source all
Version: 13
Distribution: experimental
Urgency: low
Maintainer: Martin Pitt <[EMAIL PROTECTED]>
Changed-By: Martin Pitt <[EMAIL PROTECTED]>
Description:=20
 postgresql-common - manager for PostgreSQL database clusters
Closes: 311546
Changes:=20
 postgresql-common (13) experimental; urgency=3Dlow
 .
   * pg_createcluster: Add option --start to start the new cluster right af=
ter
     creating it.
   * tests/000_existing_clusters: Check for stale postmaster and pg_autovac=
uum
     processes.
   * testsuite:
     - Temporarily stop existing servers and move away existing files before
       executing the tests.
     - Restore the original files after the tests.
   * pg_upgradecluster: Check return value of pg_dumpall and psql and fail =
if
     they are not successful.
   * pg_createuser: Fix indentation of socket warning.
   * pg_upgradecluster: Check if cluster is running, exit with an error if =
not.
   * pg_createcluster: Added option --encoding to override detection from
     locale.
   * pg_createcluster: Guess default encoding from locale for clusters older
     than 8.0 to get the same behaviour as for 8.0.
   * debian/control: Conflict to postgresql-7.4 << 1:7.4.8-5 since earlier
     versions do not support non-ASCII encodings (due to missing pg_encodin=
g).
   * pg_ctlcluster: Check that the cluster owner uid/gid really exist.
     Closes: #311546
   * pg_lsclusters: Ensure that there is at least one space between the col=
ums.
   * Added tests/100_encodings which checks cluster creation and updates
     for different encodings and locales.
   * pg_upgradecluster: Preserve socket directory, locales, and encoding.
   * tests/100_encodings: Check the locale the postmaster is running under.
Files:=20
 86ebd694a6257a31ced7c31db169289b 578 misc optional postgresql-common_13.dsc
 e8ea98cd41888e447faec100281141dd 36281 misc optional postgresql-common_13.=
tar.gz
 970747dd59d8aee7c0ff846684ec78ac 49638 misc optional postgresql-common_13_=
all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCobFrDecnbV4Fd/IRAuV1AJ9ERZBbwqLz4nU/agSWEnI24IoiWwCgxnzX
ochtarpGB2gb9IpBMDuxYCQ=3D
=3DYcJ0
-----END PGP SIGNATURE-----


----- End forwarded message -----

--=20
Martin Pitt              http://www.piware.de
Ubuntu Developer   http://www.ubuntulinux.org
Debian Developer        http://www.debian.org

--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCop/HDecnbV4Fd/IRAuTfAJ0SAsAe3/atQ6NG30NxV89PtAgxlQCff3Vm
AZGSI/U4ZM7+br41XC/rcsw=
=iEW0
-----END PGP SIGNATURE-----

--RnlQjJ0d97Da+TV1--


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to