From: Alan C. <al...@lx...> - 2005-06-20 18:55:54
|
On Sad, 2005-06-18 at 16:54, Jon Smirl wrote: > How about this as a safe first step: > 1) Remove the general root capability check > 2) Change the semantics of the root_only field on these calls to mean > master only. > 3) Push the root capability check into each of these IOCTL individually. > 4) Leave a root capability check on the general switch code to per > device IOCTLs if they are marked master only. This sounds like a way to make mistakes. Far better is to make the check a set of flags where 0/1 happen to keep their meaning ie #define DRM_NEED_ROOT 1 #define DRM_NEED_MASTER 2 now anything you miss/forget to touch won't go off in your hand so to speak. |