Bryan Kadzban wrote: > Bruce Dubbs wrote: >> Bryan Kadzban wrote: >> >>> But maybe something else changed. What happens if you: >> >>> ls /dev/pts >>> <note the files present> >>> ./testpts >> >> At this point as user nobody (in chroot), I get: >> >> nobody:/tmp$ ./testpt >> posix_openpt succeeded >> grantpt: Operation not permitted > > That's not right. :-) > > What happens if you try to ls -l the new slave char device? > > ls -l /dev/pts > (ls -l /dev/pts) </dev/ptmx > > The latter should show one more device than the former; the owner, > group, and permissions on that should be you, tty, and 0620, otherwise > (IIRC) pt_chown is necessary. (I should probably go dig through the > glibc sources for grantpt() to find out for sure though.) > > ...Wait, this might be the issue. chapter06/kernfs.html says: > > mount -vt devpts devpts $LFS/dev/pts > > but my fstab has: > > devpts /dev/pts devpts gid=4,mode=620 0 0 > > The mount probably needs -o gid=4,mode=620 added. If you add that, do > both the tests start working?
You really need to keep up to date a little more. We changed tty to gid 5 quite a while ago (April 2012). In any case, remounting /dev/pts with the proper options did work for ./testpt. Rerunning the util-linux tests with the /dev/pts mounted with the proper options did indeed allow the non-root tests to pass. > ...And now that I say that, I think I have a change hanging around in my > local svn repo that I never submitted, that adds this to this chapter 6 > mount command. If it fixes this, I should probably submit it. I'll go ahead and make the change to the book. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page