Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
KomeijiSatori
V2EX  ›  Linux

libnss 模块相关问题

  •  
  •   KomeijiSatori ·
    AkiNazuki · Jan 12, 2023 · 1954 views
    This topic created in 1359 days ago, the information mentioned may be changed or developed.

    在 libnss 中实现 getspent() 和 getspnam() 接口只需要确认 geteuid() == 0 就可以将 shadow 信息返回给调用者了吗? 需不需要做一些额外的验证?

    2 replies  •  2023-01-12 15:53:00 +08:00
    julyclyde
        1
    julyclyde  
       Jan 12, 2023
    shadow 内容是加密的,无所谓的
    tomychen
        2
    tomychen  
       Jan 12, 2023
    有什么问题吗?

    你是 root 的状态下,不也一样可以妥妥的
    cat /etc/shadow
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2186 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 16:10 · PVG 00:10 · LAX 09:10 · JFK 12:10
    ♥ Do have faith in what you're doing.