WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: "protect" bootcode encrypted home issue  (Read 3497 times)

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
"protect" bootcode encrypted home issue
« on: September 04, 2010, 11:15:23 PM »
I was trying out the "protect" bootcode today and ran into an issue.   I booted with the protect bootcode, and when prompted I set my password.   I tried doing a backup via both the filetool GUI and the filetool.sh command line tool.   In both cases, the tools hung indefinitely.   It turns out the problem was that I had chosen a password at bootup that was less than 8 characters long, and bcrypt requires the password to be 8 or more characters, and if it isn't, it just keeps prompting for the password again which is why the filetool utilities were hanging. 

I would suggest adding some logic to getpasswd() in tc-functions that checks if $1 is equal to "encryption", and if so verify that the password entered is at least 8 characters long, and if not, print an notification to the user that the password must be 8 or more characters long.   I made these modifications to getpasswd() and can post them if it would be helpful. 

On a related note, since Tiny Core can be used in a multi-user environment, it would be safer to have the /etc/sysconfig/bfe file be created with $USER as the owner and restrict the permissions so that not all users can read the password out of the file. 

Thanks,
Brian

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: "protect" bootcode encrypted home issue
« Reply #1 on: September 05, 2010, 02:45:31 PM »
I think all password should be eight of more characters.
I have added a length test for such.
10+ Years Contributing to Linux Open Source Projects.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: "protect" bootcode encrypted home issue
« Reply #2 on: September 07, 2010, 09:55:03 AM »
FYI from the docs
Quote
Passphrases may be between 8 and 56 characters

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: "protect" bootcode encrypted home issue
« Reply #3 on: September 07, 2010, 11:25:53 AM »
Oh my, must test for no more that 56.
10+ Years Contributing to Linux Open Source Projects.