3135 lofi_uncompress doesn't initialize all variables
authorJerry Jelinek <jerry.jelinek@joyent.com>
Tue, 04 Sep 2012 12:05:09 +0000
changeset 13861 89bb108e9ab6
parent 13860 0b5d8823b20a
child 13862 c6c92fa2b3ad
3135 lofi_uncompress doesn't initialize all variables Reviewed by: Robert Mustacchi <[email protected]> Reviewed by: Richard Lowe <[email protected]> Approved by: Eric Schrock <[email protected]>
usr/src/cmd/lofiadm/main.c
--- a/usr/src/cmd/lofiadm/main.c	Wed Aug 29 01:06:55 2012 +0000
+++ b/usr/src/cmd/lofiadm/main.c	Tue Sep 04 12:05:09 2012 +0000
@@ -21,6 +21,7 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2012 Joyent, Inc.  All rights reserved.
  */
 
 /*
@@ -1274,6 +1275,7 @@
 	 * Disallow uncompressing the file if it is
 	 * already mapped.
 	 */
+	li.li_crypto_enabled = B_FALSE;
 	li.li_minor = 0;
 	(void) strlcpy(li.li_filename, filename, sizeof (li.li_filename));
 	if (ioctl(lfd, LOFI_GET_MINOR, &li) != -1)