Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:B
systemd
Correct_assert_on_unexpected_error_code.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Correct_assert_on_unexpected_error_code.patch of Package systemd
--- src/login/pam-module.c | 6 +++++- src/shared/util.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) --- src/login/pam-module.c +++ src/login/pam-module.c 2015-07-29 08:52:20.762018565 +0000 @@ -503,7 +503,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess r = pam_set_data(handle, "systemd.session-fd", INT_TO_PTR(session_fd+1), NULL); if (r != PAM_SUCCESS) { pam_syslog(handle, LOG_ERR, "Failed to install session fd."); - close_nointr_nofail(session_fd); + if (session_fd >= 0) { + PROTECT_ERRNO; + if (_unlikely_(!(close_nointr(session_fd) != -EBADF))) + pam_syslog(handle, LOG_ERR, "Unexpected error code on closing session fd: %m"); + } return r; } } --- src/shared/util.c +++ src/shared/util.c 2015-07-29 08:38:30.009518272 +0000 @@ -190,7 +190,7 @@ void close_nointr_nofail(int fd) { /* like close_nointr() but cannot fail, and guarantees errno * is unchanged */ - assert_se(close_nointr(fd) == 0); + assert_se(close_nointr(fd) != -EBADF); } void close_many(const int fds[], unsigned n_fd) {
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