diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-16 11:39:17 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-16 11:39:17 +0000 |
| commit | 0559b739d2fd3eb5e797974979f949c656094fa8 (patch) | |
| tree | f466cbe632d77a73dbeca9fb2a5bf963cb9d211f /test | |
| parent | e3e35378d22126aa3c470e23f44a0dab08c8b7ae (diff) | |
| download | ruby-0559b739d2fd3eb5e797974979f949c656094fa8.tar.gz ruby-0559b739d2fd3eb5e797974979f949c656094fa8.tar.xz ruby-0559b739d2fd3eb5e797974979f949c656094fa8.zip | |
* ext/pty/pty.c (getDevice): add nomesg argument.
(get_device_once): add nomesg argument. chmod slave tty to 0600
if nomesg. more error tests.
(no_mesg): new function.
(pty_open): make slave tty's mode 0600.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_pty.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/test/test_pty.rb b/test/test_pty.rb index 704861dd3..76986764c 100644 --- a/test/test_pty.rb +++ b/test/test_pty.rb @@ -99,23 +99,11 @@ class TestPTY < Test::Unit::TestCase end def test_stat_slave - # If grantpt is used, the slave device is changed as follows. - # owner: real UID - # group: an unspecified value (e.g. tty) - # mode: 0620 (rw--w----) - # - # The group is not testable because unspecified. - # - # The mode is testable but the condition is relaxed because other - # pty functions (openpty, _getpty, etc.) may not use 0620. - # But no one can read from the tty, I hope (for security reason). - # PTY.open {|master, slave| s = File.stat(slave.path) assert_equal(Process.uid, s.uid) - assert_equal(0600, s.mode & 0755) + assert_equal(0600, s.mode & 0777) } end - end if defined? PTY |
