summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2013-03-18 21:11:31 +0000
committerpjd <pjd@FreeBSD.org>2013-03-18 21:11:31 +0000
commitee34459918e9cf13e4840cef3ebcc8df7fa218bf (patch)
tree0b0404f8acf7be4ce5353ba05761cbb1cb368628 /sbin
parent9e3df2d1143e7d15b6593229410222a4377fd3a7 (diff)
downloadFreeBSD-src-ee34459918e9cf13e4840cef3ebcc8df7fa218bf.zip
FreeBSD-src-ee34459918e9cf13e4840cef3ebcc8df7fa218bf.tar.gz
Reduce stack usage.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/class/eli/geom_eli.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c
index 1ed72b11..3eee6f2 100644
--- a/sbin/geom/class/eli/geom_eli.c
+++ b/sbin/geom/class/eli/geom_eli.c
@@ -259,6 +259,8 @@ struct g_command class_commands[] = {
static int verbose = 0;
+#define BUFSIZE 1024
+
static int
eli_protect(struct gctl_req *req)
{
@@ -344,7 +346,7 @@ static int
eli_genkey_files(struct gctl_req *req, bool new, const char *type,
struct hmac_ctx *ctxp, char *passbuf, size_t passbufsize)
{
- char *p, buf[MAXPHYS], argname[16];
+ char *p, buf[BUFSIZE], argname[16];
const char *file;
int error, fd, i;
ssize_t done;
@@ -431,7 +433,7 @@ eli_genkey_passphrase_prompt(struct gctl_req *req, bool new, char *passbuf,
}
if (new) {
- char tmpbuf[BUFSIZ];
+ char tmpbuf[BUFSIZE];
p = readpassphrase("Reenter new passphrase: ",
tmpbuf, sizeof(tmpbuf),
@@ -460,7 +462,7 @@ static int
eli_genkey_passphrase(struct gctl_req *req, struct g_eli_metadata *md, bool new,
struct hmac_ctx *ctxp)
{
- char passbuf[MAXPHYS];
+ char passbuf[BUFSIZE];
bool nopassphrase;
int nfiles;
OpenPOWER on IntegriCloud