[uClibc]Patch to Unix98 PTY support

Brian Stafford brian at stafford.uklinux.net
Fri Jan 11 13:19:22 UTC 2002


Hi all,

Having set up a kernel with devfs using Unix98 PTYs exclusively I started to 
get problems with some programs that use PTYs.

Basically, the code in uClibc still has support for legacy PTYs including all 
the crud for guessing what their names might be and exec ing a setuid program 
to change their permissions.

The attached patch can be applied to eliminate this legacy code.  It adds two 
configuration variables to the top level Makefile.  Add the following lines to 
Config to set their values.

=====
# If you want to support only Unix 98 PTYs enable this.  This is off by
# default.
UNIX98PTY_ONLY = true

# Enable this if /dev/pts is on a devpts or devfs file system.  Both these
# filesystems automatically manage permissions on the /dev/pts/nn devices.
# This is off by default.
ASSUME_DEVPTS = true

=====

Setting UNIX98PTY_ONLY to true eliminates the legacy PTY code.  Setting 
ASSUME_DEVPTS eliminates the code which uses the setuid helper program.

I have used this code for the last month or so without problems.

Cheers
Brian Stafford
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.unix98pty
Type: application/octet-stream
Size: 9920 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20020111/c8e12b38/attachment.obj 


More information about the uClibc mailing list