Opened 16 years ago

Closed 16 years ago

#2560 closed bug (fixed)

[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: Blocking:
Platform: All

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 (1)

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

Download all attachments as: .zip

Change History (6)

by andreasf, 16 years ago

Attachment: stat.h-S_ISTXT.diff added

Proposed patch

comment:1 by andreasf, 16 years ago

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

comment:2 by andreasf, 16 years ago

Summary: ALLPERMS uses undefined S_ISTXT[PATCH] ALLPERMS uses undefined S_ISTXT

comment:3 by axeld, 16 years ago

Resolution: fixed
Status: newclosed

Applied in hrev26754, thanks!

comment:4 by andreasf, 16 years ago

Resolution: fixed
Status: closedreopened

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 by axeld, 16 years ago

Resolution: fixed
Status: reopenedclosed

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.