Project

General

Profile

Actions

Bug #7941

closed

cannot use crypto lofi on a block/character device

Added by Josef Sipek about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2017-03-06
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

This looks like a regression from #6602 (labeled lofi).

# lofiadm -c aes-256-cbc -a /dev/rdsk/c2t0d0
lofiadm: cannot use lofi on itself

With this quick hack, everything works fine:

diff --git a/usr/src/cmd/lofiadm/main.c b/usr/src/cmd/lofiadm/main.c
index db1dad6..9007f21 100644
--- a/usr/src/cmd/lofiadm/main.c
+++ b/usr/src/cmd/lofiadm/main.c
@@ -302,10 +302,6 @@ name_to_minor(const char *devicename)
         return (0);
     }

-    if (st.st_mode & S_IFCHR || st.st_mode & S_IFBLK) {
-        return (LOFI_MINOR2ID(minor(st.st_rdev)));
-    }
-
     return (0);
 }


Related issues

Related to illumos gate - Feature #6602: lofi should support labeled devicesClosedToomas Soome2016-02-03

Actions
Actions

Also available in: Atom PDF