Warning message

A translation for your language preference does not exist.

RHEL7.6: sudo'ing from confined user takes 25 seconds (d-bus timeout) then succeeds

Solution 確認済 - 更新日時 - 日本語 への翻訳依頼

環境

  • Red Hat Enterprise Linux 7.6
    • sudo
    • confined users with sudo privileges
    • selinux-policy < 3.13.1-229.el7_6.10

問題

  • sudo'ing from confined user (e.g. staff_u) takes 25 seconds (d-bus timeout) then succeeds

    $ id -Z
    staff_u:staff_r:staff_t:s0-s0:c0.c1023
    $ time sudo true
    real    0m25.106s
    user    0m0.013s
    sys 0m0.058s
    

解決策

  • Please update the selinux-policy packages to selinux-policy-3.13.1-229.el7_6.10 shipped with Advisory RHBA-2019:0811 or later

  • If this is not possible, consider applying the solution below

  • Create the custom SELinux module by creating the sudo-bz1687452.te file with following content

    module sudo-bz1687452 1.0;
    
    require {
        type systemd_logind_sessions_t;
        attribute sudodomain;
        class fifo_file write;
    }
    
    allow sudodomain systemd_logind_sessions_t:fifo_file write;
    
  • Compile the sudo-bz1687452 module

    # yum -y install selinux-policy-devel
    # make -f /usr/share/selinux/devel/Makefile sudo-bz1687452.pp
    
  • Install the sudo-bz1687452 module

    # semodule -i sudo-bz1687452.pp
    

原因

Previously sudodomain wasn't allowed to write to systemd_logind_sessions_t pipes and therefore d-bus timeout occurred.

このソリューションは、Red Hat のエンジニアがお客様のサポート中に作成したナレッジコンテンツの大型ライブラリーを提供する Fast-Track Publication Program の一環です。お客様が必要とする知識・情報を即時に提供するために、これらの記事は、未処理・未編集の状態で提示される場合がありますので、予めご了承ください。

コメント