Re: losetup -p & other oddities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Kujau wrote:
> recently i set up a crypted filesystem and use it already successfully.
> for testing purposes (and 'cause i'm lazy) i've always used the option
> "-p" when initializing the loop-device via losetup:
> 
> losetup -k 128 -p 26 -e serpent /dev/loop6 /dev/sdb2
> 
> that way, i don't have to type in the passphrase manually, instead, as i
> understood correctly, the passphrase is taken from the file located on
> inode# 26.

Wrong! -p option reads password from _open_ file descriptor 26, where 0 is
stdin, 1 is stdout, 2 is stderr, and so on. Pointing -p option to unopen fd
is equivalent to empty password.

Maybe you intended to do something like this:

losetup -k 128 -p 3 -e serpent /dev/loop6 /dev/sdb2  3</path/to/some/file
               ^^^^                                  ^^^^^^^^^^^^^^^^^^^^

> root@xxxxx:~# losetup -k 128 -p 26 -e serpent /dev/loop6 /dev/sdb2
> root@xxxxx:~# losetup /dev/loop6
> /dev/loop6: [0805]:22698 (serpent-cbc) offset 0, undefined encryption
> root@xxxxx:~#
> 
> (undefined encryption?)

undefined == CryptoAPI

Regards,
Jari Ruusu <jari.ruusu@xxxxxxxxxx>

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux