Check for probes enabled in priv_check_cred before evaluting the error.
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
c3efee6ed9
commit
3e0178fb94
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342264
@ -194,10 +194,12 @@ priv_check_cred(struct ucred *cred, int priv)
|
||||
*/
|
||||
error = EPERM;
|
||||
out:
|
||||
if (error)
|
||||
SDT_PROBE1(priv, kernel, priv_check, priv__err, priv);
|
||||
else
|
||||
SDT_PROBE1(priv, kernel, priv_check, priv__ok, priv);
|
||||
if (SDT_PROBES_ENABLED()) {
|
||||
if (error)
|
||||
SDT_PROBE1(priv, kernel, priv_check, priv__err, priv);
|
||||
else
|
||||
SDT_PROBE1(priv, kernel, priv_check, priv__ok, priv);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user