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
  • kernel
  • capability.c
Find file BlameHistoryPermalink
  • Serge Hallyn's avatar
    [PATCH] capset returns -EPERM when pid==current->pid · 5d4e5137
    Serge Hallyn authored Jan 04, 2005
    
    
    In the current kernel/capability.c:sys_capset() code, permission is
    denied if CAP_SETPCAP is not held and pid is positive.  pid=0 means use
    the current process, and this is allowed.  But using the current
    process' pid is not allowed.  The man page for capsetp simply says that
    CAP_SETPCAP is required to use this function, and does not mention the
    exception for pid=0. 
    
    The current behavior seems inconsistent.  The attached patch also
    allows a process to call capset() on itself.
    
    Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    5d4e5137
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7