Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 54139 Details for
Bug 85656
Default limits.conf settings allows for non-priviledged users to crash to system
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
maxproc.c (test program)
maxproc.c (text/plain), 648 bytes, created by
Natanael Copa
on 2005-03-22 01:44:51 UTC
(
hide
)
Description:
maxproc.c (test program)
Filename:
MIME Type:
Creator:
Natanael Copa
Created:
2005-03-22 01:44:51 UTC
Size:
648 bytes
patch
obsolete
> >/* > This program creates new processes as "nobody" until the limit is > reached. Number of processes is outputted to stdout. >*/ > >#include <stdlib.h> >#include <stdio.h> >#include <sys/types.h> >#include <unistd.h> >#include <signal.h> >#include <error.h> > >#define TTL 300 >#define MAX 65536 >#define UID 65534 > >int pids[MAX]; >int main(int argc, char *argv[]) { > int count = 0; pid_t pid; > if (setuid(UID) < 0) { > perror("setuid"); > exit(1); > } > while ((pid = fork()) >= 0 && count < MAX) { > if (pid == 0) sleep(TTL); > pids[count++] = pid; > } > printf("Forked %i new processes\n", count); > while (count--) kill(pids[count], SIGTERM); > 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 85656
:
54058
|
54137
|
54138
| 54139