diff options
| author | 2003-06-10 18:34:51 +0000 | |
|---|---|---|
| committer | 2003-06-10 18:34:51 +0000 | |
| commit | 9b1dcadeb080ab60dc8d1fb7e6c64b0f2e154491 (patch) | |
| tree | 84c93c4056ebd94c84a4eeb4210e66425a1254fe /sys/crypto/cryptodev.c | |
| parent | add missing copyright notice (diff) | |
| download | wireguard-openbsd-9b1dcadeb080ab60dc8d1fb7e6c64b0f2e154491.tar.xz wireguard-openbsd-9b1dcadeb080ab60dc8d1fb7e6c64b0f2e154491.zip | |
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/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 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 |
