Skip to content

Commit d65647d

Browse files
committed
control: allow privileged commands only for root
Don't allow arbitrary local users to invoke those commands.
1 parent fd2bb46 commit d65647d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎debian/changelog‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cm4all-workshop (7.19) unstable; urgency=low
99
* workshop: fix assertion failure on spawn after job exit
1010
* workshop: apply the default timeout to the local kill timer
1111
* workshop: verify the claim when updating a job
12+
* control: allow privileged commands only for root
1213

1314
--
1415

‎src/Instance.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ Instance::OnControlPacket(BengControl::Command command,
206206
{
207207
using namespace BengControl;
208208

209-
/* only local clients are allowed to use most commands */
210-
const bool is_privileged = uid >= 0;
209+
/* only local root clients are allowed to use most commands */
210+
const bool is_privileged = uid == 0;
211211

212212
switch (command) {
213213
case Command::NOP:

0 commit comments

Comments
 (0)