FreeBSD Bugzilla – Attachment 232680 Details for
Bug 262515
Missing filecaps_free() in many places
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
reproducer
test.c (text/plain), 625 bytes, created by
Mark Johnston
on 2022-03-24 19:41:11 UTC
(
hide
)
Description:
reproducer
Filename:
MIME Type:
Creator:
Mark Johnston
Created:
2022-03-24 19:41:11 UTC
Size:
625 bytes
patch
obsolete
>#include <sys/capsicum.h> >#include <sys/ioctl.h> > >#include <err.h> >#include <fcntl.h> >#include <stdio.h> >#include <unistd.h> > >int >main(int argc, char **argv) >{ > unsigned long ioc; > int dfd, fd; > > if (argc != 2) > errx(1, "bad usage"); > > dfd = open(argv[1], O_DIRECTORY); > if (dfd < 0) > err(1, "open"); > > fd = openat(dfd, "foo", O_CREAT, 0444); > if (dfd < 0) > err(1, "open"); > > ioc = FIONREAD; > if (cap_ioctls_limit(dfd, &ioc, 1) != 0) > err(1, "cap_ioctls_limit"); > > while (true) { > if (renameat(dfd, "foo", dfd, "bar") != 0) > err(1, "renameat"); > if (renameat(dfd, "bar", dfd, "foo") != 0) > err(1, "renameat"); > } >}
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 262515
: 232680