URL:
https://github.com/SSSD/sssd/pull/339
Author: amitkumar50
Title: #339: UTIL: Create custom abort function for talloc_get_type_abort()
Action: opened
PR body:
"""
Bug is about replacing talloc_get_type() with talloc_get_type_abort(const void
*ptr,#type). talloc_get_type_abort() is type safe equivalent of talloc_get_type().
talloc_get_type_abort() calls abort() function is case of type mismatch.
How it will work:
a. Defining a custom abort function sss_talloc_abort(const char *reason) in
src/util/util.c.
b. Setting this custom abort function using void talloc_set_abort_fn(void (abort_fn)(const
char reason)) => talloc_set_abort_fn(sss_talloc_abort);
c. Replacing all occurances of talloc_get_type() with talloc_get_type_abort();
About the Change:
Change will comprise of 3 patches
Patch-1(This Patch): Introduces the new sss_talloc_abort() function, which will be setted
as custom abort function by passing to talloc_set_abort_fn().
Patch-2: When changes are finalized, custom abort function's contents are finalized.
This patch will enable custom abort function wherever required.
Patch-3: When above two patches goes well. This will change all occurences of
talloc_get_type() to talloc_get_type_abort().
Resolves:
https://pagure.io/SSSD/sssd/issue/1149
"""
To pull the PR as Git branch:
git remote add ghsssd
https://github.com/SSSD/sssd
git fetch ghsssd pull/339/head:pr339
git checkout pr339