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

Ludo Brands ludo.brands at free.fr
Sat Aug 27 17:19:33 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.

solaris 10 x86. From sys/stat.h:

#define	S_ISUID		0x800	/* set user id on execution */
#define	S_ISGID		0x400	/* set group id on execution */
#define	S_ISVTX		0x200	/* save swapped text even after use */

S_ISTXT is not defined


More information about the fpc-devel mailing list