]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/kern_xxx.c
xnu-517.9.4.tar.gz
[apple/xnu.git] / bsd / kern / kern_xxx.c
index 7da98c9eecd9330e67aa5d4ac2a740df9009b932..ebc0af4469ee06fb93ce8aa3d4765528e2982503 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -66,6 +66,8 @@
 #include <sys/sysctl.h>
 #include <sys/buf.h>
 
+#include <bsm/audit_kernel.h>
+
 #include <sys/mount.h>
 
 #if COMPAT_43
@@ -115,8 +117,7 @@ register_t *retval;
 
        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 {
@@ -195,14 +196,15 @@ register_t *retval;
        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);