/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#include <sys/sysctl.h>
#include <sys/buf.h>
+#include <bsm/audit_kernel.h>
+
#include <sys/mount.h>
#if COMPAT_43
name = KERN_HOSTNAME;
- return (kern_sysctl(&name, 1, uap->hostname, &uap->len),
- 0, 0);
+ return (kern_sysctl(&name, 1, uap->hostname, &uap->len, 0, 0));
}
struct osethostname_args {
int error;
int dummy=0;
+ AUDIT_ARG(cmd, uap->opt);
command[0] = '\0';
if (error = suser(p->p_cred->pc_ucred, &p->p_acflag))
return(error);
if (uap->opt & RB_COMMAND)
- error = copyinstr(uap->command,
- command, sizeof(command), &dummy);
+ error = copyinstr((void *)uap->command,
+ (void *)command, sizeof(command), (size_t *)&dummy);
if (!error) {
SET(p->p_flag, P_REBOOT); /* No more signals for this proc */
boot(RB_BOOT, uap->opt, command);