LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-23-2011, 09:49 AM   #1
fdeak
LQ Newbie
 
Registered: Jan 2007
Distribution: Slackware-14.0, Slackware-current
Posts: 21

Rep: Reputation: 2
Bug in cryptsetup and/or in rc.S in processing /etc/crypttab in slackware-current


Hi

With the latest cryptsetup update, the command
Code:
cryptsetup status foo
always gives result 0, no matter foo is exists or not. In slackware-13.1
it gives 0 for opened and 1 for not opened volumes.

I don't know exactly if this is good or bad, but in /etc/rc.d/rc.S when
etc/crypttab is processed this return value is used in line 80, to check
whether the volume is opened or not.
Code:
79:    # Skip LUKS volumes that were already unlocked (in the initrd):
80:    /sbin/cryptsetup status $LUKS 1>/dev/null 2>/dev/null && continue
And therefore no volume will be opened from /etc/crypttab, because the
status will always be true, and the volume will be skipped.

(my quick solution is to grep the output of the cryptsetup status
instead of using the return value)

Ferenc Deak
 
Old 01-23-2011, 09:52 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
It was already fixed in a newer update which you apparently have not yet installed:

Quote:
Sun Jan 23 08:32:10 UTC 2011
a/sysvinit-scripts-1.2-noarch-36.txz: Rebuilt.
Fixed unlocking non-root encrypted partitions in rc.S.
Thanks to Mikhail Zotov.
Updated /sbin/rescan-scsi-bus.
The new check goes like this:
Code:
/sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue
Eric
 
Old 01-23-2011, 09:58 AM   #3
fdeak
LQ Newbie
 
Registered: Jan 2007
Distribution: Slackware-14.0, Slackware-current
Posts: 21

Original Poster
Rep: Reputation: 2
Yes, I somehow missed today's updates

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bug in hdparm 0.29 (Slackware-Current) piratesmack Slackware 6 10-14-2010 03:03 PM
cryptsetup bug in -current Rupa Slackware 16 06-01-2010 02:46 PM
Slackware-current KDE 4.3 Possible Bug !!!! Scuzz Slackware 3 07-13-2009 07:13 PM
bug in KDE 3.5.2 (slackware current) perfect_circle Slackware 3 04-19-2006 04:22 PM
Slackware-current Imagemagick bug fix wastelander42 Slackware 2 02-03-2006 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration