ボトルキャップの交換

ボトルキャップの交換

/proc/sys/kernel/cap-bound私たちのシステムの1つは、システムの機能を制限するために古いキャッピングメカニズム(修正)を使用する古いLinuxカーネルを使用しています。これは起動時にファイルを介してrc.linux行われます。

バラよりhttp://man7.org/linux/man-pages/man7/capability.7.html

私たちはカーネルを更新しており、この機能はもう存在しなくなりましたが、これまで新しいカーネルでこの機能をエミュレートする方法が見つかりませんでした。

それでは、キャッピングメカニズムに代わるものは何ですか?

ベストアンサー1

マニュアルから:

       P'(ambient)     = (file is privileged) ? 0 : P(ambient)

プロセスが親プロセスから権限を取得することが可能です。

       P'(permitted)   = (P(inheritable) & F(inheritable)) |
                         (F(permitted) & cap_bset) | P'(ambient)

継承可能なセットにこれらの権限がある場合、またはcap_bsetにこれらの権限がある場合、プロセスはファイルから権限を取得できます。

       P'(effective)   = F(effective) ? P'(permitted) : P'(ambient)

       P'(inheritable) = P(inheritable)    [i.e., unchanged]

親から継承セットを取得します。

   where:

       P         denotes the value of a thread capability set before the
                 execve(2)

       P'        denotes the value of a thread capability set after the
                 execve(2)

       F         denotes a file capability set

       cap_bset  is the value of the capability bounding set (described
                 below).


   Note that the bounding set masks the file permitted capabilities, but
   not the inheritable capabilities.  If a thread maintains a capability
   in its inheritable set that is not in its bounding set, then it can
   still gain that capability in its permitted set by executing a file
   that has the capability in its inheritable set.

inheritableコレクションからも削除する必要があります。

したがって、ルートプロセス()から権限を削除します。init、およびから権限を削除します。cap_bsetinheritablepermittedeffective

おすすめ記事