*参照元 [#eae8e1c1] #backlinks *説明 [#ua2a71b2] -パス: [[linux-2.6.33/kernel/capability.c]] -FIXME: これは何? --説明 **引数 [#e08f67af] -int cap -- **返り値 [#v32fac15] -int -- **参考 [#i6b6a9c2] *実装 [#la0259fb] /** * capable - Determine if the current task has a superior capability in effect * @cap: The capability to be tested for * * Return true if the current task has the given superior capability currently * available for use, false if not. * * This sets PF_SUPERPRIV on the task if the capability is available on the * assumption that it's about to be used. */ int capable(int cap) { if (unlikely(!cap_valid(cap))) { printk(KERN_CRIT "capable() called with invalid cap=%u\n", cap); BUG(); } - -正しいケーパビリティが渡されていなければ BUG() でカーネルを止める。 --[[linux-2.6.33/unlikely()]] - --[[linux-2.6.33/cap_valid()]] - --[[linux-2.6.33/printk()]] - --[[linux-2.6.33/BUG()]] if (security_capable(cap) == 0) { current->flags |= PF_SUPERPRIV; return 1; } return 0; - --[[linux-2.6.33/security_capable()]] - --[[linux-2.6.33/PF_SUPERPRIV]] } EXPORT_SYMBOL(capable); -ライセンスを区別せずにシンボルを公開する。 --[[linux-2.6.33/EXPORT_SYMBOL()]] *コメント [#b9391c78]