[0/1] pseudo fchmodat, this time for sure

Submitted by Peter Seebach on May 28, 2014, 12:14 a.m. | Patch ID: 72841


Message ID cover.1401235888.git.peter.seebach@windriver.com
State New
Headers show


git://git.yoctoproject.org/poky-contrib seebs/umask

Commit Message

Peter Seebach May 28, 2014, 12:14 a.m.
This improves on the previous patch by moving the umask clearing
in mkdirat() outside of a rarely-used #ifdef block.

It improves on the original submission by masking out umasks at all,
which turns out to be necessary for mkdir, open, etcetera in order to
get the right database mode.

Originally, pseudo assumed that the "correct" mode for
a file would be the mode returned by creating the file with the
requested mode. Over time, that's been fixed up to include
masking in 0600 bits, and 0100 for directories, and masking out
022 bits, then restoring these bits from the specified mode...
Which doesn't produce the right results if umask has any of 0722
in it. Which it often does.

The patch sent out earlier today got this right for plain files and
special nodes, but not for directories, unless you were building on
RHEL4 or another system which doesn't actually have the *at() functions.

The following changes since commit 9948e4239b88026804c33d84830dbfe6b0ed3e59:

  eglinfo: updated to compile with mesa10+ (2014-05-27 16:10:25 +0100)

are available in the git repository at:
  git://git.yoctoproject.org/poky-contrib seebs/umask

Peter Seebach (1):
  pseudo: Honor umask again

 .../pseudo/files/pseudo-fchmodat-permissions.patch |  169 +++++++++++++++++++-
 1 files changed, 163 insertions(+), 6 deletions(-)