Compare commits

...

2 Commits

Author SHA1 Message Date
Felipe Sateler 98cd752a28 test-condition: fix group check condition
We were checking the uid, whereas we should have checked the gid
2019-12-26 12:07:54 +09:00
Leonid Evdokimov 6e3c443b56 Fix typo 2019-12-26 12:07:08 +09:00
2 changed files with 2 additions and 2 deletions

View File

@ -1199,7 +1199,7 @@ static int bump_rlimit_memlock(struct rlimit *saved_rlimit) {
int r; int r;
/* BPF_MAP_TYPE_LPM_TRIE bpf maps are charged against RLIMIT_MEMLOCK, even if we have CAP_IPC_LOCK which should /* BPF_MAP_TYPE_LPM_TRIE bpf maps are charged against RLIMIT_MEMLOCK, even if we have CAP_IPC_LOCK which should
* normally disable such checks. We need them to implement IPAccessAllow= and IPAccessDeny=, hence let's bump * normally disable such checks. We need them to implement IPAddressAllow= and IPAddressDeny=, hence let's bump
* the value high enough for our user. */ * the value high enough for our user. */
/* Using MAX() on resource limits only is safe if RLIM_INFINITY is > 0. POSIX declares that rlim_t /* Using MAX() on resource limits only is safe if RLIM_INFINITY is > 0. POSIX declares that rlim_t

View File

@ -689,7 +689,7 @@ static void test_condition_test_group(void) {
condition_free(condition); condition_free(condition);
free(gid); free(gid);
groupname = (char*)(geteuid() == 0 ? NOBODY_GROUP_NAME : "root"); groupname = (char*)(getegid() == 0 ? NOBODY_GROUP_NAME : "root");
condition = condition_new(CONDITION_GROUP, groupname, false, false); condition = condition_new(CONDITION_GROUP, groupname, false, false);
assert_se(condition); assert_se(condition);
r = condition_test(condition); r = condition_test(condition);