REP_TEXT_MUSTBEFREED looks like a bad idea, at lest for now: Errors can happen anywhere, and then sr_text is usually set to a string constant. If REP_TEXT_MUSTBEFREED is already set, slapd will then later try to free that constant.
To add this flag, first add result.c:rs_replace_text() or something similar, like rs_replace_entry(). Modify all code which modifies sr_text to use this function/macro, and encourage 3rd party code to do the same.
Also look at code which copies a SlapReply.
Each REP_*_MUSTBEFREED flag and its related data should be managed by a similar function/macro, really.
(I tried to add a comment in Github, but that didn't seem to work, so mailing here instead.)
--On Friday, July 30, 2021 6:28 PM +0200 Hallvard Breien Furuseth h.b.furuseth@usit.uio.no wrote:
(I tried to add a comment in Github, but that didn't seem to work, so mailing here instead.)
We don't use github. I assume you mean the gitlab instance?
What error did you get? Were you logged in?
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
On 30.07.2021 17:39, Quanah Gibson-Mount wrote:
(I tried to add a comment in Github, but that didn't seem to work, so mailing here instead.)
We don't use github. I assume you mean the gitlab instance?
Oops, right.
What error did you get? Were you logged in?
Logged in, but my uio.no-address rather than as hallvard@openldap. Could write a comment, but not click to make something happen with it. Err. Might have been an idea to read the gitlab doc first, instead of trying to act like on github. Nevermind.
--On Friday, July 30, 2021 6:54 PM +0200 Hallvard Breien Furuseth h.b.furuseth@usit.uio.no wrote:
Logged in, but my uio.no-address rather than as hallvard@openldap. Could write a comment, but not click to make something happen with it. Err. Might have been an idea to read the gitlab doc first, instead of trying to act like on github. Nevermind.
Ok. I would note that your @openldap.org address is already tied to your uio.no address, so it's all the same account. ;)
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
Hallvard Breien Furuseth wrote:
REP_TEXT_MUSTBEFREED looks like a bad idea, at lest for now: Errors can happen anywhere, and then sr_text is usually set to a string constant. If REP_TEXT_MUSTBEFREED is already set, slapd will then later try to free that constant.
To add this flag, first add result.c:rs_replace_text() or something similar, like rs_replace_entry(). Modify all code which modifies sr_text to use this function/macro, and encourage 3rd party code to do the same.
Also look at code which copies a SlapReply.
Each REP_*_MUSTBEFREED flag and its related data should be managed by a similar function/macro, really.
Good point. Too much trouble for now, I'm going to revert this.
(I tried to add a comment in Github, but that didn't seem to work, so mailing here instead.)