Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • fs
  • devpts
  • inode.c
Find file BlameHistoryPermalink
  • Eric W. Biederman's avatar
    devpts: Change the owner of /dev/pts/ptmx to the mounter of /dev/pts · e98d4137
    Eric W. Biederman authored Sep 14, 2016
    
    
    In 99.99% of the cases only root in a user namespace can mount /dev/pts
    and in those cases the owner of /dev/pts/ptmx will remain root.root
    
    In the oddball case where someone else has CAP_SYS_ADMIN this code
    modifies the /dev/pts mount code to use current_fsuid and current_fsgid
    as the values to use when creating the /dev/ptmx inode.  As is done
    when any other file is created.
    
    This is a code simplification, and it allows running without a root
    user entirely.
    
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e98d4137
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7