Blame SOURCES/0381-commands-hdparm-Restrict-hdparm-command-when-locked-.patch
|
|
9723a8 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
9723a8 |
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
|
9723a8 |
Date: Wed, 24 Feb 2021 12:59:29 +0100
|
|
|
9723a8 |
Subject: [PATCH] commands/hdparm: Restrict hdparm command when locked down
|
|
|
9723a8 |
|
|
|
9723a8 |
The command can be used to get/set ATA disk parameters. Some of these can
|
|
|
9723a8 |
be dangerous since change the disk behavior. Restrict it when locked down.
|
|
|
9723a8 |
|
|
|
9723a8 |
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
|
9723a8 |
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
|
9723a8 |
---
|
|
|
9723a8 |
grub-core/commands/hdparm.c | 6 +++---
|
|
|
9723a8 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
9723a8 |
|
|
|
9723a8 |
diff --git a/grub-core/commands/hdparm.c b/grub-core/commands/hdparm.c
|
|
|
b71686 |
index d3fa9661e..2e2319e64 100644
|
|
|
9723a8 |
--- a/grub-core/commands/hdparm.c
|
|
|
9723a8 |
+++ b/grub-core/commands/hdparm.c
|
|
|
9723a8 |
@@ -436,9 +436,9 @@ static grub_extcmd_t cmd;
|
|
|
9723a8 |
|
|
|
9723a8 |
GRUB_MOD_INIT(hdparm)
|
|
|
9723a8 |
{
|
|
|
9723a8 |
- cmd = grub_register_extcmd ("hdparm", grub_cmd_hdparm, 0,
|
|
|
9723a8 |
- N_("[OPTIONS] DISK"),
|
|
|
9723a8 |
- N_("Get/set ATA disk parameters."), options);
|
|
|
9723a8 |
+ cmd = grub_register_extcmd_lockdown ("hdparm", grub_cmd_hdparm, 0,
|
|
|
9723a8 |
+ N_("[OPTIONS] DISK"),
|
|
|
9723a8 |
+ N_("Get/set ATA disk parameters."), options);
|
|
|
9723a8 |
}
|
|
|
9723a8 |
|
|
|
9723a8 |
GRUB_MOD_FINI(hdparm)
|