chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
machine: validate machine names using machine_name_is_valid() instead of string_is_safe()
[elogind.git]
/
src
/
shared
/
logs-show.c
diff --git
a/src/shared/logs-show.c
b/src/shared/logs-show.c
index d5d9d090b5c41a30a943af1b2c8c18034c1ec06c..04e1165191068b7494730fa99ebe49d2734200c9 100644
(file)
--- a/
src/shared/logs-show.c
+++ b/
src/shared/logs-show.c
@@
-447,6
+447,8
@@
static int output_verbose(
}
fprintf(f, "%s [%s]\n",
}
fprintf(f, "%s [%s]\n",
+ flags & OUTPUT_UTC ?
+ format_timestamp_us_utc(ts, sizeof(ts), realtime) :
format_timestamp_us(ts, sizeof(ts), realtime),
cursor);
format_timestamp_us(ts, sizeof(ts), realtime),
cursor);
@@
-1153,7
+1155,7
@@
static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) {
assert(machine);
assert(boot_id);
assert(machine);
assert(boot_id);
- if (!
filename_is_safe
(machine))
+ if (!
machine_name_is_valid
(machine))
return -EINVAL;
r = container_get_leader(machine, &pid);
return -EINVAL;
r = container_get_leader(machine, &pid);