The Samba-Bugzilla – Attachment 18081 Details for
Bug 15464
libnss_winbind causes memory corruption since samba-4.18, impacts sendmail, zabbix, potentially more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
b15464-testcase.c
b15464-testcase.c (text/plain), 945 bytes, created by
Krzysztof Olędzki
on 2023-09-07 07:32:03 UTC
(
hide
)
Description:
b15464-testcase.c
Filename:
MIME Type:
Creator:
Krzysztof Olędzki
Created:
2023-09-07 07:32:03 UTC
Size:
945 bytes
patch
obsolete
>#include <sys/types.h> > >#include <grp.h> >#include <stdio.h> >#include <unistd.h> >#include <pthread.h> > >#include <stdlib.h> > >#include <sys/wait.h> > > >int main(void) >{ > pid_t pid; > int wstatus; > > pthread_key_t k1; > pthread_key_t k2; > pthread_key_t k3; > > char *val = malloc(1); > > initgroups("root", 0); > > pthread_key_create(&k1, NULL); > pthread_setspecific(k1, val); > printf("%d: k1=%d\n", getpid(), k1); > > pid = fork(); > if (pid) { > wait(&wstatus); > return WEXITSTATUS(wstatus); > } > > pthread_key_create(&k2, NULL); > pthread_setspecific(k2, val); > > printf("%d: Hello after fork, k1=%d, k2=%d\n", getpid(), k1, k2); > > pid = fork(); > > if (pid) { > wait(&wstatus); > return WEXITSTATUS(wstatus); > } > > pthread_key_create(&k3, NULL); > pthread_setspecific(k3, val); > > printf("%d: Hello after fork2, k1=%d, k2=%d, k3=%d\n", getpid(), k1, k2, k3); > > if (k1 == k2 || k2 == k3) { > printf("FAIL\n"); > return 1; > } else { > printf("OK\n"); > return 0; > } >} >
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 15464
:
18079
|
18080
|
18081
|
18082
|
18103
|
18104