Andrew,
Thanks for your comments.
Andrew G. Morgan wrote:
cap_set_flag() and cap_from_text() checks whether required capability
code is in between 0 and __CAP_BITS, or not.
I don't think it works correctly. Is it necessary to obtain this bound
dynamically?
> Further, if anyone ever wants to translate the capabilities into another
> language, it seems like user-space is a much better place for that than
> in the kernel.
Are you intend to translate "cap_net_admin" into native language
representation, for example?
I want to see how Chinese represents it :), but I think it is different
issue with kernel dose not expose its suporing capabilities.
When this patch cannot access /sys, it does not provide dynamically
collected code/name pairs, and it works with statically constructed
table as current libcap doing.
The patched libcap never switch to the dynamic table without successes
in all steps of initialization. Thus, there is no major regression on
this facilitiy.
Hmm, you are correct. Indeed, applications using capabilities have to
be built with the new libcap which provides fresh sys/capabilitity.h.
It is like a chicken and egg argument.
However, all applications are always built on its running environment,
like RPM packages. These can be delivered as pre-built packages.
I think optional configuration file is not a good idea.
It can make unneeded confusion.
If necessary, I'll move this features into security/capability.c and
add a Kconfig option to select it.
Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>
--