[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#487510: marked as done (python-pam: Example code is incorrect)



Your message dated Thu, 17 Nov 2022 13:49:31 +0000
with message-id <E1ovfGl-008zf7-PE@fasolo.debian.org>
and subject line Bug#487510: fixed in python-pam 0.4.2-16
has caused the Debian Bug report #487510,
regarding python-pam: Example code is incorrect
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
487510: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487510
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python-pam
Version: 0.4.2-10.4
Severity: normal
Tags: patch

The example code examples/pamtest.py is incorrect, it references the
non-existent constants PAM.PAM_PROMPT_ERROR_MSG and PAM.PAM_PROMPT_TEXT_INFO.
The correct names are PAM_ERROR_MSG and PAM_TEXT_INFO, respectively (without
"PROMPT").

While this does not affect the example itself (the if-branch in question never
runs), it causes hard to detect errors in application code that relies on this
wrong example. This "conversation function" seems to somehow run in a plain-C
context, so the usual Python error, "'module' object has no attribute 'foo'"
will not propagate to the user -- who is left scratching his head about
inscrutable "PAM conversation errors".

Since this example file effectively is the only documentation available on the
python-pam module, it would be nice if it were correct. ;-)
The attached patch to fix the documentation is of course trivial, but
might potentially save a lot of bug-hunting.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.9-023stab044.16-enterprise
Locale: LANG=C, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

Versions of packages python-pam depends on:
ii  python                        2.4.4-2    An interactive high-level object-o

python-pam recommends no packages.

-- no debconf information
--- examples/pamtest.py~ 23:08:48.000000000 +0100
+++ examples/pamtest.py 2008-06-22 12:09:03.000000000 +0200
@@ -16,7 +16,7 @@
                elif type == PAM.PAM_PROMPT_ECHO_OFF:
                        val = getpass(query)
                        resp.append((val, 0))
-               elif type == PAM.PAM_PROMPT_ERROR_MSG or type == PAM.PAM_PROMPT_TEXT_INFO:
+               elif type == PAM.PAM_ERROR_MSG or type == PAM.PAM_TEXT_INFO:
                        print query
                        resp.append(('', 0))
                else:


--- End Message ---
--- Begin Message ---
Source: python-pam
Source-Version: 0.4.2-16
Done: Emanuele Rocca <ema@debian.org>

We believe that the bug you reported is fixed in the latest version of
python-pam, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 487510@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Emanuele Rocca <ema@debian.org> (supplier of updated python-pam package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 17 Nov 2022 14:02:44 +0100
Source: python-pam
Architecture: source
Version: 0.4.2-16
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Emanuele Rocca <ema@debian.org>
Closes: 487510 1023902
Changes:
 python-pam (0.4.2-16) unstable; urgency=medium
 .
   * QA upload.
   * Add d/patches/python3.11-ftbfs.patch: use Py_SET_TYPE to fix FTBFS with
     Python 3.11. (Closes: #1023902)
   * Add d/patches/pamtest-python3-port.patch to port pamtest.py to Python 3.
   * Add d/patches/pamtest-fix-constants.patch to fix constant names in
     pamtest.py. Thanks Wolfgang Schnerring! (Closes: #487510)
   * Set debhelper compatibility level to 13.
Checksums-Sha1:
 b155c6d856167d32ac5c223711df82c488f2bfa8 1734 python-pam_0.4.2-16.dsc
 5471dbbf90cfdd5e603705c65fdabb2ec65d7452 5744 python-pam_0.4.2-16.debian.tar.xz
 4a55a933ee37fb36f44cfc371339d182087b7b94 9039 python-pam_0.4.2-16_amd64.buildinfo
Checksums-Sha256:
 1a3ee69f9e5982b239f7356437cbe309606f6e4ccc12c864834ea534024a117d 1734 python-pam_0.4.2-16.dsc
 1940b25f6057e224d1ec84d1edfb817e4aa99a5fca315e734eb3dde94e82bf33 5744 python-pam_0.4.2-16.debian.tar.xz
 648284026c3ff4e68ac4e1c489e960f3d6afeca77319dc3fa4b92bf8fc5c3ea1 9039 python-pam_0.4.2-16_amd64.buildinfo
Files:
 707da826b344200f1de227f5939be3ca 1734 python optional python-pam_0.4.2-16.dsc
 21737976f16d5d706cfd8cd4afe6230c 5744 python optional python-pam_0.4.2-16.debian.tar.xz
 52dec3d902ce6320c89862324228ebf5 9039 python optional python-pam_0.4.2-16_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEElUWWlhkoHBf/rFiR1QhaB1D9t6MFAmN2OK4ACgkQ1QhaB1D9
t6MJpA//SUPgOkuPqm+9p+E0688+vjM6xrnGhA5SFUSe65pZxBQcRK1HncyvVTfb
WJKfJ+3ssZA1SYAGf0Xba65coDA0CbycHH872geuDRQbTydYD5aLBpNgFAFir28l
ZuBloIW4XSOWOj9RwygCzGuuKBPw5wseeDxhTl0bdn0Yi0W4fNggu8krL4Jh/KnD
8LMxHS6VvGY4ih9F5m+9qBkpn2I8jQ7MC13WKJ8SH0uEid2QqD2gbluFk6LlAfBK
VGGdmRZpj/VBUoeKGs2oLQAIe2+VVeA97bDmQ3rZ/c3/c6XXKgnPUpFfIhBlhHb0
pPqepPS3Z6XbHGFO2jWchZ/WcDjYXeg0luHixfY/+EjBYG4i0tWV/rNLQuQDYqhH
2545j/cLNKWjLzDJZbRpDgLNIHaUPp6hY41tHH/E+MHX6h8ihxz01UKa6z51NIH+
LNG6EWX88Z5S6CnhoDXSO4fGZ6wcGR+F20BBPCXFt5isg+1iJnCAGKLCZ07ulEJd
uLc9wwsD0T0yrrmtf1Eu33mXp8CsNv/92jspehHgs3vVQSNjzwA0PvB3eB5RM/SA
o6U8gd9Fed4fyKp5w4Wtz8yAxGj7zA1tA6sMLUJUYsjl/ymchmelxYg8OOPZXrGN
N1hpAboJGbqet3DCyiP8JHOHey/c9G0izWdBUD8dQ9poXjVU5v0=
=91g0
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: