[lkml]   [2017]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Hard-coding PTY device node numbers in userspace
On Fri, Feb 17, 2017 at 12:02:52PM +0100, Florian Weimer wrote:
> We want to reject PTY devices from other namespaces as valid input to
> the ttyname and ttyname_r functions, while still providing a hint to
> callers that the device is, in fact, a PTY. Christian Brauner wrote a
> glibc patch for this:
> <>
> It hard-codes the major PTY device number range. Is this feasible?
> Is it part of the stable userspace ABI for the TTY subsystem?

What major numbers are you using in the patch '2' and '3'? And yes,
major numbers are static and you should be fine to rely on them. But
can't you test that the device is a pty to verify it?


greg k-h

 \ /
  Last update: 2017-02-17 19:17    [W:0.038 / U:0.112 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site