URL:
https://github.com/SSSD/sssd/pull/174
Title: #174: One certificate for multiple users
jhrozek commented:
"""
Thank you for the new version, infortunately now I'm seeing a crash when I list two
users who have the same certificate. This is the backtrace:
````
Program received signal SIGSEGV, Segmentation fault.
ldb_msg_find_element (msg=0x0, attr_name=0x7f0ab99a6b87 "objectClass") at
../common/ldb_msg.c:51
51 for (i=0;i<msg->num_elements;i++) {
(gdb) bt
#0 ldb_msg_find_element (msg=0x0, attr_name=0x7f0ab99a6b87 "objectClass") at
../common/ldb_msg.c:51
#1 0x00007f0ac16557e9 in ldb_msg_find_ldb_val (msg=<optimized out>,
attr_name=<optimized out>)
at ../common/ldb_msg.c:399
#2 0x00007f0ac1655cc9 in ldb_msg_find_attr_as_string (msg=<optimized out>,
attr_name=<optimized out>,
default_value=0x0) at ../common/ldb_msg.c:584
#3 0x00007f0ab99577cb in ipa_id_get_account_info_orig_done (subreq=0x0) at
/sssd/src/providers/ipa/ipa_id.c:759
#4 0x00007f0ab8deada0 in sdap_handle_acct_req_done (subreq=0x0) at
/sssd/src/providers/ldap/ldap_id.c:1614
#5 0x00007f0ab8de894f in users_get_done (subreq=0x0) at
/sssd/src/providers/ldap/ldap_id.c:596
#6 0x00007f0ab8e0b359 in sdap_get_users_done (subreq=0x7c7950) at
/sssd/src/providers/ldap/sdap_async_users.c:955
#7 0x00007f0ab8e0ae00 in sdap_search_user_process (subreq=0x0) at
/sssd/src/providers/ldap/sdap_async_users.c:815
#8 0x00007f0ab8e04928 in generic_ext_search_handler (subreq=0x0, opts=0x76b5f0)
at /sssd/src/providers/ldap/sdap_async.c:1689
#9 0x00007f0ab8e04c86 in sdap_get_and_parse_generic_done (subreq=0x7caf50)
at /sssd/src/providers/ldap/sdap_async.c:1797
#10 0x00007f0ab8e043fb in sdap_get_generic_op_finished (op=0x777510, reply=0x790a30,
error=0, pvt=0x7caf50)
at /sssd/src/providers/ldap/sdap_async.c:1579
#11 0x00007f0ab8e00618 in sdap_process_message (ev=0x736c30, sh=0x780bb0, msg=0x7aa2c0)
at /sssd/src/providers/ldap/sdap_async.c:353
#12 0x00007f0ab8e00197 in sdap_process_result (ev=0x736c30, pvt=0x780bb0)
at /sssd/src/providers/ldap/sdap_async.c:197
#13 0x00007f0ab8dffe5a in sdap_ldap_next_result (ev=0x736c30, te=0x7904b0, tv=...,
pvt=0x780bb0)
at /sssd/src/providers/ldap/sdap_async.c:145
#14 0x00007f0abdf52500 in tevent_common_loop_timer_delay (ev=ev@entry=0x736c30) at
../tevent_timed.c:341
#15 0x00007f0abdf53519 in epoll_event_loop_once (ev=0x736c30, location=<optimized
out>) at ../tevent_epoll.c:915
#16 0x00007f0abdf51c07 in std_event_loop_once (ev=0x736c30, location=0x7f0ac1d1226d
"/sssd/src/util/server.c:718")
at ../tevent_standard.c:114
#17 0x00007f0abdf4dabd in _tevent_loop_once (ev=ev@entry=0x736c30,
location=location@entry=0x7f0ac1d1226d "/sssd/src/util/server.c:718") at
../tevent.c:680
#18 0x00007f0abdf4dceb in tevent_common_loop_wait (ev=0x736c30,
location=0x7f0ac1d1226d "/sssd/src/util/server.c:718") at ../tevent.c:803
#19 0x00007f0abdf51ba7 in std_event_loop_wait (ev=0x736c30, location=0x7f0ac1d1226d
"/sssd/src/util/server.c:718")
at ../tevent_standard.c:145
#20 0x00007f0ac1ceb3cb in server_loop (main_ctx=0x7380c0) at /sssd/src/util/server.c:718
#21 0x00000000004093ba in main (argc=8, argv=0x7fff69b11de8) at
/sssd/src/providers/data_provider_be.c:588
(gdb) frame 3
#3 0x00007f0ab99577cb in ipa_id_get_account_info_orig_done (subreq=0x0) at
/sssd/src/providers/ipa/ipa_id.c:759
759 class = ldb_msg_find_attr_as_string(state->obj_msg, SYSDB_OBJECTCLASS,
(gdb) p state->obj_msg
$1 = (struct ldb_message *) 0x0
````
And I ran:
# dbus-send --system --print-reply --dest=org.freedesktop.sssd.infopipe
/org/freedesktop/sssd/infopipe/Users org.freedesktop.sssd.infopipe.Users.ListByCertificate
string:"$(cat cert.pem)" uint32:100
"""
See the full comment at
https://github.com/SSSD/sssd/pull/174#issuecomment-285014108