upgrade_db script does not ask for password on MS Windows and fails

Bug #269028 reported by shilbert
2
Affects Status Importance Assigned to Milestone
GNUmed
Fix Released
High
Unassigned

Bug Description

On MS Windows when running the upgrade-db scripts a password is needed to connect to the database. Different from Linux there is an very old python bug that prevents the password to be asked for on MS Windows.

http://mail.python.org/pipermail/python-bugs-list/2002-June/012101.html

The error is triggered by bootstrap_gm_db_system.py on line 181. Supposedly some garbage is in the password buffer , it gets accepted and passed to gmPG2 which will happily refuse it.

Please check if a workaround for MS Windows can be provided like this:

http://ccec.sourceforge.net/getpassfix.html

description: updated
Revision history for this message
shilbert (sebastian-hilbert) wrote :

Actually the error seems to be something else. If I remove the %s , %user on line 181 and provide a simple string like "Please provide your password" it shows a prompt in the shell.

It then has the same problem on line 306 which contains a [%s] as well in a password prompt.

For whatever it is worth.

Revision history for this message
ncq (karsten-hilbert) wrote : Re: [Bug 269028] Re: upgrade_db script does not ask for password on MS Windows and fails

-------- Original-Nachricht --------
> Datum: Thu, 11 Sep 2008 16:17:35 -0000
> Von: shilbert <email address hidden>
> An: <email address hidden>
> Betreff: [Bug 269028] Re: upgrade_db script does not ask for password on MS Windows and fails

> Actually the error seems to be something else. If I remove the %s ,
> %user on line 181 and provide a simple string like "Please provide your
> password" it shows a prompt in the shell.
>
> It then has the same problem on line 306 which contains a [%s] as well
> in a password prompt.
>
> For whatever it is worth.

As a fix try using two statements:

   print "you may now be asked for the password of user %s" % username
   getpass("blah foo:")

Karsten
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx

Revision history for this message
ncq (karsten-hilbert) wrote : Re: [Bug 269028] [NEW] upgrade_db script does not ask for password on MS Windows and fails

On Sat, Oct 04, 2008 at 10:31:03PM +0200, Karsten Hilbert wrote:

> Fixed in CVS.
>
> Backpatched to 0.3.x and 0.2.8.x.
>
> Please test and close.
>
> Karsten
>
> On Thu, Sep 11, 2008 at 03:51:43PM -0000, Hilbert, Sebastian wrote:
> > Subject: [Bug 269028] [NEW] upgrade_db script does not ask for password on MS
> > Windows and fails
> >
> > Public bug reported:
> >
> > On MS Windows when running the upgrade-db scripts a password is needed
> > to connect to the database. Different from Linux there is an very old
> > python bug that prevents the password to be asked for on MS Windows.
> >
> > http://mail.python.org/pipermail/python-bugs-list/2002-June/012101.html
> >
> > The error is triggered by bootstrap_gm_db_system.py on line 181.
> > Supposedly some garbage is in the password buffer , it gets accepted and
> > passed to gmPG2 which will happily refuse it.
> >
> > Please check if a workaround for MS Windows can be provided like this:
> >
> > http://ccec.sourceforge.net/getpassfix.html
> >
> > ** Affects: gnumed
> > Importance: Undecided
> > Status: New
> >
> > ** Description changed:
> >
> > On MS Windows when running the upgrade-db scripts a password is needed
> > to connect to the database. Different from Linux there is an very old
> > python bug that prevents the password to be asked for on MS Windows.
> >
> > http://mail.python.org/pipermail/python-bugs-list/2002-June/012101.html
> >
> > The error is triggered by bootstrap_gm_db_system.py on line 181.
> > Supposedly some garbage is in the password buffer , it gets accepted and
> > passed to gmPG2 which will happily refuse it.
> >
> > - Please check if a workaround for MS Windows can be provided.
> > + Please check if a workaround for MS Windows can be provided like this:
> > +
> > + http://ccec.sourceforge.net/getpassfix.html
> >
> > --
> > upgrade_db script does not ask for password on MS Windows and fails
> > https://bugs.launchpad.net/bugs/269028
> > You received this bug notification because you are a member of GNUmed
> > development, which is subscribed to GNUmed.
> >
> > Status in GNUmed - electronic medical record: New
> >
> > Bug description:
> > On MS Windows when running the upgrade-db scripts a password is needed to connect to the database. Different from Linux there is an very old python bug that prevents the password to be asked for on MS Windows.
> >
> > http://mail.python.org/pipermail/python-bugs-list/2002-June/012101.html
> >
> > The error is triggered by bootstrap_gm_db_system.py on line 181. Supposedly some garbage is in the password buffer , it gets accepted and passed to gmPG2 which will happily refuse it.
> >
> > Please check if a workaround for MS Windows can be provided like this:
> >
> > http://ccec.sourceforge.net/getpassfix.html
>
> --
> GPG key ID E4071346 @ wwwkeys.pgp.net
> E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

Revision history for this message
Jim Busser (jbusser) wrote :

Fixed in CVS. Backpatched to 0.3.x and 0.2.8.x.
http://lists.gnu.org/archive/html/gnumed-devel/2008-10/msg00022.html

Changed in gnumed:
status: New → Fix Committed
ncq (karsten-hilbert)
Changed in gnumed:
importance: Undecided → High
ncq (karsten-hilbert)
Changed in gnumed:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.