James Morris wrote:
On Fri, 28 Dec 2007, KaiGai Kohei wrote:

Remaining issues:
- We have to mount securityfs explicitly, or use /etc/fstab.
  It can cause a matter when we want to use this feature on
  very early phase on boot. (like /sbin/init)

Why can't early userspace itself mount securityfs?

Hmm,,,
It might be possible as load_policy() doing, if necessary.
Please forget the previous my opinion.

I'm not even sure this is a good idea at all. Existing capabilities will never disappear, and, as with syscalls, it's probably up to userland to handle new ones not existing.

When we use libcap built on older kernel for newer kernel, libcap cannot
handle newly added capabilities, because it is not exist on the build 
environment.
Therefore, any available capabilities should be exported dynamically by the 
kernel.

In any case, some more technical issues:

kernel/cap_names.sh generates the body of cap_entries[] array,

This needs to be in the scripts directory.

OK, it will be moved.

The generated header should be made idempotent (#ifdef wrapping), and also include a warning that it is automatically generated (identifying the script which does so), and that is should not be edited.

+       d_caps = securityfs_create_dir("capability", NULL);
+       if (!d_caps)

Wrong way to check for error -- the function returns an ERR_PTR().

+               f_caps[i] = securityfs_create_file(cap_entries[i].name, 0444,
+                                                  d_caps, &cap_entries[i],
+                                                  &cap_entry_fops);
+               if (!f_caps[i])

Ditto.

OK,

Another issue is that securityfs depends on CONFIG_SECURITY, which might be undesirable, given that capabilities are a standard feature.

We can implement this feature on another pseudo filesystems.
Do you think what filesystem is the best candidate?
I prefer procfs or sysfs instead.

Thanks,
--
KaiGai Kohei <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe 
linux-security-module" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to