From: John Hodge Date: Wed, 18 Feb 2015 06:21:05 +0000 (+0800) Subject: misc - Cleaning up warnings that occur on travis X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=86b0974b33759726b99f8940900a88e395247460;p=tpg%2Facess2.git misc - Cleaning up warnings that occur on travis --- diff --git a/KernelLand/Kernel/include/vfs_ext.h b/KernelLand/Kernel/include/vfs_ext.h index 42d98654..73d82ce5 100644 --- a/KernelLand/Kernel/include/vfs_ext.h +++ b/KernelLand/Kernel/include/vfs_ext.h @@ -70,6 +70,10 @@ enum eVFS_SeekDirs * \} */ +#define VFS_ACLENT_ALL 0x7FFFFFFF +#define VFS_GROUP_ANY {1, VFS_ACLENT_ALL} //!< Rules for all users +#define VFS_USER_NOBODY {0, VFS_ACLENT_ALL} //!< Rules for nobody + /** * \brief MMap protection flags * \{ diff --git a/KernelLand/Kernel/vfs/acls.c b/KernelLand/Kernel/vfs/acls.c index 7ae50c2f..f8d48608 100644 --- a/KernelLand/Kernel/vfs/acls.c +++ b/KernelLand/Kernel/vfs/acls.c @@ -9,21 +9,20 @@ 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; @@ -95,7 +94,7 @@ int VFS_GetACL(int FD, tVFS_ACL *Dest) // 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; } @@ -149,7 +148,7 @@ tVFS_ACL *VFS_UnixToAcessACL(Uint Mode, Uint Owner, Uint Group) 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; diff --git a/Tools/NetTest_Runner/test_tcp.c b/Tools/NetTest_Runner/test_tcp.c index 42aa2d50..8515f7f5 100644 --- a/Tools/NetTest_Runner/test_tcp.c +++ b/Tools/NetTest_Runner/test_tcp.c @@ -19,9 +19,9 @@ 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) {