summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-06-06 21:31:19 +0900
committerGitHub <noreply@github.com>2019-06-06 21:31:19 +0900
commit042526868a0a9c88a1e264c7de8c5550fb59f990 (patch)
tree25314913ee084297a73f0aac15ef5228a427f039 /src/boot
parentc0d11245d2bdcf2a4333c3d49c973d83dfbe3791 (diff)
parent97afc0351a96e0daa83964df33937967c75c644f (diff)
downloadsystemd-042526868a0a9c88a1e264c7de8c5550fb59f990.tar.gz
systemd-042526868a0a9c88a1e264c7de8c5550fb59f990.tar.bz2
systemd-042526868a0a9c88a1e264c7de8c5550fb59f990.zip
Merge pull request #12508 from keszybz/no-root-checks
Drop many root checks
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/bless-boot.c11
-rw-r--r--src/boot/bootctl.c17
2 files changed, 13 insertions, 15 deletions
diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
index b5d110f422..f2d033fc40 100644
--- a/src/boot/bless-boot.c
+++ b/src/boot/bless-boot.c
@@ -480,13 +480,12 @@ exists:
}
static int run(int argc, char *argv[]) {
-
static const Verb verbs[] = {
- { "help", VERB_ANY, VERB_ANY, 0, help },
- { "status", VERB_ANY, 1, VERB_DEFAULT, verb_status },
- { "good", VERB_ANY, 1, VERB_MUST_BE_ROOT, verb_set },
- { "bad", VERB_ANY, 1, VERB_MUST_BE_ROOT, verb_set },
- { "indeterminate", VERB_ANY, 1, VERB_MUST_BE_ROOT, verb_set },
+ { "help", VERB_ANY, VERB_ANY, 0, help },
+ { "status", VERB_ANY, 1, VERB_DEFAULT, verb_status },
+ { "good", VERB_ANY, 1, 0, verb_set },
+ { "bad", VERB_ANY, 1, 0, verb_set },
+ { "indeterminate", VERB_ANY, 1, 0, verb_set },
{}
};
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index 55924adf06..e7ba8b4ab9 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -1435,16 +1435,15 @@ static int verb_set_default(int argc, char *argv[], void *userdata) {
}
static int bootctl_main(int argc, char *argv[]) {
-
static const Verb verbs[] = {
- { "help", VERB_ANY, VERB_ANY, 0, help },
- { "status", VERB_ANY, 1, VERB_DEFAULT, verb_status },
- { "install", VERB_ANY, 1, VERB_MUST_BE_ROOT, verb_install },
- { "update", VERB_ANY, 1, VERB_MUST_BE_ROOT, verb_install },
- { "remove", VERB_ANY, 1, VERB_MUST_BE_ROOT, verb_remove },
- { "list", VERB_ANY, 1, 0, verb_list },
- { "set-default", 2, 2, VERB_MUST_BE_ROOT, verb_set_default },
- { "set-oneshot", 2, 2, VERB_MUST_BE_ROOT, verb_set_default },
+ { "help", VERB_ANY, VERB_ANY, 0, help },
+ { "status", VERB_ANY, 1, VERB_DEFAULT, verb_status },
+ { "install", VERB_ANY, 1, 0, verb_install },
+ { "update", VERB_ANY, 1, 0, verb_install },
+ { "remove", VERB_ANY, 1, 0, verb_remove },
+ { "list", VERB_ANY, 1, 0, verb_list },
+ { "set-default", 2, 2, 0, verb_set_default },
+ { "set-oneshot", 2, 2, 0, verb_set_default },
{}
};