summaryrefslogtreecommitdiff
path: root/sys/crypto
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-06-10 18:34:52 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-06-10 18:34:52 +0000
commit5a073e8819d1913bd5fb1d7b2290df0178e546bc (patch)
tree0fa122f5c84424012839f3c70e6f2756a67185c6 /sys/crypto
parent5201962e8c283d90387e695098c77af96ab4baf6 (diff)
don't allow /dev/crypto to be opened ifndef CRYPTO (the thread hasn't been
started, so all operations will hang later on anyway).
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/cryptodev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c
index 94442dbf969..001edcf5fe8 100644
--- a/sys/crypto/cryptodev.c
+++ b/sys/crypto/cryptodev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptodev.c,v 1.58 2003/06/03 15:51:28 deraadt Exp $ */
+/* $OpenBSD: cryptodev.c,v 1.59 2003/06/10 18:34:51 jason Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -630,7 +630,11 @@ cryptoopen(dev_t dev, int flag, int mode, struct proc *p)
{
if (usercrypto == 0)
return (ENXIO);
+#ifdef CRYPTO
return (0);
+#else
+ return (ENXIO);
+#endif
}
int