Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make the info returned by kqueue_stat() a little le...
details: https://anonhg.NetBSD.org/src/rev/6571f1fbdf48
branches: trunk
changeset: 1023863:6571f1fbdf48
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Sep 30 01:20:53 2021 +0000
description:
Make the info returned by kqueue_stat() a little less barren.
diffstat:
sys/kern/kern_event.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 8ede5452d8e4 -r 6571f1fbdf48 sys/kern/kern_event.c
--- a/sys/kern/kern_event.c Thu Sep 30 01:12:06 2021 +0000
+++ b/sys/kern/kern_event.c Thu Sep 30 01:20:53 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_event.c,v 1.127 2021/09/30 01:12:06 thorpej Exp $ */
+/* $NetBSD: kern_event.c,v 1.128 2021/09/30 01:20:53 thorpej Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.127 2021/09/30 01:12:06 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.128 2021/09/30 01:20:53 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1755,7 +1755,10 @@
memset(st, 0, sizeof(*st));
st->st_size = KQ_COUNT(kq);
st->st_blksize = sizeof(struct kevent);
- st->st_mode = S_IFIFO;
+ st->st_mode = S_IFIFO | S_IRUSR | S_IWUSR;
+ st->st_blocks = 1;
+ st->st_uid = kauth_cred_geteuid(fp->f_cred);
+ st->st_gid = kauth_cred_getegid(fp->f_cred);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index