+ message[0] = '\0';
+
+ if ((error = suser(kauth_cred_get(), &p->p_acflag))) {
+#if (DEVELOPMENT || DEBUG)
+ if (uap->opt & RB_PANIC) {
+ /* clear 'error' to allow non-root users to call panic on dev/debug kernels */
+ error = 0;
+ } else {
+ return error;
+ }
+#else
+ return error;
+#endif
+ }
+
+ if (uap->opt & RB_PANIC && uap->msg != USER_ADDR_NULL) {
+ if (copyinstr(uap->msg, (void *)message, sizeof(message), (size_t *)&dummy)) {
+ strncpy(message, "user space RB_PANIC message copyin failed", sizeof(message) - 1);
+ }
+ }