]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: restrict Windows service exec calls
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 27 Jan 2021 12:58:48 +0000 (12:58 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 5 Feb 2021 07:52:03 +0000 (07:52 +0000)
commitf28ad132c12472ec434e83f25d7416f2bc2e8793
tree1b6455054c70787f248940242d66e7a1dbcb8ddc
parent4d80432924656f725ccfcd5481aebb30b4041b43
rbd: restrict Windows service exec calls

The centralized Ceph Windows service is responsible of managing
rbd-wnbd daemons. When starting, it's respawns the daemons using the
command line saved in the Windows registry. Also, for new mappings,
the command line is passed through a named pipe.

While writing to the according named pipe and windows registry entries
requires admin privileges, it's better to avoid running arbitrary
commands.

This patch will drop the executable from the commands that the
Ceph service accepts. Instead, it will only accept arguments that
are passed to the the binary that was used to start the service
(rbd-wnbd.exe).

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 1744ba056869c2d5fb6b9d4551ea4da38dc8546a)
src/tools/rbd_wnbd/rbd_wnbd.cc