[PATCH v2] support_become_root: Don't fail when /proc/<pid/setgroups is missing
Andreas Schwab
schwab@linux-m68k.org
Sat Nov 18 15:33:00 GMT 2017
On Nov 18 2017, Christian Brauner <christian.brauner@ubuntu.com> wrote:
> @@ -50,11 +51,21 @@ setup_uid_gid_mapping (uid_t original_uid, gid_t original_gid)
> xwrite (fd, buf, ret);
> xclose (fd);
>
> - /* Disable setgroups before mapping groups, otherwise that would
> - fail with EPERM. */
> - fd = xopen ("/proc/self/setgroups", O_WRONLY, 0);
> - xwrite (fd, "deny\n", strlen ("deny\n"));
> - xclose (fd);
> + /* Linux 3.19 introduced the setgroups file. We need write "deny" to this
> + * file otherwise writing to gid_map will fail with EPERM. */
Wrong comment style.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Libc-alpha
mailing list