drv_priv() provides a general interface to the system privilege policy. It determines whether the credentials supplied by the user credential structure pointed to by cr identify a privileged process. This function should only be used when file access modes and special minor device numbers are insufficient to provide protection for the requested driver function.
It is intended to replace all calls to suser() and any explicit checks for effective user ID = 0 in driver code.
|