On my Fedora11Beta box, the grantpt() does can not be used for devpts. In RHEL system, the /etc/fstab has this configure, it has no problem. devpts /dev/pts devpts gid=5,mode=620 0 0 But in Fedora11Beta this line changed to: devpts /dev/pts devpts defaults 0 0 I looked into the kernel source, the mode of devpts has the default value of 600, not 620. So, does not change the mode of devpts is not correct. This is found by LTP - testcases/kernel/pty/pty01.c
Created attachment 3942 [details] patch for glibc
I had look the manpage of grantpt(): #man 3 grantpt DESCRIPTION The grantpt() function changes the mode and owner of the slave pseudo-terminal device (pty) corresponding to the master pty referred to by fd. The user ID of the slave is set to the real UID of the calling process. The group ID is set to an unspecified value (e.g. tty). The mode of the slave is set to 0620 (crw--w----). So there is no reason for glibc does not change the mode of devpts, since the default mode of devpts is 600. Isn't it?
The patch is hurting correctly configured systems. I've checked in a different patch.