libcap パッケージは LFS においてインストール済です。 しかし Linux-PAM サポートが必要となる場合は、(Linux-PAM をインストールした後に) PAM モジュールを生成する必要があります。
本パッケージは LFS-10.0 において正しくビルドでき動作することが確認されています。
ダウンロード (HTTP): https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.46.tar.xz
ダウンロード MD5 sum: 58ffae7d6a3226d6648cdb5d6f389cbf
ダウンロードサイズ: 128 KB
必要ディスク容量: 1.3 MB
概算ビルド時間: 0.1 SBU 以下
If you are upgrading libcap from a previous version, use the instructions in LFS libcap page to upgrade libcap. If Linux-PAM-1.5.1 has been built, the PAM module will automatically be built too.
以下のコマンドを実行して libcap をビルドします。
make -C pam_cap
このパッケージにテストスイートはありません。
root
ユーザーになって以下を実行します。
install -v -m755 pam_cap/pam_cap.so /lib/security && install -v -m644 pam_cap/capability.conf /etc/security
In order to allow Linux-PAM to
grant privileges based on POSIX capabilites, you need to add the
libcap module to the begining of the /etc/pam.d/system-auth
file. Make the required
edits with the following commands:
mv -v /etc/pam.d/system-auth{,.bak} &&
cat > /etc/pam.d/system-auth << "EOF" &&
# Begin /etc/pam.d/system-auth
auth optional pam_cap.so
EOF
tail -n +3 /etc/pam.d/system-auth.bak >> /etc/pam.d/system-auth
Additonally, you'll need to modify the /etc/security/capability.conf
file to grant
necessary privileges to users, and utilize the setcap utility to set
capabilities on specific utilities as needed. See man 8 setcap and man 3 cap_from_text for
additional information.
最終更新日: 2020-12-16 08:23:24 +0900