diff --git a/Correct_assert_on_unexpected_error_code.patch b/Correct_assert_on_unexpected_error_code.patch new file mode 100644 index 00000000..535170b4 --- /dev/null +++ b/Correct_assert_on_unexpected_error_code.patch @@ -0,0 +1,19 @@ +--- + src/login/pam_systemd.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- src/login/pam_systemd.c ++++ src/login/pam_systemd.c 2015-07-29 08:52:20.762018565 +0000 +@@ -507,7 +507,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."); +- safe_close(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; + } + } diff --git a/systemd-mini.changes b/systemd-mini.changes index b0d6ef1e..e46d66ba 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 29 09:02:21 UTC 2015 - werner@suse.de + +- Add Correct_assert_on_unexpected_error_code.patch to work around + a problem of an assert on ENODEV for closing fd on an input + event device (boo#939571) + ------------------------------------------------------------------- Wed Jul 8 20:44:57 UTC 2015 - crrodriguez@opensuse.org diff --git a/systemd-mini.spec b/systemd-mini.spec index d24b9bcd..6b435b31 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -246,6 +246,8 @@ Patch490: watch_resolv.conf_for_become_changed.patch Patch520: systemd-add-user-keep.patch # PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) Patch521: kbd-model-map.patch +# PATCH-WORKAROUND-SUSE (boo#939571) +Patch522: Correct_assert_on_unexpected_error_code.patch # UDEV PATCHES # ============ diff --git a/systemd.changes b/systemd.changes index b0d6ef1e..e46d66ba 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 29 09:02:21 UTC 2015 - werner@suse.de + +- Add Correct_assert_on_unexpected_error_code.patch to work around + a problem of an assert on ENODEV for closing fd on an input + event device (boo#939571) + ------------------------------------------------------------------- Wed Jul 8 20:44:57 UTC 2015 - crrodriguez@opensuse.org diff --git a/systemd.spec b/systemd.spec index 0cd8e40f..a59a9976 100644 --- a/systemd.spec +++ b/systemd.spec @@ -241,6 +241,8 @@ Patch490: watch_resolv.conf_for_become_changed.patch Patch520: systemd-add-user-keep.patch # PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) Patch521: kbd-model-map.patch +# PATCH-WORKAROUND-SUSE (boo#939571) +Patch522: Correct_assert_on_unexpected_error_code.patch # UDEV PATCHES # ============ @@ -585,6 +587,7 @@ cp %{SOURCE7} m4/ %patch490 -p1 %patch520 -p1 %patch521 -p1 +%patch522 -p0 # udev patches %patch1001 -p1