[pkg-cryptsetup-devel] Bug#600522: Bug#600522: Better solution

Jonas Meurer jonas at freesources.org
Thu Dec 16 16:22:55 UTC 2010


Hey,

On 12/12/2010 Raoul Bönisch wrote:
> Hi again again.
> 
> A way better solution might be this:
> 
> OWNER=$(ls -l "$key" | sed 's/^[^[:space:]]\{10,12\}[[:space:]]\+[^[:space:]]\+[[:space:]]\+\([^[:space:]]\+\).*/\1/'
> 
> It's more future proof than the original method, cause it only
> looks at space and non-space characters and at most counts them.
> So any change in output which does not change space/non-space
> pattern will not make sed notice the user.

thanks for the suggestion. i fixed it another way in the meantime. the
syntax now allows + and . as trailing characters for selinux. to be
honest, i don't like the implementation at all, there really should be a
better way to detect ownership and permissions of a file with only /bin
and /sbin being available.

see the attached patch, it should fix the issue for you. it's already
applied to cryptsetup debian package svn repository.

greetings,
 jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 600522.diff
Type: text/x-diff
Size: 1207 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20101216/a16248be/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20101216/a16248be/attachment.pgp>


More information about the pkg-cryptsetup-devel mailing list