chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
systemctl: check the argument to -t for invalid values
[elogind.git]
/
src
/
systemctl
/
systemctl.c
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index c89920bccbe7f7cbc0c9acfeb184018a63d9899b..a9681798dd55baef54e0ca1087c5fcfedd8180c3 100644
(file)
--- a/
src/systemctl/systemctl.c
+++ b/
src/systemctl/systemctl.c
@@
-4650,6
+4650,10
@@
static int systemctl_parse_argv(int argc, char *argv[]) {
return 0;
case 't':
+ if (unit_type_from_string(optarg) < 0) {
+ log_error("Invalid unit type '%s'.", optarg);
+ return -EINVAL;
+ }
arg_type = optarg;
break;