|
Ran
|
Jobs
1
|
Files
518
|
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)
70542 of 124275 branches covered (56.76%)
103707 of 118478 relevant lines covered (87.53%)
1372126.67 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
88.13 |
-0.63% | src/box/engine.c |
| 1 |
95.31 |
-1.56% | src/box/engine.h |
| 1 |
90.14 |
-0.08% | src/box/vy_log.c |
| 1 |
96.45 |
-0.21% | src/box/vy_read_iterator.c |
| 1 |
84.45 |
0.11% | src/box/xlog.c |
| 1 |
71.97 |
-0.2% | src/lib/core/popen.c |
| 1 |
96.15 |
-0.05% | src/lib/salad/bps_tree.h |
| 2 |
95.84 |
-0.11% | src/box/iproto.cc |
| 2 |
87.44 |
-0.13% | src/box/vy_run.c |
| 2 |
89.25 |
-0.11% | src/box/xrow.c |
| 2 |
94.42 |
-0.24% | src/box/xrow_update_field.c |
| 2 |
93.04 |
-0.08% | src/lib/core/fiber.c |
| 5 |
97.05 |
-0.51% | src/lib/msgpuck/msgpuck.h |
| 6 |
92.35 |
-0.18% | src/box/vinyl.c |
| 15 |
92.09 |
-2.33% | src/box/memtx_space.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 16491979938.1 | 518 |
87.53 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|