Skip to content

Commit bfeae65

Browse files
committed
dm: Remove root permission check in bd_dm_map_exists
Checking only EUID is not enough and we don't really support running without root privileges. If someone tries to run this function as non-root, the first dm_task_create will fail and the reason is logged, so that should be good enough.
1 parent a8a61c0 commit bfeae65

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/plugins/dm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,6 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
315315
guint64 next = 0;
316316
gboolean ret = FALSE;
317317

318-
if (geteuid () != 0) {
319-
g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_NOT_ROOT,
320-
"Not running as root, cannot query DM maps");
321-
return FALSE;
322-
}
323-
324318
task_list = dm_task_create (DM_DEVICE_LIST);
325319
if (!task_list) {
326320
g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_TASK,

0 commit comments

Comments
 (0)