4 #ifndef RUDIMENTS_PERMISSIONS_H
5 #define RUDIMENTS_PERMISSIONS_H
7 #include <rudiments/private/permissionsincludes.h>
9 #ifdef RUDIMENTS_NAMESPACE
37 static bool setFilePermissions(
const char *filename,
44 static bool setFilePermissions(int32_t fd, mode_t perms);
73 static mode_t evalPermString(
const char *permstring);
76 static char *evalPermOctal(mode_t mode);
82 static mode_t everyoneReadWrite();
88 static mode_t everyoneReadWriteExecute();
94 static mode_t ownerRead();
100 static mode_t ownerWrite();
106 static mode_t ownerExecute();
112 static mode_t ownerReadWrite();
118 static mode_t ownerReadExecute();
124 static mode_t ownerReadWriteExecute();
130 static mode_t groupRead();
136 static mode_t groupWrite();
142 static mode_t groupExecute();
148 static mode_t groupReadWrite();
154 static mode_t groupReadExecute();
160 static mode_t groupReadWriteExecute();
166 static mode_t othersRead();
172 static mode_t othersWrite();
178 static mode_t othersExecute();
184 static mode_t othersReadWrite();
190 static mode_t othersReadExecute();
196 static mode_t othersReadWriteExecute();
202 static mode_t saveInSwapSpace();
208 static mode_t setUserId();
214 static mode_t setGroupId();
217 #ifdef RUDIMENTS_NAMESPACE