Bug #12170
closedlibsasl: use prev == NULL in _is_sun_reg()
100%
Description
Suggested in https://code.illumos.org/c/illumos-gate/+/292/1/usr/src/lib/libsasl/lib/common.c#1314
We start walking list with prev set to NULL, therefore we can use this fact to determine if we need to set new list head or to remove element from the middle of the list.
Testing done:
root@beastie:/code/12170# dtrace -n 'pid$target::_is_sun_reg:return {trace(arg1);}' -c '/usr/lib/smtp/sendmail/sendmail -bD -q15m'
dtrace: description 'pid$target::_is_sun_reg:return ' matched 1 probe
CPU ID FUNCTION:NAME
1 60485 _is_sun_reg:return 0
1 60485 _is_sun_reg:return 0
1 60485 _is_sun_reg:return 0
1 60485 _is_sun_reg:return 0
1 60485 _is_sun_reg:return 1
2 60485 _is_sun_reg:return 1
and sending mail with mailx does work (my mail is being handed out to icloud from that host).
Updated by Electric Monk over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 9841a15cbf9e40fb0b20da8312543d7ebd941848
commit 9841a15cbf9e40fb0b20da8312543d7ebd941848 Author: Toomas Soome <tsoome@me.com> Date: 2020-01-20T22:21:25.000Z 12170 libsasl: use prev == NULL in _is_sun_reg() Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Matthias Scheler <mscheler@tintri.com> Approved by: Robert Mustacchi <rm@fingolfin.org>