Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201981 - sys-apps/util-linux - losetup does not recognize man documented option "-P"
Summary: sys-apps/util-linux - losetup does not recognize man documented option "-P"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-11 21:18 UTC by Paulo da Silva
Modified: 2007-12-14 03:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo da Silva 2007-12-11 21:18:26 UTC
losetup does not recognize man documented option "-P"

Trying to "losetup" a file to /dev/loopn using an encryption algorithm and a clear text key in a file does not work. losetup does not recognize -P option.


Reproducible: Always

Steps to Reproduce:
1.
# losetup -P A_CONTAINING_KEY_FILENAME  -e twofish256 /dev/loop0 A_FILENAME

Actual Results:  

losetup: invalid option -- P
usage:
  losetup [options] loop_device file        # setup
  losetup -F [options] loop_device [file]   # setup, read /etc/fstab
  losetup loop_device                       # give info
  losetup -a                                # give info of all loops
  losetup -d loop_device                    # delete
  losetup -R loop_device                    # resize
options:  -e encryption  -o offset  -s sizelimit  -p passwdfd  -T  -S pseed
          -H phash  -I loinit  -K gpgkey  -G gpghome  -C itercountk  -v  -r
          -P cleartextkey
Comment 1 Paulo da Silva 2007-12-12 04:26:41 UTC
I found where the problem is. "P:" is not in the string passed to getopt.

To fix:
Unpack distfiles/loop-AES-v3.1f.tar.bz2
Change the file loop-AES-v3.1f/util-linux-2.12r.diff
line
+	while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rRs:S:Tv")) != -1) {
by
+	while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:P:rRs:S:Tv")) != -1) {

This works.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-12-13 20:19:40 UTC
please include emerge -pv util-linux since you haven't included any version info.
Comment 3 Paulo da Silva 2007-12-13 22:33:40 UTC
Sorry!

# emerge -pv util-linux

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/util-linux-2.12r-r8  USE="crypt nls perl -old-crypt (-selinux) -static" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB