#4928 closed enhancement (fixed)
Implement POSIX *at() Functions
Reported by: | bonefish | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
POSIX.1-2008 introduces standard functions to operate on FD + relative path pairs:
- faccessat()
- fchmodat()
- fchownat()
fstatat()- linkat()
mkdirat()- mkfifoat()
- mknodat()
openat()readlinkat()- renameat()
symlinkat()unlinkat()utimensat()
The new open modes O_SEARCH AND O_EXEC should also be implemented.
Change History (12)
comment:1 by , 15 years ago
Description: | modified (diff) |
---|
comment:3 by , 15 years ago
Description: | modified (diff) |
---|
Implemented POSIX.1-2008 functions unlinkat(), symlinkat(), mkdirat(), and utimensat() in hrev34010.
comment:4 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 15 years ago
Implemented the remaining functions in hrev34288 - just noticed that linkat() is still missing, though, will do that next.
comment:6 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented linkat() in hrev34289.
comment:7 by , 15 years ago
Nice so far, but what about O_SEARCH and O_EXEC. Reopen the ticket or create a new one?
follow-up: 9 comment:8 by , 15 years ago
Is this related to the *at() functions? If not, I would prefer a new ticket for those.
comment:9 by , 15 years ago
Replying to axeld:
Is this related to the *at() functions? If not, I would prefer a new ticket for those.
Er, have you read the specification of any of the *at() functions? O_SEARCH definitely is related. O_EXEC not so much, unless you consider fexecve() kind of belonging to the lot -- it could be somewhat tricky to implement, anyway, so we might want to track it separately.
follow-up: 11 comment:10 by , 15 years ago
According to the specification, O_SEARCH can also be passed to open(). That's why I asked :-)
comment:11 by , 15 years ago
Replying to axeld:
According to the specification, O_SEARCH can also be passed to open(). That's why I asked :-)
Yep, it can be passed to open() and openat(), but it affects all *at() functions. It's mostly about permission checking, but not supporting this mode calls for ported packages that check for the *at() functions existence and implicitly assume O_SEARCH to exist as well. I'm actually almost surprised that none of the ported code in the repository does that. This kind of problem is why I had to introduce the B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT in the first place.
comment:12 by , 15 years ago
I guess it's good enough for the time being, but that should definitely be fixed before the next release :-)
Implemented openat() and readlinkat() in hrev33976 and hrev33978 respectively.