netlink: add public ucred accessor for nlp.
MFC after: 2 weeks
This commit is contained in:
parent
568a645ba5
commit
046acc2bfd
@ -80,6 +80,7 @@ bool netlink_unregister_proto(int proto);
|
||||
/* Common helpers */
|
||||
bool nl_has_listeners(int netlink_family, uint32_t groups_mask);
|
||||
bool nlp_has_priv(struct nlpcb *nlp, int priv);
|
||||
struct ucred *nlp_get_cred(struct nlpcb *nlp);
|
||||
|
||||
/* netlink_generic.c */
|
||||
struct genl_cmd {
|
||||
|
@ -212,6 +212,12 @@ nlp_has_priv(struct nlpcb *nlp, int priv)
|
||||
return (priv_check_cred(nlp->nl_cred, priv) == 0);
|
||||
}
|
||||
|
||||
struct ucred *
|
||||
nlp_get_cred(struct nlpcb *nlp)
|
||||
{
|
||||
return (nlp->nl_cred);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
nl_find_port(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user