-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reimplement support for encrypted savefiles
using losetup-222 (static)
- Loading branch information
Showing
15 changed files
with
230 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
initrd-progs/pkg/util-linux-222_static/util-linux-222.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
diff -Naur util-linux-2.22.2/config/config.sub util-linux-2.22.2-patched/config/config.sub | ||
--- util-linux-2.22.2/config/config.sub 2012-09-18 02:53:51.000000000 +0000 | ||
+++ util-linux-2.22.2-patched/config/config.sub 2016-07-23 20:52:45.685261722 +0000 | ||
@@ -253,7 +253,7 @@ | ||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | ||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | ||
| am33_2.0 \ | ||
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | ||
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345678] | armv[345678][lb] | avr | avr32 \ | ||
| be32 | be64 \ | ||
| bfin \ | ||
| c4x | clipper \ | ||
diff -Naur util-linux-2.22.2/lib/tt.c util-linux-2.22.2-patched/lib/tt.c | ||
--- util-linux-2.22.2/lib/tt.c 2012-12-12 20:04:47.902355093 +0000 | ||
+++ util-linux-2.22.2-patched/lib/tt.c 2016-07-23 20:51:58.358596857 +0000 | ||
@@ -22,7 +22,7 @@ | ||
#include "widechar.h" | ||
#include "tt.h" | ||
#include "mbsalign.h" | ||
-#include "ttyutils.h" | ||
+//#include "ttyutils.h" | ||
|
||
struct tt_symbols { | ||
const char *branch; | ||
diff -Naur util-linux-2.22.2/term-utils/setterm.c util-linux-2.22.2-patched/term-utils/setterm.c | ||
--- util-linux-2.22.2/term-utils/setterm.c 2012-11-30 08:01:42.950919423 +0000 | ||
+++ util-linux-2.22.2-patched/term-utils/setterm.c 2016-07-23 20:51:58.358596857 +0000 | ||
@@ -123,15 +123,6 @@ | ||
#include "nls.h" | ||
#include "closestream.h" | ||
|
||
-#if __GNU_LIBRARY__ < 5 | ||
-#ifndef __alpha__ | ||
-# include <linux/unistd.h> | ||
-#define __NR_klogctl __NR_syslog | ||
-_syscall3(int, klogctl, int, type, char*, buf, int, len); | ||
-#else /* __alpha__ */ | ||
-#define klogctl syslog | ||
-#endif | ||
-#endif | ||
extern int klogctl(int type, char *buf, int len); | ||
|
||
/* Constants. */ | ||
diff -Naur util-linux-2.22.2/term-utils/ttymsg.c util-linux-2.22.2-patched/term-utils/ttymsg.c | ||
--- util-linux-2.22.2/term-utils/ttymsg.c 2012-11-29 15:15:00.347642630 +0000 | ||
+++ util-linux-2.22.2-patched/term-utils/ttymsg.c 2016-07-23 20:51:58.358596857 +0000 | ||
@@ -42,6 +42,7 @@ | ||
|
||
#include <sys/types.h> | ||
#include <sys/uio.h> | ||
+#include <sys/param.h> | ||
#include <signal.h> | ||
#include <fcntl.h> | ||
#include <dirent.h> |
56 changes: 56 additions & 0 deletions
56
initrd-progs/pkg/util-linux-222_static/util-linux-222_static.petbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
. ../../func | ||
|
||
URL=https://www.kernel.org/pub/linux/utils/util-linux/v2.22 | ||
SRC=util-linux | ||
PKG=util-linux-222_static | ||
VER=2.22.2 | ||
COMP=tar.xz | ||
DESC="" | ||
DEPS= | ||
CAT=BuildingBlock | ||
CWD=`pwd` | ||
|
||
build() { | ||
cd ${SRC}-${VER} | ||
patch -p1 < ../util-linux-222.patch | ||
opts="--prefix=/usr --enable-static-programs=losetup | ||
--disable-shared --disable-nls --without-ncurses --disable-libuuid --disable-libblkid | ||
--disable-libmount --disable-mount --disable-fsck --disable-partx | ||
--disable-uuidd --disable-mountpoint --disable-fallocate | ||
--disable-eject --disable-agetty | ||
--disable-cramfs --disable-switch_root --disable-pivot_root | ||
--disable-kill --disable-utmpdump --disable-raw --disable-rename | ||
--disable-chsh-only-listed --disable-login --disable-sulogin --disable-su | ||
--disable-schedutils --disable-wall | ||
--disable-pg-bell --disable-use-tty-group --disable-makeinstall-chown | ||
--disable-makeinstall-setuid --without-selinux " | ||
_configure | ||
sed -i 's|^LDFLAGS =.*|LDFLAGS = -all-static|' Makefile | ||
_make ${MKFLG} losetup | ||
abort_if_file_not_found losetup | ||
install -d -m 0755 $CWD/${PKG}-${VER}-${ARCH}/bin | ||
mv losetup losetup-222 | ||
_install losetup-222 $CWD/${PKG}-${VER}-${ARCH}/bin | ||
cd - | ||
} | ||
|
||
package() { | ||
# add this recipe | ||
install -d -m 0755 ./${PKG}-${VER}-${ARCH}/build | ||
cat ${PKG}.petbuild > ./${PKG}-${VER}-${ARCH}/build/$PKG-build-recipe | ||
# move, don't package | ||
cp -a --remove-destination ./${PKG}-${VER}-${ARCH}/* ../../00_${ARCH} | ||
rm -r ${SRC}-${VER} | ||
rm -r ${PKG}-${VER}-${ARCH} | ||
echo "moved to initrd" | ||
echo "done!" | ||
} | ||
|
||
# main | ||
retrieve ${SRC}-${VER}.${COMP} | ||
[ "$DLD_ONLY" = "yes" ] && exit | ||
extract ${SRC}-${VER}.${COMP} | ||
build | ||
package |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
44e15f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did a test build with the new rationalise:
BUILD_FROM_WOOF='rationalise;44e15f2;2016-12-30 23:09:45 +0000'
Creation and use of both light and heavy savefiles seemed to go OK....
however.... trying to open the .2fs files:
.crypta-heavy - dialogue to enter password appeared but mounting failed
.cryptx-lite - yellow dialogue box flashed open and immediately closed - mounting failed
44e15f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i fixed that issue. add latest /usr/sbin/filemnt and /usr/lib/gtkdialog/box_passwd (new) to a adrv and test..
44e15f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested - AOK