DragonFly-2.3.1.276.gcd6536 master sys/kern kern_conf.c tty_pty.c vfs_helper.c sys/sys conf.h sys/vfs/hammer hammer_vnops.c sys/vfs/specfs spec_vnops.c sys/vfs/ufs ufs_vnops.c

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Jun 15 14:52:26 PDT 2009


commit cd65363eb9593c640d85e4915d214051aa5bc5f2
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Jun 15 14:50:06 2009 -0700

    Set tty ownership on pty open (temporary until devfs is integrated)
    
    Fix a very long standing issue when opening new pty's as non-root.  The
    related tty could not be chowned/chmoded in that case, giving any user
    in the system access to the pty.
    
    This would not effect programs like sshd which set up the pty as root, but
    it did effect programs like xterm which do not run suid-root.
    
    This is strictly a temporary fix until devfs can be integrated into the
    system.  Basically we allow the uid stored in the cdev_t structure to
    override the uid returned by VOP_GETATTR for VCHR devices, and the chmod
    helper function checks the uid stored in the cdev_t structure for
    compatibility.
    
    Reported-by: Hasso Tepper <hasso at estpak.ee>, Numerous others

Summary of changes:
 sys/kern/kern_conf.c          |    1 +
 sys/kern/tty_pty.c            |    2 ++
 sys/kern/vfs_helper.c         |   23 +++++++++++++++++++++++
 sys/sys/conf.h                |    5 +++++
 sys/vfs/hammer/hammer_vnops.c |   20 +++++++++++++++++++-
 sys/vfs/specfs/spec_vnops.c   |   33 +++++++++++++++++++++++++++++++++
 sys/vfs/ufs/ufs_vnops.c       |   29 ++++++++++++++++++++++++++---
 7 files changed, 109 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cd65363eb9593c640d85e4915d214051aa5bc5f2


-- 
DragonFly BSD source repository





More information about the Commits mailing list