Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 252287 Details for
Bug 342983
sys-apps/sandbox-2.3 mishandles relative mkdirat() when fd!=AT_FDCWD
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
sample code to show the behaviour
sandbox-poc.c (text/plain), 545 bytes, created by
Xake
on 2010-10-27 19:21:15 UTC
(
hide
)
Description:
sample code to show the behaviour
Filename:
MIME Type:
Creator:
Xake
Created:
2010-10-27 19:21:15 UTC
Size:
545 bytes
patch
obsolete
>#include <fcntl.h> >#include <stdio.h> >#include <errno.h> >#include <string.h> > >int >main(){ > int fd; > int i; > if ((i = mkdir("one",0777)) != 0) > { > printf("Failed create \"one\": %d, %s\n",i,strerror(errno)); > return 1; > } > > fd = open("one",(O_DIRECTORY | O_NOFOLLOW)); > printf("Have created and open dir \"one\"\nAbout to create dir \"one/one\"...\n"); > if ((i = mkdirat(fd,"one",0777)) != 0) > { > printf("Failed create \"one/one\": %d, %s\n",i,strerror(errno)); > close(fd); > return 1; > } > > printf("Have created \"one/one\"\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 342983
: 252287 |
252345