MCPcopy Create free account
hub / github.com/containers/bubblewrap / read_overflowids

Function read_overflowids

bubblewrap.c:2806–2827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2804}
2805
2806static void
2807read_overflowids (void)
2808{
2809 cleanup_free char *uid_data = NULL;
2810 cleanup_free char *gid_data = NULL;
2811
2812 uid_data = load_file_at (AT_FDCWD, "/proc/sys/kernel/overflowuid");
2813 if (uid_data == NULL)
2814 die_with_error ("Can't read /proc/sys/kernel/overflowuid");
2815
2816 overflow_uid = strtol (uid_data, NULL, 10);
2817 if (overflow_uid == 0)
2818 die ("Can't parse /proc/sys/kernel/overflowuid");
2819
2820 gid_data = load_file_at (AT_FDCWD, "/proc/sys/kernel/overflowgid");
2821 if (gid_data == NULL)
2822 die_with_error ("Can't read /proc/sys/kernel/overflowgid");
2823
2824 overflow_gid = strtol (gid_data, NULL, 10);
2825 if (overflow_gid == 0)
2826 die ("Can't parse /proc/sys/kernel/overflowgid");
2827}
2828
2829static void
2830namespace_ids_read (pid_t pid)

Callers 1

mainFunction · 0.85

Calls 3

load_file_atFunction · 0.85
die_with_errorFunction · 0.85
dieFunction · 0.85

Tested by

no test coverage detected