V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zxCoder
V2EX  ›  问与答

Linux c 语言 setgid 和 setgroups 的区别

  •  
  •   zxCoder · Oct 7, 2020 · 1584 views
    This topic created in 2041 days ago, the information mentioned may be changed or developed.

    setgid 的说明是 This function sets both the real and effective group ID of the process to newgid

    setgroups 的说明是 This function sets the process’s supplementary group IDs.

    请问区别是什么

    3 replies    2020-10-09 10:08:23 +08:00
    julyclyde
        2
    julyclyde  
       Oct 8, 2020
    关键在于 supplementary 这个词啊
    zxCoder
        3
    zxCoder  
    OP
       Oct 9, 2020
    @julyclyde 应该怎么理解这个 supplementary group 呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3067 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:54 · PVG 20:54 · LAX 05:54 · JFK 08:54
    ♥ Do have faith in what you're doing.