diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-23 08:08:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-23 08:08:00 +0000 |
commit | b7b4f77bc6172d59099cb9ed961b8e75d4d77578 (patch) | |
tree | fa714f81b0fc9b35bd795b3ade0df046bb0055f3 /sys/crypto/cryptodev.c | |
parent | d608a406ad888667fc641515506ae0cad05f987c (diff) |
sysctl kern.usercrypto
Diffstat (limited to 'sys/crypto/cryptodev.c')
-rw-r--r-- | sys/crypto/cryptodev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c index 3c2ac1f87a1..ee1073fb375 100644 --- a/sys/crypto/cryptodev.c +++ b/sys/crypto/cryptodev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.c,v 1.29 2002/02/08 13:53:28 art Exp $ */ +/* $OpenBSD: cryptodev.c,v 1.30 2002/02/23 08:07:59 deraadt Exp $ */ /* * Copyright (c) 2001 Theo de Raadt @@ -112,6 +112,8 @@ int csefree(struct csession *); int crypto_op(struct csession *, struct crypt_op *, struct proc *); +int usercrypto = 1; /* userland may do crypto requests */ + /* ARGSUSED */ int cryptof_read(fp, poff, uio, cred) @@ -490,6 +492,8 @@ cryptoopen(dev, flag, mode, p) int mode; struct proc *p; { + if (usercrypto == 0) + return (ENXIO); return (0); } |