Blame SOURCES/0000-lib-Seek-beginning-of-mountinfo-file.patch
|
Johnny Hughes |
ccdedf |
From c767c5b858c88aa9fad0ca3aa80e5fd18c6d830d Mon Sep 17 00:00:00 2001
|
|
Johnny Hughes |
ccdedf |
From: Matej Marusak <mmarusak@redhat.com>
|
|
Johnny Hughes |
ccdedf |
Date: Tue, 4 Dec 2018 09:38:32 +0100
|
|
Johnny Hughes |
ccdedf |
Subject: [PATCH 0/2] lib: Seek beginning of mountinfo file
|
|
Johnny Hughes |
ccdedf |
|
|
Johnny Hughes |
ccdedf |
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
|
|
Johnny Hughes |
ccdedf |
(cherry picked from commit c8afd2847f59278faac8d12c150db1d29f7ad622)
|
|
Johnny Hughes |
ccdedf |
---
|
|
Johnny Hughes |
ccdedf |
src/lib/get_cmdline.c | 2 ++
|
|
Johnny Hughes |
ccdedf |
1 file changed, 2 insertions(+)
|
|
Johnny Hughes |
ccdedf |
|
|
Johnny Hughes |
ccdedf |
diff --git a/src/lib/get_cmdline.c b/src/lib/get_cmdline.c
|
|
Johnny Hughes |
ccdedf |
index 83c2fb45..49d419d5 100644
|
|
Johnny Hughes |
ccdedf |
--- a/src/lib/get_cmdline.c
|
|
Johnny Hughes |
ccdedf |
+++ b/src/lib/get_cmdline.c
|
|
Johnny Hughes |
ccdedf |
@@ -905,6 +905,7 @@ int process_has_own_root_at(int pid_proc_fd)
|
|
Johnny Hughes |
ccdedf |
close(mnt_fd);
|
|
Johnny Hughes |
ccdedf |
return r;
|
|
Johnny Hughes |
ccdedf |
}
|
|
Johnny Hughes |
ccdedf |
+ fseek(fin, 0, SEEK_SET);
|
|
Johnny Hughes |
ccdedf |
|
|
Johnny Hughes |
ccdedf |
r = get_mountinfo_for_mount_point(fin, &pid_root, "/");
|
|
Johnny Hughes |
ccdedf |
fclose(fin);
|
|
Johnny Hughes |
ccdedf |
@@ -925,6 +926,7 @@ int process_has_own_root_at(int pid_proc_fd)
|
|
Johnny Hughes |
ccdedf |
return r;
|
|
Johnny Hughes |
ccdedf |
}
|
|
Johnny Hughes |
ccdedf |
|
|
Johnny Hughes |
ccdedf |
+ fseek(fin, 0, SEEK_SET);
|
|
Johnny Hughes |
ccdedf |
r = get_mountinfo_for_mount_point(fin, &system_root, "/");
|
|
Johnny Hughes |
ccdedf |
fclose(fin);
|
|
Johnny Hughes |
ccdedf |
if (r)
|
|
Johnny Hughes |
ccdedf |
--
|
|
Johnny Hughes |
ccdedf |
2.21.0
|
|
Johnny Hughes |
ccdedf |
|