+ case KERN_COREFILE:
+ error = sysctl_string(oldp, oldlenp, newp, newlen,
+ corefilename, sizeof(corefilename));
+ return (error);
+ case KERN_COREDUMP:
+ tmp = do_coredump;
+ error = sysctl_int(oldp, oldlenp, newp, newlen, &do_coredump);
+ if (!error && (do_coredump < 0) || (do_coredump > 1)) {
+ do_coredump = tmp;
+ error = EINVAL;
+ }
+ return (error);
+ case KERN_SUGID_COREDUMP:
+ tmp = sugid_coredump;
+ error = sysctl_int(oldp, oldlenp, newp, newlen, &sugid_coredump);
+ if (!error && (sugid_coredump < 0) || (sugid_coredump > 1)) {
+ sugid_coredump = tmp;
+ error = EINVAL;
+ }
+ return (error);