[fpc-devel] unix platform maintainers :setuid, setsgid

Marco van de Voort marcov at stack.nl
Sat Aug 27 16:33:17 CEST 2011


Not all permission bits have constants predeclared. Michael and I checked
and Linux/FreeBSD/Darwin all have the upper bits declared like this:

#define S_ISUID         0004000         /* [XSI] set user id on execution */
#define S_ISGID         0002000         /* [XSI] set group id on execution
#define S_ISVTX         0001000         /* [XSI] directory restrcted delete
#define S_ISTXT         S_ISVTX         /* sticky bit: not supported */

Hereby a request to other "unix" port maintainers to check their headers
to see if your OS implements these constants. (Solaris and Haiku mainly I
guess, though the sleeping QNX and netwarelibc ports too I assume)

Note that the latter two are both the sticky bit, the TXT alias is the
original BSD symbol for it, the VTX declaration the current (XSI/POSIX)
name. Most manpages warn that the sticky bit is hardly implemented, so it is
probably less important than the other two.






More information about the fpc-devel mailing list