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

libnss 模块相关问题

  •  
  •   KomeijiSatori ·
    AkiNazuki · Jan 12, 2023 · 1757 views
    This topic created in 1244 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   ·   Solana   ·   3191 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:02 · PVG 22:02 · LAX 07:02 · JFK 10:02
    ♥ Do have faith in what you're doing.