-/* $OpenBSD: kern_sysctl.c,v 1.305 2016/05/27 19:45:04 deraadt Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.306 2016/07/14 15:39:40 deraadt Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
int error, level, inthostid, stackgap;
dev_t dev;
extern int somaxconn, sominconn;
- extern int usermount, nosuidcoredump;
+ extern int nosuidcoredump;
extern int maxlocksperuid;
extern int pool_debug;
extern int uvm_wxabort;
return (sysctl_int(oldp, oldlenp, newp, newlen, &somaxconn));
case KERN_SOMINCONN:
return (sysctl_int(oldp, oldlenp, newp, newlen, &sominconn));
- case KERN_USERMOUNT:
- return (sysctl_int(oldp, oldlenp, newp, newlen, &usermount));
+ case KERN_USERMOUNT: {
+ int usermount = 0;
+ return (sysctl_rdint(oldp, oldlenp, newp, usermount));
+ }
case KERN_ARND: {
char buf[512];
-/* $OpenBSD: vfs_syscalls.c,v 1.262 2016/07/12 20:53:04 millert Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.263 2016/07/14 15:39:40 deraadt Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
#include <sys/syscallargs.h>
extern int suid_clear;
-int usermount = 0; /* sysctl: by default, users may not mount */
static int change_dir(struct nameidata *, struct proc *);
struct vfsconf *vfsp;
int flags = SCARG(uap, flags);
- if (usermount == 0 && (error = suser(p, 0)))
+ if ((error = suser(p, 0)))
return (error);
/*