mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
commit
f9c44bc1a7
@ -1,55 +0,0 @@
|
||||
commit e24e9fabeb4f91d1dc428d06e2a144bccd7538eb
|
||||
Author: Lukas Rusak <lorusak@gmail.com>
|
||||
Date: Tue Nov 22 23:23:19 2016 -0800
|
||||
|
||||
systemctl: disable dangerous options
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index dd3b931..6f8290d 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -8009,6 +8009,11 @@ static int talk_initctl(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
+static int nope(sd_bus *bus, char **args) {
|
||||
+ printf("nope. don't do that\n");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int systemctl_main(int argc, char *argv[]) {
|
||||
|
||||
static const Verb verbs[] = {
|
||||
@@ -8062,22 +8067,22 @@ static int systemctl_main(int argc, char *argv[]) {
|
||||
{ "enable", 2, VERB_ANY, 0, enable_unit },
|
||||
{ "disable", 2, VERB_ANY, 0, enable_unit },
|
||||
{ "is-enabled", 2, VERB_ANY, 0, unit_is_enabled },
|
||||
- { "reenable", 2, VERB_ANY, 0, enable_unit },
|
||||
- { "preset", 2, VERB_ANY, 0, enable_unit },
|
||||
- { "preset-all", VERB_ANY, 1, 0, preset_all },
|
||||
- { "mask", 2, VERB_ANY, 0, enable_unit },
|
||||
- { "unmask", 2, VERB_ANY, 0, enable_unit },
|
||||
- { "link", 2, VERB_ANY, 0, enable_unit },
|
||||
+ { "reenable", 2, VERB_ANY, 0, nope },
|
||||
+ { "preset", 2, VERB_ANY, 0, nope },
|
||||
+ { "preset-all", VERB_ANY, 1, 0, nope },
|
||||
+ { "mask", 2, VERB_ANY, 0, nope },
|
||||
+ { "unmask", 2, VERB_ANY, 0, nope },
|
||||
+ { "link", 2, VERB_ANY, 0, nope },
|
||||
{ "revert", 2, VERB_ANY, 0, enable_unit },
|
||||
{ "switch-root", 2, VERB_ANY, VERB_NOCHROOT, switch_root },
|
||||
{ "list-dependencies", VERB_ANY, 2, VERB_NOCHROOT, list_dependencies },
|
||||
- { "set-default", 2, 2, 0, set_default },
|
||||
+ { "set-default", 2, 2, 0, nope },
|
||||
{ "get-default", VERB_ANY, 1, 0, get_default },
|
||||
{ "set-property", 3, VERB_ANY, VERB_NOCHROOT, set_property },
|
||||
{ "is-system-running", VERB_ANY, 1, 0, is_system_running },
|
||||
- { "add-wants", 3, VERB_ANY, 0, add_dependency },
|
||||
- { "add-requires", 3, VERB_ANY, 0, add_dependency },
|
||||
- { "edit", 2, VERB_ANY, VERB_NOCHROOT, edit },
|
||||
+ { "add-wants", 3, VERB_ANY, 0, nope },
|
||||
+ { "add-requires", 3, VERB_ANY, 0, nope },
|
||||
+ { "edit", 2, VERB_ANY, VERB_NOCHROOT, nope },
|
||||
{}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user