Ticket #2560 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] ALLPERMS uses undefined S_ISTXT

Reported by: andreasf Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Has a Patch: no
Platform: All Blocking:

Description

The public posix/sys/stat.h header defines ALLPERMS as follows:

#define ALLPERMS    (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO)

Yet I don't see a definition for S_ISTXT. Should it be defined or removed from ALLPERMS?

Same issue for fssh_stat.h probably.

Attachments

stat.h-S_ISTXT.diff Download (573 bytes) - added by andreasf 2 years ago.
Proposed patch

Change History

Changed 2 years ago by andreasf

Proposed patch

comment:1 Changed 2 years ago by andreasf

The attached patch removes S_ISTXT from ALLPERMS, fixing compilation of software using it.

comment:2 Changed 2 years ago by andreasf

  • Summary changed from ALLPERMS uses undefined S_ISTXT to [PATCH] ALLPERMS uses undefined S_ISTXT

comment:3 Changed 2 years ago by axeld

  • Status changed from new to closed
  • Resolution set to fixed

Applied in r26754, thanks!

comment:4 Changed 2 years ago by andreasf

  • Status changed from closed to reopened
  • Resolution fixed deleted

Shouldn't a fix be applied for fssh_stat.h as well then?

Anyhow, I'm now wondering whether my patch above might be wrong: Could it've been a typo meaning S_ISVTX ("save swapped text even after use")? On Darwin S_ISTXT gets defined to S_ISVTX (quote: "sticky bit: not supported" ;)), and ALLPERMS does use S_ISTXT there.

comment:5 Changed 2 years ago by axeld

  • Status changed from reopened to closed
  • Resolution set to fixed

You're right; ALLPERMS should contain all permission bits. I've changed stat.h now to contain S_ISVTX instead. I also changed the fs_shell's header this time :-)

Note: See TracTickets for help on using tickets.