#include <sys/proc.h>
#include <sys/kauth.h>
+#include <machine/smp.h>
#include <mach/mach_types.h>
#include <kern/kern_types.h>
#include <kern/assert.h>
#include <kern/kalloc.h>
#include <sys/vnode_internal.h>
+#if CONFIG_MACF
+#include <security/mac_framework.h>
+#endif
+
/* XXX should be in a header file somewhere */
void evsofree(struct socket *);
void evpipefree(struct pipe *);
__private_extern__ int preparefileread(struct proc *p, struct fileproc **fp_ret, int fd, int check_for_vnode);
__private_extern__ void donefileread(struct proc *p, struct fileproc *fp_ret, int fd);
-
/* Conflict wait queue for when selects collide (opaque type) */
struct waitq select_conflict_queue;
boolean_t is64bit = FALSE;
int tmp = 0;
#define STK_PARAMS 128
- char stkbuf[STK_PARAMS];
+ char stkbuf[STK_PARAMS] = {};
int fd = uap->fd;
u_long com = uap->com;
struct vfs_context context = *vfs_context_current();
__darwin_uuid_t uuid_kern; /* for IOKit call */
if (!uap->spi) {
+#if CONFIG_EMBEDDED
+#if CONFIG_MACF
+ if ((error = mac_system_check_info(kauth_cred_get(), "hw.uuid")) != 0) {
+ /* EPERM invokes userspace upcall if present */
+ return (error);
+ }
+#endif
+#endif
}
/* Convert the 32/64 bit timespec into a mach_timespec_t */
return (error);
}
-#if defined(DEVELOPMENT) || defined(DEBUG)
+#if DEVELOPMENT || DEBUG
#if CONFIG_WAITQ_DEBUG
static uint64_t g_wqset_num = 0;
struct g_wqset {
0, 0, sysctl_wqset_clear_preposts, "Q", "clear preposts on given waitq set");
#endif /* CONFIG_WAITQ_DEBUG */
-#endif /* defined(DEVELOPMENT) || defined(DEBUG) */
+#endif /* DEVELOPMENT || DEBUG */
+
+