Ldap query in FR3

Franks Andy (RLZ) IT Systems Engineer Andy.Franks at sath.nhs.uk
Tue Jul 23 21:08:22 CEST 2013


Thanks Arran, Phil.
But, segv :
(0) files :     expand: "DC=SATH,DC=nhs,DC=uk" -> 'DC=SATH,DC=nhs,DC=uk'
(0) files : Performing search in 'DC=SATH,DC=nhs,DC=uk' with filter
'(&(cn=I made this group
up)(objectClass=Group)(member=CN\3dRSH-AF7\2cOU\3dRSH\2cOU\3dAdministrat
ive\2cOU\3dSATHComputers\2cDC\3dSATH\2cDC\3dnhs\2cDC\3duk))'
(0) files : Waiting for search result...
(0) files : Search returned no results

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1ba333e in rlm_ldap_search (inst=0x8b3bb0, request=0x9abe60,
pconn=0x7fffffffcee8, dn=0x7fffffffc670 "DC=SATH,DC=nhs,DC=uk", scope=2,
    filter=0x7fffffffc260 "(&(cn=I made this group
up)(objectClass=Group)(member=CN\\3dRSH-AF7\\2cOU\\3dRSH\\2cOU\\3dAdmini
strative\\2cOU\\3dSATHComputers\\2cDC\\3dSATH\\2cDC\\3dnhs\\2cDC\\3duk))
", attrs=0x0, result=0x0)
    at src/modules/rlm_ldap/ldap.c:725
725                     *result = our_result;
(gdb) bt
#0  0x00007ffff1ba333e in rlm_ldap_search (inst=0x8b3bb0,
request=0x9abe60, pconn=0x7fffffffcee8, dn=0x7fffffffc670
"DC=SATH,DC=nhs,DC=uk", scope=2,
    filter=0x7fffffffc260 "(&(cn=I made this group
up)(objectClass=Group)(member=CN\\3dRSH-AF7\\2cOU\\3dRSH\\2cOU\\3dAdmini
strative\\2cOU\\3dSATHComputers\\2cDC\\3dSATH\\2cDC\\3dnhs\\2cDC\\3duk))
", attrs=0x0, result=0x0)
    at src/modules/rlm_ldap/ldap.c:725
#1  0x00007ffff1ba752a in rlm_ldap_check_groupobj_dynamic
(inst=0x8b3bb0, request=0x9abe60, pconn=0x7fffffffcee8, check=0x9831f0)
at src/modules/rlm_ldap/groups.c:497
#2  0x00007ffff1b9e5e1 in rlm_ldap_groupcmp (instance=0x8b3bb0,
request=0x9abe60, thing=0x9ac130, check=0x9831f0, check_pairs=0x9831f0,
reply_pairs=0x9ac050) at src/modules/rlm_ldap/rlm_ldap.c:414
#3  0x00007ffff7589036 in radius_callback_compare (req=0x9abe60,
request=0x9ac130, check=0x9831f0, check_pairs=0x9831f0,
reply_pairs=0x9ac050) at src/main/valuepair.c:334
#4  0x00007ffff7589484 in paircompare (request=0x9abe60,
req_list=0x9ac130, check=0x9831f0, rep_list=0x9ac050) at
src/main/valuepair.c:587
#5  0x00007fffee8c8bfc in file_common (inst=0x982750, request=0x9abe60,
filename=0x7fffee8c96f0 "users", ht=0x983150, request_pairs=0x9ac130,
reply_pairs=0x9ac050) at src/modules/rlm_files/rlm_files.c:433
#6  0x00007fffee8c8e12 in mod_authorize (instance=0x982750,
request=0x9abe60) at src/modules/rlm_files/rlm_files.c:480
#7  0x0000000000423506 in call_modsingle (component=1, sp=0x992a90,
request=0x9abe60) at src/main/modcall.c:311
#8  0x0000000000424e0b in modcall (component=1, c=0x991270,
request=0x9abe60) at src/main/modcall.c:796
#9  0x00000000004210ba in indexed_modcall (comp=1, idx=0,
request=0x9abe60) at src/main/modules.c:790
#10 0x0000000000422dfa in process_authorize (autz_type=0,
request=0x9abe60) at src/main/modules.c:1672
#11 0x000000000040cf92 in rad_authenticate (request=0x9abe60) at
src/main/auth.c:409
#12 0x0000000000432ce6 in request_running (request=0x9abe60, action=1)
at src/main/process.c:1185
#13 0x0000000000431f40 in request_queue_or_run (request=0x9abe60,
process=0x432c1c <request_running>) at src/main/process.c:828
#14 0x00000000004333b0 in request_receive (listener=0x9aaa80,
packet=0x9abc50, client=0x861fd0, fun=0x40cdc2 <rad_authenticate>) at
src/main/process.c:1377
#15 0x0000000000414a45 in auth_socket_recv (listener=0x9aaa80) at
src/main/listen.c:1449
#16 0x00000000004393e4 in event_socket_handler (xel=0x994be0, fd=30,
ctx=0x9aaa80) at src/main/process.c:3484
#17 0x00007ffff736944e in fr_event_loop (el=0x994be0) at
src/lib/event.c:415
#18 0x000000000043a711 in radius_event_process () at
src/main/process.c:4273
#19 0x00000000004283f9 in main (argc=2, argv=0x7fffffffe678) at
src/main/radiusd.c:474
(gdb)

Sorry !
Andy

-----Original Message-----
From:
freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradius.org
[mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradiu
s.org] On Behalf Of Arran Cudbard-Bell
Sent: 23 July 2013 18:22
To: FreeRadius users mailing list
Subject: Re: Ldap query in FR3


On 23 Jul 2013, at 17:52, Phil Mayers <p.mayers at imperial.ac.uk> wrote:

> On 23/07/13 17:19, Franks Andy (RLZ) IT Systems Engineer wrote:
>> This will probably be obvious, but I can't see it!
> 
> Looks like a bug - the code here:
> 
>
https://github.com/FreeRADIUS/freeradius-server/blob/master/src/modules/
rlm_ldap/groups.c#L495
> 
> ...passes NULL for the "result" argument to rlm_ldap_search, which
means this code:
> 
>
https://github.com/FreeRADIUS/freeradius-server/blob/master/src/modules/
rlm_ldap/ldap.c#L679
> 
> ...doesn't get run, so 0 results is "ok".

Nice catch. Fixed.

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list