This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tuesday 11 October 2011 13:15:37 Serge E. Hallyn wrote: > grantpt, ptsname, and ptsname_r make use of _ptsname_internal(). That > function works by appending the TIOCGPTN result to "/dev/pts". The > path /dev/pts is hardcoded. That means that if you call grantpt on an > fd from /chroot/dev/pts, and /dev/pts/0 (for instance) does not exist > on the host, you'll (wrongly) get back an error. This has been seen with > libvirt (and is easly to verify with a simple testcase). `mount --bind /dev/pts /chroot/dev/pts` ? > I'm not sure of the best way to fix this in a way palatable to glibc. > Follow the /proc/self/fd/N symlink? Update the manpages to say the > devpts used must be mounted under /dev/pts by the caller? (Caller would > need privilege, but can fork+unshare+bind-mount). doesn't the caller already need privs to chroot in the first place ? it's been this way for years which means i would have expected all relevant code to have accounted for this already (not saying that it wouldn't be nice to have things "just work" when possible) ... -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |