summaryrefslogtreecommitdiffstats
path: root/sys/security/audit/audit_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/security/audit/audit_pipe.c')
-rw-r--r--sys/security/audit/audit_pipe.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/security/audit/audit_pipe.c b/sys/security/audit/audit_pipe.c
index dc0df3e..b291975 100644
--- a/sys/security/audit/audit_pipe.c
+++ b/sys/security/audit/audit_pipe.c
@@ -672,14 +672,9 @@ audit_pipe_clone(void *arg, struct ucred *cred, char *name, int namelen,
return;
i = clone_create(&audit_pipe_clones, &audit_pipe_cdevsw, &u, dev, 0);
- if (i) {
- *dev = make_dev(&audit_pipe_cdevsw, u, UID_ROOT,
- GID_WHEEL, 0600, "%s%d", AUDIT_PIPE_NAME, u);
- if (*dev != NULL) {
- dev_ref(*dev);
- (*dev)->si_flags |= SI_CHEAPCLONE;
- }
- }
+ if (i)
+ *dev = make_dev_credf(MAKEDEV_REF, &audit_pipe_cdevsw, u, cred,
+ UID_ROOT, GID_WHEEL, 0600, "%s%d", AUDIT_PIPE_NAME, u);
}
/*
OpenPOWER on IntegriCloud