chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
981ee55
)
systemd-run: add some extra safety checks
author
Lennart Poettering
<lennart@poettering.net>
Wed, 5 Mar 2014 02:38:36 +0000
(
03:38
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 5 Mar 2014 03:08:04 +0000
(
04:08
+0100)
src/run/run.c
patch
|
blob
|
history
diff --git
a/src/run/run.c
b/src/run/run.c
index 81763c94ffef0b7bc6cde552e683791292139164..e71ca7dc3fbafb6fad720b056b1c419894a600d9 100644
(file)
--- a/
src/run/run.c
+++ b/
src/run/run.c
@@
-37,7
+37,7
@@
static const char *arg_description = NULL;
static const char *arg_slice = NULL;
static bool arg_send_sighup = false;
static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
static const char *arg_slice = NULL;
static bool arg_send_sighup = false;
static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
-static char *arg_host = NULL;
+static c
onst c
har *arg_host = NULL;
static bool arg_user = false;
static const char *arg_service_type = NULL;
static const char *arg_exec_user = NULL;
static bool arg_user = false;
static const char *arg_service_type = NULL;
static const char *arg_exec_user = NULL;
@@
-186,7
+186,7
@@
static int parse_argv(int argc, char *argv[]) {
case ARG_NICE:
r = safe_atoi(optarg, &arg_nice);
case ARG_NICE:
r = safe_atoi(optarg, &arg_nice);
- if (r < 0) {
+ if (r < 0
|| arg_nice < PRIO_MIN || arg_nice >= PRIO_MAX
) {
log_error("Failed to parse nice value");
return -EINVAL;
}
log_error("Failed to parse nice value");
return -EINVAL;
}