Uint VFS_int_CheckACLs(tVFS_ACL *ACLs, int Num, int bDeny, Uint Perms, tUID UID, tGID GID);
// === GLOBALS ===
-tVFS_ACL gVFS_ACL_EveryoneRWX = { {1,-1}, {0,VFS_PERM_ALL} };
-tVFS_ACL gVFS_ACL_EveryoneRW = { {1,-1}, {0,VFS_PERM_ALL^VFS_PERM_EXEC} };
-tVFS_ACL gVFS_ACL_EveryoneRX = { {1,-1}, {0,VFS_PERM_READ|VFS_PERM_EXEC} };
-tVFS_ACL gVFS_ACL_EveryoneRO = { {1,-1}, {0,VFS_PERM_READ} };
+tVFS_ACL gVFS_ACL_EveryoneRWX = { VFS_GROUP_ANY, {0,VFS_PERM_ALL} };
+tVFS_ACL gVFS_ACL_EveryoneRW = { VFS_GROUP_ANY, {0,VFS_PERM_ALL^VFS_PERM_EXEC} };
+tVFS_ACL gVFS_ACL_EveryoneRX = { VFS_GROUP_ANY, {0,VFS_PERM_READ|VFS_PERM_EXEC} };
+tVFS_ACL gVFS_ACL_EveryoneRO = { VFS_GROUP_ANY, {0,VFS_PERM_READ} };
// === CODE ===
Uint VFS_int_CheckACLs(tVFS_ACL *ACLs, int Num, int bDeny, Uint Perms, tUID UID, tGID GID)
{
- int i;
- for(i = 0; i < Num; i ++ )
+ for(int i = 0; i < Num; i ++ )
{
if(ACLs[i].Perm.Inv)
continue; // Ignore ALLOWs
// Check if the entry applies to this case
- if(ACLs[i].Ent.ID != 0x7FFFFFFF)
+ if(ACLs[i].Ent.ID != VFS_ACLENT_ALL)
{
if(!ACLs[i].Ent.Group) {
if(ACLs[i].Ent.ID != UID) continue;
// Root can do anything
if(Dest->Ent.Group == 0 && Dest->Ent.ID == 0) {
Dest->Perm.Inv = 0;
- Dest->Perm.Perms = -1;
+ Dest->Perm.Perms = VFS_PERM_ALL;
return 1;
}
if(Mode & 0010) ret[1].Perm.Perms |= VFS_PERM_EXEC;
// Global
- ret[2].Ent.Group = 1; ret[2].Ent.ID = -1;
+ ret[2].Ent.Group = 1; ret[2].Ent.ID = VFS_ACLENT_ALL;
ret[2].Perm.Inv = 0; ret[2].Perm.Perms = 0;
if(Mode & 0004) ret[2].Perm.Perms |= VFS_PERM_READ;
if(Mode & 0002) ret[2].Perm.Perms |= VFS_PERM_WRITE;
static const int ERX_TIMEOUT = 1000; // Expect RX timeout (timeout=failure)
static const int NRX_TIMEOUT = 250; // Not expect RX timeout (timeout=success)
static const int RETX_TIMEOUT = 1000; // OS PARAM - Retransmit timeout
-static const int LOST_TIMEOUT = 1000; // OS PARAM - Time before sending an ACK
-static const int DACK_TIMEOUT = 500; // OS PARAM - Timeout for delayed ACKs
-static const size_t DACK_BYTES = 4096; // OS PARAM - Threshold for delayed ACKs
+//static const int LOST_TIMEOUT = 1000; // OS PARAM - Time before sending an ACK
+//static const int DACK_TIMEOUT = 500; // OS PARAM - Timeout for delayed ACKs
+//static const size_t DACK_BYTES = 4096; // OS PARAM - Threshold for delayed ACKs
bool Test_TCP_Basic(void)
{