diff --git a/src/Buddies.hpp b/src/Buddies.hpp index 6144e6d..e7f9d2e 100644 --- a/src/Buddies.hpp +++ b/src/Buddies.hpp @@ -5,8 +5,8 @@ #include "core/Core.hpp" namespace Buddies { - void init(); + void init(); - // Buddy list - void refreshBuddyList(CNSocket* sock); + // Buddy list + void refreshBuddyList(CNSocket* sock); } diff --git a/src/Groups.hpp b/src/Groups.hpp index 248b74c..b12f9f9 100644 --- a/src/Groups.hpp +++ b/src/Groups.hpp @@ -8,7 +8,7 @@ #include namespace Groups { - void init(); + void init(); void sendToGroup(Player* plr, void* buf, uint32_t type, size_t size); void groupTickInfo(Player* plr); diff --git a/src/Racing.hpp b/src/Racing.hpp index 27d31ff..f6e6acb 100644 --- a/src/Racing.hpp +++ b/src/Racing.hpp @@ -9,7 +9,7 @@ struct EPInfo { }; struct EPRace { - std::set collectedRings; + std::set collectedRings; int mode, ticketSlot; time_t startTime; }; diff --git a/src/core/Defines.hpp b/src/core/Defines.hpp index a18e1a6..3cb0e05 100644 --- a/src/core/Defines.hpp +++ b/src/core/Defines.hpp @@ -11,17 +11,17 @@ const float CN_EP_RANK_5 = 0.29f; // methods of finding players for GM commands enum eCN_GM_TargetSearchBy { - eCN_GM_TargetSearchBy__PC_ID, // player id - eCN_GM_TargetSearchBy__PC_Name, // firstname, lastname - eCN_GM_TargetSearchBy__PC_UID // account id + eCN_GM_TargetSearchBy__PC_ID, // player id + eCN_GM_TargetSearchBy__PC_Name, // firstname, lastname + eCN_GM_TargetSearchBy__PC_UID // account id }; enum eCN_GM_TeleportType { - eCN_GM_TeleportMapType__XYZ, - eCN_GM_TeleportMapType__MapXYZ, - eCN_GM_TeleportMapType__MyLocation, - eCN_GM_TeleportMapType__SomeoneLocation, - eCN_GM_TeleportMapType__Unstick + eCN_GM_TeleportMapType__XYZ, + eCN_GM_TeleportMapType__MapXYZ, + eCN_GM_TeleportMapType__MyLocation, + eCN_GM_TeleportMapType__SomeoneLocation, + eCN_GM_TeleportMapType__Unstick }; // nano powers @@ -925,10 +925,10 @@ enum { * Each is the last packet - the upper bits + 1 */ enum { - N_CL2LS = 0xf, - N_CL2FE = 0xa5, - N_FE2CL = 0x12f, - N_LS2CL = 0x1a, + N_CL2LS = 0xf, + N_CL2FE = 0xa5, + N_FE2CL = 0x12f, + N_LS2CL = 0x1a, - N_PACKETS = N_CL2LS + N_CL2FE + N_FE2CL + N_LS2CL + N_PACKETS = N_CL2LS + N_CL2FE + N_FE2CL + N_LS2CL }; diff --git a/src/sandbox/seccomp.cpp b/src/sandbox/seccomp.cpp index 96273a0..058a9aa 100644 --- a/src/sandbox/seccomp.cpp +++ b/src/sandbox/seccomp.cpp @@ -72,40 +72,40 @@ static inline int seccomp(unsigned int operation, unsigned int flags, void *args #endif #define ALLOW_SYSCALL_ARG(_nr, _arg_nr, _arg_val) \ - BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (__NR_##_nr), 0, 6), \ - /* load and test syscall argument, low word */ \ - BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ - offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_LO_OFFSET), \ - BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, \ - ((_arg_val) & 0xFFFFFFFF), 0, 3), \ - /* load and test syscall argument, high word */ \ - BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ - offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_HI_OFFSET), \ - BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, \ - (((uint32_t)((uint64_t)(_arg_val) >> 32)) & 0xFFFFFFFF), 0, 1), \ - BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), \ - /* reload syscall number; all rules expect it in accumulator */ \ - BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ - offsetof(struct seccomp_data, nr)) + BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (__NR_##_nr), 0, 6), \ + /* load and test syscall argument, low word */ \ + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ + offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_LO_OFFSET), \ + BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, \ + ((_arg_val) & 0xFFFFFFFF), 0, 3), \ + /* load and test syscall argument, high word */ \ + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ + offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_HI_OFFSET), \ + BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, \ + (((uint32_t)((uint64_t)(_arg_val) >> 32)) & 0xFFFFFFFF), 0, 1), \ + BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), \ + /* reload syscall number; all rules expect it in accumulator */ \ + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ + offsetof(struct seccomp_data, nr)) /* Allow if syscall argument contains only values in mask */ #define ALLOW_SYSCALL_ARG_MASK(_nr, _arg_nr, _arg_mask) \ - BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (__NR_##_nr), 0, 8), \ - /* load, mask and test syscall argument, low word */ \ - BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ - offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_LO_OFFSET), \ - BPF_STMT(BPF_ALU+BPF_AND+BPF_K, ~((_arg_mask) & 0xFFFFFFFF)), \ - BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0, 0, 4), \ - /* load, mask and test syscall argument, high word */ \ - BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ - offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_HI_OFFSET), \ - BPF_STMT(BPF_ALU+BPF_AND+BPF_K, \ - ~(((uint32_t)((uint64_t)(_arg_mask) >> 32)) & 0xFFFFFFFF)), \ - BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0, 0, 1), \ - BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), \ - /* reload syscall number; all rules expect it in accumulator */ \ - BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ - offsetof(struct seccomp_data, nr)) + BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (__NR_##_nr), 0, 8), \ + /* load, mask and test syscall argument, low word */ \ + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ + offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_LO_OFFSET), \ + BPF_STMT(BPF_ALU+BPF_AND+BPF_K, ~((_arg_mask) & 0xFFFFFFFF)), \ + BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0, 0, 4), \ + /* load, mask and test syscall argument, high word */ \ + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ + offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_HI_OFFSET), \ + BPF_STMT(BPF_ALU+BPF_AND+BPF_K, \ + ~(((uint32_t)((uint64_t)(_arg_mask) >> 32)) & 0xFFFFFFFF)), \ + BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0, 0, 1), \ + BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), \ + /* reload syscall number; all rules expect it in accumulator */ \ + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \ + offsetof(struct seccomp_data, nr)) /* * The main supported configuration is Linux on x86_64 with either glibc or