|
Ran
|
Jobs
1
|
Files
514
|
Run time
2min
|
Badge
README BADGES
|
push
github
box: fix misleading errors on privilege revoke from admin Trying to revoke privileges from an admin user or a super role results in misleading errors: ``` error: 'Tuple field 5 (privilege) type does not match one required by operation: expected unsigned, got integer' ``` The reason is that privileges use bit module for privilege grant/revoke, and this module operates 32-bit **signed** integers (see https://bitop.luajit.org/semantics.html#range for details). So any bit operation on a privilege set greater than 2^31 (for example, box.priv.ALL == 2^32 - 1) results in a negative number: ```lua tarantool> bit.band(box.priv.ALL, bit.bnot(box.priv.W)) --- - -3 ... ``` Fortunately, this can be fixed by casting one of the operands to a uint64_t type, so let's cast all granted or revoked privileges prior to calculating the resulting privilege set. Closes #11526 NO_DOC=bugfix (cherry picked from commit 8de5bae07)
69030 of 122333 branches covered (56.43%)
101724 of 116362 relevant lines covered (87.42%)
1796696.98 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 4 |
93.46 |
-0.77% | src/box/xrow_update_field.c |
| 3 |
90.71 |
-0.22% | src/box/applier.cc |
| 3 |
91.0 |
-0.2% | src/box/vy_scheduler.c |
| 2 |
95.78 |
-0.37% | src/box/relay.cc |
| 2 |
86.68 |
0.0% | src/box/vy_stmt.c |
| 2 |
84.3 |
-0.12% | src/box/xlog.c |
| 2 |
88.69 |
-0.11% | src/box/xrow.c |
| 2 |
85.03 |
-0.32% | src/lib/core/say.c |
| 2 |
85.71 |
-9.52% | src/lib/core/tt_sigaction.c |
| 2 |
95.45 |
-4.55% | src/lib/json/json.h |
| 2 |
97.36 |
0.1% | src/lib/msgpuck/msgpuck.h |
| 1 |
93.88 |
0.0% | src/box/txn_limbo.c |
| 1 |
97.4 |
-0.06% | src/lib/salad/bps_tree.h |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 16491976174.1 | 514 |
87.42 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|