The public header installed as <linux/dtrace/stability.h> exposed
<linux/uidgid.h> to userspace as part of the dtrace_ppriv_t.dtpp_uid member.
This member (used for unprivileged tracing) is part of a facility that is not
yet ported, but using a kuid_t for this is clearly wrong, and as of kernel 4.0
won't compile when used in userspace either.
Fix by migrating to a uid_t and converting it to a kuid at the point of use.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
return 0;
if (((ppriv & ~match) & DTRACE_PRIV_OWNER) != 0 &&
- !uid_eq(uid, prp->dtpr_provider->dtpv_priv.dtpp_uid))
+ !uid_eq(uid, make_kuid(NULL, prp->dtpr_provider->dtpv_priv.dtpp_uid)))
return 0;
}
if (cr != NULL) {
provider->dtpv_priv.dtpp_uid =
- make_kuid(NULL, from_kuid(NULL, get_cred(cr)->uid));
+ from_kuid(NULL, get_cred(cr)->uid);
put_cred(cr);
}
* Use is subject to license terms.
*/
-#include <linux/uidgid.h>
#include <linux/dtrace/universal.h>
#include <linux/dtrace/stability_defines.h>
typedef struct dtrace_ppriv {
uint32_t dtpp_flags; /* privilege flags */
- kuid_t dtpp_uid; /* user ID */
+ uid_t dtpp_uid; /* user ID */
} dtrace_ppriv_t;
typedef struct dtrace_attribute {