| View previous topic :: View next topic |
| Author |
Message |
moltonel n00b

Joined: 31 Mar 2003 Posts: 30 Location: Ireland
|
Posted: Thu Nov 28, 2013 5:24 pm Post subject: glibc-2.16 and alledgedly-incorrect /dev/pts mount options |
|
|
Hi,
glibc-2.16 went stable and now has a *suid* useflag that require a devpts mounted with gid=5 if the useflag is off (the safe default). It fails for me, although my config looks fine :
| Code: |
* Messages for package sys-libs/glibc-2.16.0:
...
* In order to use glibc with USE=-suid, you must make sure that
* you have devpts mounted at /dev/pts with the gid=5 option.
* Openrc should do this for you, so you should check /etc/fstab
* and make sure you do not have any invalid settings there.
* ERROR: sys-libs/glibc-2.16.0::gentoo failed (preinst phase):
* mount & fix your /dev/pts settings
@moltowork 17:09# grep pts /proc/mounts
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0
@moltowork 18:12# grep pts /proc/mounts
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0
devpts /home/squeeze/dev/pts devpts rw,relatime,mode=600 0 0
@moltowork 18:12# mount|grep pts
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
devpts on /home/squeeze/dev/pts type devpts (rw)
@moltowork 18:12# grep pts /etc/fstab
devpts home/squeeze/dev/pts devpts defaults 0 0
@moltowork 18:13# l /dev/pts
total 0
crw------- 1 work tty 136, 0 Nov 28 15:03 0
crw------- 1 work tty 136, 1 Nov 28 15:03 1
crw------- 1 work tty 136, 10 Nov 28 18:12 10
crw------- 1 work tty 136, 2 Nov 28 16:54 2
crw------- 1 work tty 136, 3 Nov 28 16:47 3
crw------- 1 work tty 136, 4 Nov 28 15:03 4
crw------- 1 work tty 136, 5 Nov 28 17:07 5
crw------- 1 work tty 136, 6 Nov 28 16:47 6
crw------- 1 work tty 136, 7 Nov 28 15:56 7
crw------- 1 work tty 136, 8 Nov 28 15:03 8
crw------- 1 work tty 136, 9 Nov 28 18:14 9
@moltowork 18:14# grep tty /etc/group
tty:x:5:
@moltowork 18:14# uname -a
Linux moltowork 3.10.1-hardened-r1 #1 SMP Mon Sep 23 20:04:27 CEST 2013 x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux
|
The ebuild looks at /proc/mounts which doesn't show the gid=5 option, but the mount and ls programs tel me that the gid is fine. I have the latest openrc installed (0.12.4).
I imagine that the extra pts mount (for a debian chroot) might cause the problem, or maybe the hardened kernel is hiding stuff from the /proc/mounts output ? I'm not sure if this is a problem with my setup or a bug in the ebuild.
Thanks in advance. |
|
| Back to top |
|
 |
Hu Watchman

Joined: 06 Mar 2007 Posts: 9533
|
Posted: Fri Nov 29, 2013 3:22 am Post subject: |
|
|
I have no entries in /etc/fstab for /dev/pts. Something, probably openrc, has successfully mounted a /dev/pts of type devpts and /proc/mounts does show it with the gid=5 flag: | grep devpts /dev/pts: | | devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 |
|
|
| Back to top |
|
 |
drescherjm Advocate

Joined: 05 Jun 2004 Posts: 2770 Location: Pittsburgh, PA, USA
|
Posted: Sun Dec 01, 2013 3:21 pm Post subject: |
|
|
I have the same problem on multiple systems.
| Code: | jmd0 ~ # grep devpts /proc/mounts
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
|
| Code: |
jmd0 ~ # mount | grep pts
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
|
_________________ John
My gentoo overlay
Instructons for overlay |
|
| Back to top |
|
 |
Anon-E-moose Advocate


Joined: 23 May 2008 Posts: 2723 Location: Dallas area
|
Posted: Sun Dec 01, 2013 3:28 pm Post subject: |
|
|
I'm running an older openrc and /etc/init.d/devfs sets gid and mode. _________________ Asus m5a99fx, FX 8320 - amd64-multilib, 4.3.0-zen, glibc-2.20, gcc-4.9.3, eudev
xorg-server-1.17.4 w/mesa-11.1.0, openbox, nouveau and radeon, oss4(2011) |
|
| Back to top |
|
 |
drescherjm Advocate

Joined: 05 Jun 2004 Posts: 2770 Location: Pittsburgh, PA, USA
|
Posted: Sun Dec 01, 2013 3:34 pm Post subject: |
|
|
For me its
| Code: |
jmd0 ~ # equery l openrc
* Searching for openrc ...
[IP-] [ ] sys-apps/openrc-0.12.4:0 |
_________________ John
My gentoo overlay
Instructons for overlay |
|
| Back to top |
|
 |
Hu Watchman

Joined: 06 Mar 2007 Posts: 9533
|
Posted: Sun Dec 01, 2013 4:55 pm Post subject: |
|
|
On a working system that still uses glibc-2.15 and has not attempted to upgrade: | emerge -p sys-apps/openrc: | [ebuild R ] sys-apps/openrc-0.11.8
|
| grep devpts /proc/mounts: | | devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 |
|
|
| Back to top |
|
 |
moltonel n00b

Joined: 31 Mar 2003 Posts: 30 Location: Ireland
|
Posted: Mon Dec 02, 2013 7:16 pm Post subject: |
|
|
| It worked for me this time, after having commented out the devpts mount from my fstab and rebooted. Don't know why an unrelated (used for a debian chroot) devpts would influence the devpts mounted by openrc, but it apparently did. |
|
| Back to top |
|
 |
drescherjm Advocate

Joined: 05 Jun 2004 Posts: 2770 Location: Pittsburgh, PA, USA
|
Posted: Mon Dec 02, 2013 7:46 pm Post subject: |
|
|
Hmm. I have a second system (this one an i686) that has openrc-0.12.4 and kernels 3.11.X and kernels-3.12.X (tried several kernels and options) and it has
| Code: | gentoo ~ # grep devpts /proc/mounts
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
gentoo ~ # uname -a
Linux gentoo 3.12.2-gentoo-vm_gentoo #2 SMP PREEMPT Mon Dec 2 14:17:33 EST 2013 i686 Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz GenuineIntel GNU/Linux
gentoo ~ # equery l openrc
* Searching for openrc ...
[IP-] [ ] sys-apps/openrc-0.12.4:0
gentoo ~ # zgrep PTS /proc/config.gz |
I can not figure out what exactly is different besides lxc. I run lxc on the systems that fail the check. _________________ John
My gentoo overlay
Instructons for overlay |
|
| Back to top |
|
 |
drescherjm Advocate

Joined: 05 Jun 2004 Posts: 2770 Location: Pittsburgh, PA, USA
|
Posted: Mon Dec 02, 2013 8:12 pm Post subject: |
|
|
It was lxc. Without a guest I get:
| Code: | datastore4 ~ # grep devpts /proc/mounts
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
|
Then once the guest starts
| Code: | datastore4 ~ # grep devpts /proc/mounts
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0 |
The host in this case is datastore4 _________________ John
My gentoo overlay
Instructons for overlay |
|
| Back to top |
|
 |
moltonel n00b

Joined: 31 Mar 2003 Posts: 30 Location: Ireland
|
Posted: Tue Dec 03, 2013 12:47 am Post subject: |
|
|
Does everybody seeing the problem use a hardened kernel ?
Does everybody seeing the problem see "gid=5" when running `mount | grep pts` instead of `grep pts /proc/mounts` ?
It seems there are a few cases when /proc/mounts doesn't show the gid option, but I do not know wether that's a bug or an expected behaviour. As for the ebuild, I wonder wether using the output of `mount` would be a) correct b) failsafe. |
|
| Back to top |
|
 |
drescherjm Advocate

Joined: 05 Jun 2004 Posts: 2770 Location: Pittsburgh, PA, USA
|
Posted: Tue Dec 03, 2013 12:56 am Post subject: |
|
|
I am not using a hardend kernel. I use gentoo-sources.
| Quote: | | Does everybody seeing the problem see "gid=5" when running `mount | grep pts` instead of `grep pts /proc/mounts` ? |
I did see that. _________________ John
My gentoo overlay
Instructons for overlay |
|
| Back to top |
|
 |
Silmano n00b


Joined: 10 Mar 2012 Posts: 49
|
Posted: Wed Dec 04, 2013 2:59 pm Post subject: |
|
|
| I had the same problem and I fixed it by commenting the /dev/pts fstab line and rebooting the computer. Once rebooted, I could update sys-libs/glibc without issues with the default USE flags. |
|
| Back to top |
|
 |
Slippery Jim Apprentice


Joined: 08 Jan 2005 Posts: 204
|
Posted: Fri Feb 14, 2014 5:45 pm Post subject: |
|
|
| Would it be better to give a warning, and let it build anyway? I might be building it without suid on a system running static-dev, but next time I reboot, I'll have udev running. Seems like a bug to me to have an ebuild depend on the current running state of the system, no? |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Fri Feb 14, 2014 11:22 pm Post subject: |
|
|
Sounds like /etc/mtab problem. Fix:
| Code: | | ln -sfn /proc/self/mounts /etc/mtab |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|