Bug#974591: [pkg-cryptsetup-devel] Bug#974591: cryptsetup: `service cryptdisks stop` fails with `loop_cryptdevs: not found` and does not close disks

2020-11-12 Thread Guilhem Moulin
Hi,

On Thu, 12 Nov 2020 at 19:17:43 +0100, Peter Corlett wrote:
> A cursory Google (and DDG etc) for `loop_cryptdevs` finds nothing
> except this line, and it is unclear what this broken code was supposed
> to achieve.

See #918008.  Seems I renamed the function to foreach_cryptdev() (see
also 1d97d98) before committing.  Ooops.

FWIW removing loop_cryptdevs() but preserving the rest of the line might
lead to undesired side-effects if a mapped device name is in the form
MAJ:MIN.  _do_stop_skipped() is meant to be used as callback with a
mapped device name as argument, not devnos.

Cheers,
-- 
Guilhem.


signature.asc
Description: PGP signature


Bug#974591: cryptsetup: `service cryptdisks stop` fails with `loop_cryptdevs: not found` and does not close disks

2020-11-12 Thread Peter Corlett
Package: cryptsetup
Version: 2:2.3.4-1
Severity: important

Dear Maintainer,

I can no longer do e.g. `/etc/init.d/cryptdisks stop` to close all unmounted 
encrypted devices
because it fails with `loop_cryptdevs: not found`. This error comes from line 
198 of
/lib/cryptsetup/cryptdisks-functions, which appears to have been introduced 
last January in commit
863e91f0e763b92a5f70d84278116a28357e74eb by guil...@debian.org. There is no 
command `loop_cryptdevs`
installed, nor is such a shell function defined.

Deleting the token `loop_cryptdevs` from the start of the line (retaining the 
rest of the line as
`do_stop_skipped $devno_rootfs $devno_usr`) seems to make it work well enough 
for my purposes.

A cursory Google (and DDG etc) for `loop_cryptdevs` finds nothing except this 
line, and it is
unclear what this broken code was supposed to achieve. It is however quite 
clear that it was
released without being tested.

-- Package-specific info:

-- System Information:
Debian Release: bullseye/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-1-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages cryptsetup depends on:
ii  cryptsetup-bin 2:2.3.4-1
ii  debconf [debconf-2.0]  1.5.74
ii  dmsetup2:1.02.171-3
ii  libc6  2.31-4

Versions of packages cryptsetup recommends:
ii  cryptsetup-initramfs  2:2.3.4-1
ii  cryptsetup-run2:2.3.4-1

Versions of packages cryptsetup suggests:
ii  dosfstools  4.1-2
ii  keyutils1.6.1-2
ii  liblocale-gettext-perl  1.07-4

-- debconf information:
* cryptsetup/prerm_active_mappings: true