1PT_CHOWN(5) GNU C Library PT_CHOWN(5)
2
3
4
6 pt_chown - helper function for grantpt(3), changes ownship and permis‐
7 sions of pseudotty
8
10 /usr/lib/pt_chown
11
12
14 pt_chown is the helper program for the 'grantpt' function. It is not
15 intended to be run directly from the command line. pt_chown sets the
16 owner, group and access permission of the slave pseudo terminal corre‐
17 sponding to the master pseudo terminal passed on file descriptor so
18 that the pseudo terminal can be used by the calling process. This means
19 programs like 'xterm' and 'screen' do not have to be setuid to get a
20 pty. (There may be other reasons why they need privileges.) If you are
21 using a 2.1 or newer Linux kernel with the 'devptsfs' or `devfs'
22 filesystems providing pty slaves, you don't need this program; other‐
23 wise you do. The source for 'pt_chown' is in 'login/pro‐
24 grams/pt_chown.c'.
25
26 It is installed setuid root.
27
28
30 pt_chown takes no arguments.
31
32
34 pt_chown has the following return codes:
35
36 EBADF The file descriptor is not a valid master pseudo terminal.
37
38
39 EINVAL The device is not a character device.
40
41
42 EACCES Can't change device owner and group or device permissions.
43
44
45 0 The owner, group, and permissions were successfully changed.
46
47
49 Report bugs using the glibcbug script to bugs@gnu.org
50
51
53 grantpt(3)
54
55
56
57
58PTY Control 2003-03-21 PT_CHOWN(5)