mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
fs-util: use strna() on returned strings of fd_get_path() if we don't check its return value
Let's make sure to use strna() on the strings returned by fd_get_path() where we knowingly ignore any failures. We got this right in most cases, but two were missing.
This commit is contained in:
parent
8fe8f3aaba
commit
48d837cd92
@ -765,7 +765,7 @@ static int log_unsafe_transition(int a, int b, const char *path, unsigned flags)
|
||||
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(ENOLINK),
|
||||
"Detected unsafe path transition %s %s %s during canonicalization of %s.",
|
||||
n1, special_glyph(SPECIAL_GLYPH_ARROW), n2, path);
|
||||
strna(n1), special_glyph(SPECIAL_GLYPH_ARROW), strna(n2), path);
|
||||
}
|
||||
|
||||
static int log_autofs_mount_point(int fd, const char *path, unsigned flags) {
|
||||
@ -778,7 +778,7 @@ static int log_autofs_mount_point(int fd, const char *path, unsigned flags) {
|
||||
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EREMOTE),
|
||||
"Detected autofs mount point %s during canonicalization of %s.",
|
||||
n1, path);
|
||||
strna(n1), path);
|
||||
}
|
||||
|
||||
int chase_symlinks(const char *path, const char *original_root, unsigned flags, char **ret_path, int *ret_fd) {
|
||||
|
Loading…
Reference in New Issue
Block a user