diff options
| author | Andrey Sokolov <keremet@solaris.kirov.ru> | 2016-03-10 22:31:08 +0300 |
|---|---|---|
| committer | Dan McDonald <danmcd@omniti.com> | 2016-03-13 14:15:51 -0400 |
| commit | a1b1a2a0aac3d3c0533efa646a9d7a7dca91fc7c (patch) | |
| tree | f0d96fefa3fe0b3cf47428d72d4f1a936a016653 /usr/src/uts/common | |
| parent | 3b4315d3f6ce29d16d3f8e2c62b2f9c24192c3a8 (diff) | |
| download | illumos-joyent-a1b1a2a0aac3d3c0533efa646a9d7a7dca91fc7c.tar.gz | |
5857 lofiadm should ask passphrase once if the crypto is already set up
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/uts/common')
| -rw-r--r-- | usr/src/uts/common/io/lofi.c | 10 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/lofi.h | 13 |
2 files changed, 13 insertions, 10 deletions
diff --git a/usr/src/uts/common/io/lofi.c b/usr/src/uts/common/io/lofi.c index 9f390dc939..e11f910a91 100644 --- a/usr/src/uts/common/io/lofi.c +++ b/usr/src/uts/common/io/lofi.c @@ -22,6 +22,7 @@ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2016 Andrey Sokolov */ /* @@ -132,15 +133,6 @@ #include <sys/rctl.h> #include <LzmaDec.h> -/* - * The basis for CRYOFF is derived from usr/src/uts/common/sys/fs/ufs_fs.h. - * Crypto metadata, if it exists, is located at the end of the boot block - * (BBOFF + BBSIZE, which is SBOFF). The super block and everything after - * is offset by the size of the crypto metadata which is handled by - * lsp->ls_crypto_offset. - */ -#define CRYOFF ((off_t)8192) - #define NBLOCKS_PROP_NAME "Nblocks" #define SIZE_PROP_NAME "Size" #define ZONE_PROP_NAME "zone" diff --git a/usr/src/uts/common/sys/lofi.h b/usr/src/uts/common/sys/lofi.h index 957c4b4feb..e4716c96af 100644 --- a/usr/src/uts/common/sys/lofi.h +++ b/usr/src/uts/common/sys/lofi.h @@ -22,6 +22,7 @@ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2016 Andrey Sokolov */ #ifndef _SYS_LOFI_H @@ -163,6 +164,17 @@ struct lofi_ioctl { #define S_ISLOFIABLE(mode) \ (S_ISREG(mode) || S_ISBLK(mode) || S_ISCHR(mode)) +/* + * The basis for CRYOFF is derived from usr/src/uts/common/sys/fs/ufs_fs.h. + * Crypto metadata, if it exists, is located at the end of the boot block + * (BBOFF + BBSIZE, which is SBOFF). The super block and everything after + * is offset by the size of the crypto metadata which is handled by + * lsp->ls_crypto_offset. + */ +#define CRYOFF ((off_t)8192) + +#define LOFI_CRYPTO_MAGIC { 'C', 'F', 'L', 'O', 'F', 'I' } + #if defined(_KERNEL) @@ -195,7 +207,6 @@ struct compbuf { * Need exactly 6 bytes to identify encrypted lofi image */ extern const char lofi_crypto_magic[6]; -#define LOFI_CRYPTO_MAGIC { 'C', 'F', 'L', 'O', 'F', 'I' } #define LOFI_CRYPTO_VERSION ((uint16_t)0) #define LOFI_CRYPTO_DATA_SECTOR ((uint32_t)16) /* for version 0 */ |
