The Samba-Bugzilla – Attachment 16667 Details for
Bug 14747
pam_wrapper does not accept PIDs > 0xFFFF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch (without unrelated changes)
file_14747.txt (text/plain), 972 bytes, created by
Jakub Jelen
on 2021-06-24 08:34:24 UTC
(
hide
)
Description:
proposed patch (without unrelated changes)
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2021-06-24 08:34:24 UTC
Size:
972 bytes
patch
obsolete
>commit 4bac44e46e064ae17d47670f8a304a6519fa7b42 >Author: Jakub Jelen <jjelen@redhat.com> >Date: Thu Jun 24 10:24:31 2021 +0200 > > Accept whole range of supported pids > > Signed-off-by: Jakub Jelen <jjelen@redhat.com> > >diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c >index 6801d7b..efa7cbb 100644 >--- a/src/pam_wrapper.c >+++ b/src/pam_wrapper.c >@@ -791,14 +791,20 @@ static void pwrap_clean_stale_dirs(const char *dir) > buf[sizeof(buf) - 1] = '\0'; > > tmp = strtol(buf, NULL, 10); >- if (tmp == 0 || tmp > 0xFFFF || errno == ERANGE) { >+ if (tmp == 0 || errno == ERANGE) { > PWRAP_LOG(PWRAP_LOG_ERROR, > "Failed to parse pid, buf=%s", > buf); > return; > } > >- pid = (pid_t)(tmp & 0xFFFF); >+ pid = (pid_t)tmp; >+ /* Check if we are out of pid_t range on this system */ >+ if ((long)pid != tmp) { >+ PWRAP_LOG(PWRAP_LOG_ERROR, >+ "pid out of range: %ld", tmp); >+ return; >+ } > > rc = kill(pid, 0); > if (rc == -1) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14747
:
16666
| 16667