> But this is not how authorization with polkit works (or anything > similar to polkit). The authorization-framework is totally separated
Thats a detail which is changeable > from the client that accesses a service. The client asks a service > provider to perform an action. The service provider then asks the > authorization-framework, whether the client is authorized to run the > action. This is not good design IMHO. The client should always be indicating it intends to pass on the credentials it has. That stops privileges leaking or programs being tricked into things. > The authorization-framework is explicitly separated from > credential-passing. It has a separate configuration that is neither > controlled by the client nor the service-provider (the default is > usually provided by the latter, though). Therefore, credentials that > are passed are not associated with an action, but rather with the > identity of the client. If a client does not want to run an operation > as its current identity, it better does not call it. You still want such a usage to involve a client sending a message flag which says "and this message is an authority to use the following credential". Given the daemon the other end already has the rights to perform the action the daemon can presumably be trusted to remember to check. > Without LSM, we don't have such a unique identifier. Therefore, we > send the UIDs+GIDs+CAPs+NAMEs combination. Those we pass on to the > authorization framework, to decide on whether the peer is privileged. > And we believe those should be mandatory, not optional, just like the > seclabel we send if an LSM is active. The mashed up caps and names really ought to be replaced by something better. Especially the names. Would it make sense to put some kind of security label on the executable and pass that instead ? So instead of all the caps and names crap you label the executable itself as having "kbus:awesomerebootpower" or whatever so the kernel can see that cleanly as a label that's basically a kbus namespace capability ? Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/