Upgrade of /usr/sbin/filemnt to support encryption

Filemanagers, partitioning tools, etc.
Post Reply
Message
Author
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

Upgrade of /usr/sbin/filemnt to support encryption

#1 Post by Pizzasgood »

I made a couple small adjustments to the /usr/sbin/filemnt script to allow it to work with encrypted pup_save files, as long as they follow the crypt[ax] convention that Puppy uses. It has been tested with a real pup_save_crypta.2fs file and with a fake pup_save_cryptx.2fs file.

Note: The encryption detection isn't amazingly smart - it basically just looks to see if the strings '_crypta' or '_cryptx' exist somewhere in the filename, and uses the latest one it finds. So if for some reason you have unencrypted files that include that string somewhere, this may cause you problems.

Tested in 4.2.1 only, but should work in any 4.x Puppy, and probably any 2.x and 3.x Puppy, but I'm not certain.

If this screws things up, you should be able to replace your original by grabbing it from /initrd/pup_ro2/usr/sbin/filemnt and placing it in /usr/sbin/filemnt, overwriting the new one.
Attachments
filemnt-crypto_support-0.1.pet
Replaces /usr/sbin/filemnt with a slightly modified version which supports encrypted save-files
(2.06 KiB) Downloaded 625 times
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#2 Post by Pizzasgood »

Here is a version for Puppy 5.25. I only tested it on 5.25, but it probably works on other 5.x puppies, and maybe others. I'm also attaching the diff, so anybody who wants to apply this to newer versions can do so. It's pretty simple, just a couple easy changes.

There were no real changes to my modifications of the code, other than a very slight tweak to avoid an unnecessary error message. Pretty much just a matter of copy/pasting my modifications from the 4.x version of the script into the 5.x version. So, if you still use Puppy 4 or whatever, you can just use the first version of this.
Attachments
filemnt-crypto_support-0.2.pet
Replaces /usr/sbin/filemnt with a slightly modified version which supports encrypted save-files, intended for Puppy 5.25.
(2.53 KiB) Downloaded 489 times
filemnt_5.25_to_5.25-crypto.diff.gz
Diff showing changes in /usr/sbin/filemnt needed to support encrypted savefiles,
(1018 Bytes) Downloaded 502 times
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

Post Reply