[pkg-cryptsetup-devel] Bug#600522: finding workaround: SOLVED

Raoul Bönisch jkl345 at alice-dsl.net
Sun Dec 12 18:59:38 UTC 2010


Hi again!

This is a little workaround to make things going with SElinux
activated. Note that this does not check wether SElinux is
activated or not, nevertheless it works in both situation,
because the one seperating " " isn't screwing things up.

In /lib/cryptsetup/cryptdisks.functions replace line 252:

OWNER=$(ls -l "$key" | sed 's/^.\{10\}[+]\?.[^[:space:]]* \([^[:space:]]*\).*/\1/')

with

OWNER=$(ls -l "$key" | sed 's/^.\{11\}[+]\?.[^[:space:]]* \([^[:space:]]*\).*/\1/')

Note, the change is in \{10\} which becomes \{11\}

This will work with output like this:

$ ls -l /etc/keys/din-1.luks 
-r--------. 1 root root 9 2010-01-13 13:01 /etc/keys/din-1.luks

and this:

$ ls -l /etc/keys/din-1.luks 
-r-------- 1 root root 9 2010-01-13 13:01 /etc/keys/din-1.luks

Note: I manually removed the '.' after permissions fields to show
the situation without SElinux enabled.

The package maintainer shall decide wether this should be
applied to official packages. My posting is ment as a hint for
reason and solution of this bug and as a quick workaround for
people desperately searching the bug trackers for help.

Greetings,

Raoul Bönisch






More information about the pkg-cryptsetup-devel mailing list