Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
sudo
sudo-1.8.20p2-sssd-ipa_hostname.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sudo-1.8.20p2-sssd-ipa_hostname.patch of Package sudo
# HG changeset patch # User Todd C. Miller <Todd.Miller@sudo.ws> # Date 1511893724 25200 # Node ID 14dacdea331942a38d443a75d1b08f67eafaa5eb # Parent b456101fe5091540e9f6429db7568fa32b6d4da8 Avoid a double free when ipa_hostname is set in sssd.conf and it is an unqualified host name. From Daniel Kopecek. Also move the "unable to allocate memory" warning into get_ipa_hostname() itself to make it easier to see where the allocation failed in the debug log. Index: sudo-1.8.20p2/plugins/sudoers/sssd.c =================================================================== --- sudo-1.8.20p2.orig/plugins/sudoers/sssd.c +++ sudo-1.8.20p2/plugins/sudoers/sssd.c @@ -349,6 +349,8 @@ get_ipa_hostname(char **shostp, char **l *lhostp = lhost; ret = true; } else { + sudo_warnx(U_("%s: %s"), __func__, + U_("unable to allocate memory")); free(shost); free(lhost); ret = -1; @@ -456,7 +458,6 @@ sudo_sss_open(struct sudo_nss *nss) */ if (strcmp(user_runhost, user_host) == 0) { if (get_ipa_hostname(&handle->ipa_shost, &handle->ipa_host) == -1) { - sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); free(handle); debug_return_int(ENOMEM); } @@ -478,7 +479,8 @@ sudo_sss_close(struct sudo_nss *nss) handle = nss->handle; sudo_dso_unload(handle->ssslib); free(handle->ipa_host); - free(handle->ipa_shost); + if (handle->ipa_host != handle->ipa_shost) + free(handle->ipa_shost); free(handle); nss->handle = NULL; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor