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

Armin Diehl ad at ardiehl.de
Mon Aug 29 12:16:54 CEST 2011

On 08/27/2011 04:33 PM, Marco van de Voort wrote:
> 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.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
for netwlibc they are defined as follows:

{ POSIX setuid(), setgid(), and sticky...  }
      S_ISUID = $0800;
      S_ISGID = $0400;
      S_ISVTX = $0200;

S_ISTXT is not defined

More information about the fpc-devel mailing list