Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
pam.23706
pam-bsc1177858-dont-free-environment-string.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pam-bsc1177858-dont-free-environment-string.patch of Package pam.23706
Index: Linux-PAM-1.3.0/modules/pam_xauth/pam_xauth.c =================================================================== --- Linux-PAM-1.3.0.orig/modules/pam_xauth/pam_xauth.c +++ Linux-PAM-1.3.0/modules/pam_xauth/pam_xauth.c @@ -697,8 +697,9 @@ pam_sm_open_session (pam_handle_t *pamh, pam_syslog(pamh, LOG_ERR, "can't set environment variable '%s'", xauthority); - putenv (xauthority); /* The environment owns this string now. */ - /* Don't free environment variables nor set them to NULL. */ + if (putenv (xauthority) == 0) /* The environment owns this string now. */ + xauthority = NULL; + /* Don't free environment variables. */ /* set $DISPLAY in pam handle to make su - work */ { @@ -761,7 +762,8 @@ cleanup: unsetenv (XAUTHENV); free(cookiefile); free(cookie); - free(xauthority); + if (xauthority != NULL) /* If it hasn't been successfully passed to putenv() ... */ + free(xauthority); return retval; }
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