• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
rename and POSIX permissions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rename and POSIX permissions


  • Subject: rename and POSIX permissions
  • From: Michael Roitzsch <email@hidden>
  • Date: Wed, 22 Oct 2008 13:06:15 +0200

Hi,

I just learned about the behavior of rename(2) on Darwin with respect to renaming directories. The manpage says in the Conformance Section, that renaming a directory not only requires write permission to the parent directory, but also to the directory being renamed. The first restriction is intuitively clear, the second is not. The reason given is that historically, UFS required write access to the ".." entry in the "renamee" and HFS+ today emulates this behavior.

My question is: Is this behavior we can rely upon or could this disappear without notice? Or is it even file system specific? (Linux for example only checks the permissions of the parent on rename.)

The reason I ask is that I have found at least one third party application relying on this behavior to be secure. That is: Code executed in a root context is stored in a path a user could mess with, if that additional rename restriction was not in place. Is it safe to do this?

Michael Roitzsch

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: rename and POSIX permissions
      • From: Patrick Rutkowski <email@hidden>
  • Prev by Date: [syslogd] Performance issue?
  • Next by Date: Re: rename and POSIX permissions
  • Previous by thread: Re: [syslogd] Performance issue?
  • Next by thread: Re: rename and POSIX permissions
  • Index(es):
    • Date
    • Thread