DragonFly-2.3.1.276.gcd6536 master sys/kern kern_conf.c tty_pty.

看板DFBSD_commit作者時間16年前 (2009/06/16 06:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit cd65363eb9593c640d85e4915d214051aa5bc5f2 Author: Matthew Dillon <dillon@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@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
文章代碼(AID): #1ADiId00 (DFBSD_commit)