Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#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 bonefish)

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 bonefish, 14 years ago

Description: modified (diff)

Implemented openat() and readlinkat() in hrev33976 and hrev33978 respectively.

comment:2 by bonefish, 14 years ago

Description: modified (diff)

Implemented fstatat() in hrev33987.

comment:3 by bonefish, 14 years ago

Description: modified (diff)

Implemented POSIX.1-2008 functions unlinkat(), symlinkat(), mkdirat(), and utimensat() in hrev34010.

comment:4 by axeld, 14 years ago

Owner: changed from nobody to axeld
Status: newassigned

comment:5 by axeld, 14 years ago

Implemented the remaining functions in hrev34288 - just noticed that linkat() is still missing, though, will do that next.

comment:6 by axeld, 14 years ago

Resolution: fixed
Status: assignedclosed

Implemented linkat() in hrev34289.

comment:7 by bonefish, 14 years ago

Nice so far, but what about O_SEARCH and O_EXEC. Reopen the ticket or create a new one?

comment:8 by axeld, 14 years ago

Is this related to the *at() functions? If not, I would prefer a new ticket for those.

in reply to:  8 comment:9 by bonefish, 14 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.

comment:10 by axeld, 14 years ago

According to the specification, O_SEARCH can also be passed to open(). That's why I asked :-)

in reply to:  10 comment:11 by bonefish, 14 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 axeld, 14 years ago

I guess it's good enough for the time being, but that should definitely be fixed before the next release :-)

Note: See TracTickets for help on using tickets.