Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Michael Stapelberg Newsgroups: linux.debian.bugs.dist,linux.debian.maint.python Subject: Bug#869682: [Pkg-freeradius-maintainers] Bug#869682: freeradius: Import ldap module in python_rlm freeradius crash Date: Tue, 25 Jul 2017 18:30:02 +0200 Message-ID: References: X-Original-To: Gabriel Detraz , 869682@bugs.debian.org, debian-python@lists.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Jul 25 16:24:12 2017 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -4.09 Reply-To: Michael Stapelberg , 869682@bugs.debian.org Original-Sender: michael@i3wm.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: Debian FreeRADIUS Packaging Team X-Debian-Pr-Message: followup 869682 X-Debian-Pr-Package: freeradius X-Debian-Pr-Source: freeradius X-Spam-Bayes: score:0.0000 Tokens: new, 49; hammy, 150; neutral, 333; spammy, 0. spammytokens: hammytokens:0.000-+--python27, 0.000-+--python2.7, 0.000-+--systemd, 0.000-+--HX-Google-DKIM-Signature:in-reply-to, 0.000-+--dfsg17 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=i3wm-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=wnkOuSjJWs+b46B/nxZsDWP/VQoRiotdgJfDXT8BOXw=; b=S/UDw5V2RYJgoUemIEs1ILK8I8oRogz83+hyiGtVBasYVlfVcZtHpGTp8BAYqGq/fF 2J8RQm/oyGp4LMI+NSUYUeUGjMeSoEL6jrlNdcEPJ6xCXKjEtMe8yczrexiQCre0D+Ys pYH686MzpBT7kWHkK1AfhF1ZssvSRNmfMsW41Y2TM+EIKnoyJkr081x6hsGww8GdwgME XRhAPMSG1zKbsWO+IuHZYXAPmMTw2Lpynk099Tvwen2jnVOND3Bm7HFOysUra+i64dxB sGLfP3Ca/HxdIu/Js175EbdtwHz5Sl+88lGSxIKhUcA2yNwYWwq0N/kdfsZVLCM2qL1A B0Lw== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=wnkOuSjJWs+b46B/nxZsDWP/VQoRiotdgJfDXT8BOXw=; b=itlQZzAE9S5xbx0E+1y1WpHTjfTNhC9xEja7uzUPgl28qPRCOWlMAVCrwzdGDhJ0pi 0oHx+PmoT0DWHrpO/4OQBPRiHvINkoJNKmdgl4ssOHStHC3jSWl0vDDqhTCqa6GHHoDe 4CGW1u98WaeWyJgPSMIObvLkK2bA+TQT4sK7wbdG9fF5MIKI+WRMG6mrp4D16kvqTWSg rtmcx4eB5EKHcF4i1ToDI2Qsxx2dXGZUXmbimymhbEWTW1WNDu52dRKBTWG5yUVfJqzR BWchF8W9Byk+OPf+iYEve+h5Tg7ThZsAI+la0CKExe03YkjVPWIFy+k6ssjguCGV6fWX Vocw== X-Gm-Message-State: AIVw112ZTMBZUkvPkWfU5MF2jqIbpr5rzVCGJCEXv+jUAnMyXJcgAKpS 3Il//6v35TZqNdYT5odTZXx2N2V7SwXk X-Received: by 10.237.37.70 with SMTP id w6mr7116768qtc.215.1500999655035; Tue, 25 Jul 2017 09:20:55 -0700 (PDT) MIME-Version: 1.0 Sender: robomod@news.nic.it X-Originating-IP: [212.51.156.20] X-Google-Sender-Auth: b-V3hIAVGvx6_54H1q1gLRiD2tQ Content-Type: multipart/alternative; boundary="001a11412b1e3f5f6a055526b703" X-Debian-Message: from BTS X-Mailing-List: archive/latest/1390747 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 283 Organization: linux.* mail to news gateway X-Original-Date: Tue, 25 Jul 2017 18:20:34 +0200 X-Original-Message-ID: X-Original-References: <150099677471.28867.10122994024586702381.reportbug@pea.crans.org> X-Original-Sender: michael@i3wm.org Xref: csiph.com linux.debian.bugs.dist:838384 linux.debian.maint.python:9639 --001a11412b1e3f5f6a055526b703 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [+cc debian-python] Sorry, I have no idea what=E2=80=99s going wrong here or how to fix this. M= aybe the debian-python team can help? On Tue, Jul 25, 2017 at 5:32 PM, Gabriel Detraz wrote: > Package: freeradius > Version: 3.0.12+dfsg-5 > Severity: normal > > Dear Maintainer, > > I think there is a problem with python module of freeradius3, in the > actual build > (Python version: 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 > 20170118]) > > In particular, "import ldap" directive in a python file linked with the > python module > make it crash with this error code when we start freeradius with > freeradius -X in particular : > > Python version: 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 > 20170118] > Failed loading libpython symbols into global symbol table: libpython2.7.s= o: > cannot open shared object file: No such file or directory > python_function_load - Module 'auth3' not found > (/usr/lib/python2.7/dist-packages/_ > ldap.x86_64-linux-gnu.so: undefined symbol: PyExc_SystemError) > python_function_load - Failed to import python function 'auth3.instantiat= e' > > > Here is the auth3.py file : > (very simple for testing purpose) > > # =E2=81=BB*- mode: python; coding: utf-8 -*- > """ > Backend python pour freeradius. > > Ce fichier contient la d=C3=A9finition de plusieurs fonctions d'interface= =C3=A0 > freeradius qui peuvent =C3=AAtre appel=C3=A9es (suivant les configuration= s) =C3=A0 > certains > moment de l'authentification, en WiFi, filaire, ou par les NAS eux-m=C3= =AAmes. > > Inspir=C3=A9s d'autres exemples trouv=C3=A9s ici : > https://github.com/FreeRADIUS/freeradius-server/blob/master/ > src/modules/rlm_python/ > """ > > import netaddr > import radiusd # Module magique freeradius (radiusd.py is dummy) > import ldap > > > Moreover, import ldap doesn't crash in a "normal" ipython shell, so the > problem seems to > be with the build of freeradius python module. > > > *** Reporter, please consider answering these questions, where appropriat= e > *** > > * What led up to the situation? > * What exactly did you do (or not do) that was effective (or > ineffective)? > * What was the outcome of this action? > * What outcome did you expect instead? > > *** End of the template - remove these template lines *** > > > -- System Information: > Debian Release: 9.1 > APT prefers stable > APT policy: (500, 'stable') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core) > Locale: LANG=3Dfr_FR.UTF-8, LC_CTYPE=3Dfr_FR.UTF-8 (charmap=3DUTF-8) (ign= ored: > LC_ALL set to fr_FR.UTF-8), LANGUAGE=3Dfr_FR.UTF-8 (charmap=3DUTF-8) (ign= ored: > LC_ALL set to fr_FR.UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > > Versions of packages freeradius depends on: > ii freeradius-common 3.0.12+dfsg-5 > ii freeradius-config 3.0.12+dfsg-5 > ii libc6 2.24-11+deb9u1 > ii libcap2 1:2.25-1 > ii libfreeradius3 3.0.12+dfsg-5 > ii libgdbm3 1.8.3-14 > ii libpam0g 1.1.8-3.6 > ii libpcre3 2:8.39-3 > ii libperl5.24 5.24.1-3+deb9u1 > ii libpython2.7 2.7.13-2 > ii libreadline7 7.0-3 > ii libsqlite3-0 3.16.2-5 > ii libssl1.1 1.1.0f-3 > ii libtalloc2 2.1.8-1 > ii libwbclient0 2:4.5.8+dfsg-2+deb9u1+b1 > ii lsb-base 9.20161125 > > Versions of packages freeradius recommends: > ii freeradius-utils 3.0.12+dfsg-5 > > Versions of packages freeradius suggests: > pn freeradius-krb5 > pn freeradius-ldap > pn freeradius-mysql > pn freeradius-postgresql > ii snmp 5.7.3+dfsg-1.7 > > -- no debconf information > _______________________________________________ > Pkg-freeradius-maintainers mailing list > Pkg-freeradius-maintainers@lists.alioth.debian.org > https://lists.alioth.debian.org/mailman/listinfo/pkg- > freeradius-maintainers > --=20 Best regards, Michael --001a11412b1e3f5f6a055526b703 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
[+cc debian-python]

Sorry, I have no id= ea what=E2=80=99s going wrong here or how to fix this. Maybe the debian-pyt= hon team can help?

On Tue, Jul 25, 2017 at 5:32 PM, Gabriel Detraz <detraz@crans.= org> wrote:
Package: freera= dius
Version: 3.0.12+dfsg-5
Severity: normal

Dear Maintainer,

I think there is a problem with python module of freeradius3, in the actual= build
(Python version: 2.7.13 (default, Jan 19 2017, 14:48:08)=C2=A0 [GCC 6.3.0 2= 0170118])

In particular, "import ldap" directive in a python file linked wi= th the python module
make it crash with this error code when we start freeradius with freeradius= -X in particular :

Python version: 2.7.13 (default, Jan 19 2017, 14:48:08)=C2=A0 [GCC 6.3.0 20= 170118]
Failed loading libpython symbols into global symbol table: libpython2.7.so= : cannot open shared object file: No such file or directory
python_function_load - Module 'auth3' not found
<type 'exceptions.ImportError'> (/usr/lib/python2.7/dist-packages/_ldap.x86_64-linux-gnu.so: undefined symbol: PyExc= _SystemError)
python_function_load - Failed to import python function 'auth3.instanti= ate'


Here is the auth3.py file :
(very simple for testing purpose)

# =E2=81=BB*- mode: python; coding: utf-8 -*-
"""
Backend python pour freeradius.

Ce fichier contient la d=C3=A9finition de plusieurs fonctions d'interfa= ce =C3=A0
freeradius qui peuvent =C3=AAtre appel=C3=A9es (suivant les configurations)= =C3=A0 certains
moment de l'authentification, en WiFi, filaire, ou par les NAS eux-m=C3= =AAmes.

Inspir=C3=A9s d'autres exemples trouv=C3=A9s ici :
https://github.co= m/FreeRADIUS/freeradius-server/blob/master/src/modules/rlm_python= /
"""

import netaddr
import radiusd # Module magique freeradius (radiusd.py is dummy)
import ldap


Moreover, import ldap doesn't crash in a "normal" ipython she= ll, so the problem seems to
be with the build of freeradius python module.


*** Reporter, please consider answering these questions, where appropriate = ***

=C2=A0 =C2=A0* What led up to the situation?
=C2=A0 =C2=A0* What exactly did you do (or not do) that was effective (or =C2=A0 =C2=A0 =C2=A0ineffective)?
=C2=A0 =C2=A0* What was the outcome of this action?
=C2=A0 =C2=A0* What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 9.1
=C2=A0 APT prefers stable
=C2=A0 APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=3Dfr_FR.UTF-8, LC_CTYPE=3Dfr_FR.UTF-8 (charmap=3DUTF-8) (ignor= ed: LC_ALL set to fr_FR.UTF-8), LANGUAGE=3Dfr_FR.UTF-8 (charmap=3DUTF-8) (i= gnored: LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages freeradius depends on:
ii=C2=A0 freeradius-common=C2=A0 3.0.12+dfsg-5
ii=C2=A0 freeradius-config=C2=A0 3.0.12+dfsg-5
ii=C2=A0 libc6=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2.24-11+deb9= u1
ii=C2=A0 libcap2=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1:2.25-1
ii=C2=A0 libfreeradius3=C2=A0 =C2=A0 =C2=A03.0.12+dfsg-5
ii=C2=A0 libgdbm3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01.8.3-14
ii=C2=A0 libpam0g=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01.1.8-3.6
ii=C2=A0 libpcre3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02:8.39-3
ii=C2=A0 libperl5.24=C2=A0 =C2=A0 =C2=A0 =C2=A0 5.24.1-3+deb9u1
ii=C2=A0 libpython2.7=C2=A0 =C2=A0 =C2=A0 =C2=A02.7.13-2
ii=C2=A0 libreadline7=C2=A0 =C2=A0 =C2=A0 =C2=A07.0-3
ii=C2=A0 libsqlite3-0=C2=A0 =C2=A0 =C2=A0 =C2=A03.16.2-5
ii=C2=A0 libssl1.1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.1.0f-3
ii=C2=A0 libtalloc2=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02.1.8-1
ii=C2=A0 libwbclient0=C2=A0 =C2=A0 =C2=A0 =C2=A02:4.5.8+dfsg-2+deb9u1+b1 ii=C2=A0 lsb-base=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A09.20161125

Versions of packages freeradius recommends:
ii=C2=A0 freeradius-utils=C2=A0 3.0.12+dfsg-5

Versions of packages freeradius suggests:
pn=C2=A0 freeradius-krb5=C2=A0 =C2=A0 =C2=A0 =C2=A0 <none>
pn=C2=A0 freeradius-ldap=C2=A0 =C2=A0 =C2=A0 =C2=A0 <none>
pn=C2=A0 freeradius-mysql=C2=A0 =C2=A0 =C2=A0 =C2=A0<none>
pn=C2=A0 freeradius-postgresql=C2=A0 <none>
ii=C2=A0 snmp=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A05.7.3+dfsg-1.7

-- no debconf information
_______________________________________________
Pkg-freeradius-maintainers mailing list
Pkg-f= reeradius-maintainers@lists.alioth.debian.org
https://lists.alioth.debi= an.org/mailman/listinfo/pkg-freeradius-maintainers



--
Best regards,
Mi= chael
--001a11412b1e3f5f6a055526b703--