Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/snapd-generator: read mountinfo for pid 1 (2.60) #13335

Merged
merged 2 commits into from Dec 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/snapd-generator/main.c
Expand Up @@ -45,11 +45,11 @@ static sc_mountinfo_entry *find_root_mountinfo(sc_mountinfo * mounts)

static int ensure_root_fs_shared(const char *normal_dir)
{
// Load /proc/self/mountinfo so that we can inspect the root filesystem.
// Load /proc/1/mountinfo so that we can inspect the root filesystem.
sc_mountinfo *mounts SC_CLEANUP(sc_cleanup_mountinfo) = NULL;
mounts = sc_parse_mountinfo(NULL);
mounts = sc_parse_mountinfo("/proc/1/mountinfo");
if (!mounts) {
fprintf(stderr, "cannot open or parse /proc/self/mountinfo\n");
fprintf(stderr, "cannot open or parse /proc/1/mountinfo\n");
return 1;
}

Expand Down