summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOliver Tappe2007-09-26 13:09:15 +0200
committerOliver Tappe2007-09-26 13:09:15 +0200
commitf5d2559540e9bf6ee301ad999eea69f6cee15e5f (patch)
treea8fcd03dccd7f67869ceb25f7ea02578afb6c9f6 /tools
parent* updated busybox to 1.7.1 (only 32-bit, 64-bit still is 1.7.0) (diff)
downloadcore-f5d2559540e9bf6ee301ad999eea69f6cee15e5f.tar.gz
core-f5d2559540e9bf6ee301ad999eea69f6cee15e5f.tar.xz
core-f5d2559540e9bf6ee301ad999eea69f6cee15e5f.zip
* added 1.7.1-specific patches (temporarily)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1351 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'tools')
-rw-r--r--tools/busybox-patches/cryptpw-blowfish-1.7.1.diff79
-rw-r--r--tools/busybox-patches/unionfs-run-init-1.7.1.diff14
2 files changed, 93 insertions, 0 deletions
diff --git a/tools/busybox-patches/cryptpw-blowfish-1.7.1.diff b/tools/busybox-patches/cryptpw-blowfish-1.7.1.diff
new file mode 100644
index 00000000..cbe63ca7
--- /dev/null
+++ b/tools/busybox-patches/cryptpw-blowfish-1.7.1.diff
@@ -0,0 +1,79 @@
+diff -ruw busybox-1.6.1/include/usage.h busybox-1.6.1-openslx/include/usage.h
+--- busybox-1.6.1/include/usage.h 2007-06-30 17:06:45.000000000 +0200
++++ busybox-1.6.1-openslx/include/usage.h 2007-08-04 15:41:14.000000000 +0200
+@@ -475,12 +475,23 @@
+ " -c dir Specify crontab directory"
+
+ #define cryptpw_trivial_usage \
+- "[-a des|md5] [string]"
++ USE_FEATURE_CRYPTPW_BLOWFISH( \
++ "[-a des|md5|blowfish] [string]" \
++ ) \
++ SKIP_FEATURE_CRYPTPW_BLOWFISH( \
++ "[-a des|md5] [string]" \
++ )
+ #define cryptpw_full_usage \
+ "Outputs crypted string.\n" \
+ "If string isn't supplied on cmdline, reads it from stdin.\n" \
+ "\nOptions:" \
+- "\n -a Algorithm to use (default: md5)"
++ "\n -a Algorithm to use (default: md5)" \
++ "\n Available algorithms:" \
++ USE_FEATURE_CRYPTPW_BLOWFISH( \
++ "\n blowfish" \
++ ) \
++ "\n des" \
++ "\n md5"
+
+ #define cut_trivial_usage \
+ "[OPTION]... [FILE]..."
+diff -ruw busybox-1.6.1/loginutils/Config.in busybox-1.6.1-openslx/loginutils/Config.in
+--- busybox-1.6.1/loginutils/Config.in 2007-06-30 17:06:45.000000000 +0200
++++ busybox-1.6.1-openslx/loginutils/Config.in 2007-08-04 15:06:36.000000000 +0200
+@@ -187,6 +187,13 @@
+ help
+ Applet for crypting a string.
+
++config FEATURE_CRYPTPW_BLOWFISH
++ bool "Support blowfish in cryptpw"
++ default y
++ depends on CRYPTPW
++ help
++ With this option cryptpw will support the blowfish cipher, too.
++
+ config CHPASSWD
+ bool "chpasswd"
+ default n
+diff -ruw busybox-1.6.1/loginutils/cryptpw.c busybox-1.6.1-openslx/loginutils/cryptpw.c
+--- busybox-1.6.1/loginutils/cryptpw.c 2007-06-30 17:06:45.000000000 +0200
++++ busybox-1.6.1-openslx/loginutils/cryptpw.c 2007-08-04 15:32:48.000000000 +0200
+@@ -10,16 +10,22 @@
+ int cryptpw_main(int argc, char **argv);
+ int cryptpw_main(int argc, char **argv)
+ {
+- char salt[sizeof("$N$XXXXXXXX")];
++ char salt[sizeof("$2a$10$1234567890123456789012X")];
+
+- if (!getopt32(argv, "a:", NULL) || argv[optind - 1][0] != 'd') {
++ if (!getopt32(argv, "a:", NULL)
++ || (argv[optind - 1][0] != 'b' && argv[optind - 1][0] != 'd')) {
++ /* md5 */
+ strcpy(salt, "$1$");
+- /* Too ugly, and needs even more magic to handle endianness: */
+- //((uint32_t*)&salt)[0] = '$' + '1'*0x100 + '$'*0x10000;
+- /* Hope one day gcc will do it itself (inlining strcpy) */
+- crypt_make_salt(salt + 3, 4, 0); /* md5 */
++ crypt_make_salt(salt + 3, 4, 0);
++#if ENABLE_FEATURE_CRYPTPW_BLOWFISH
++ } else if (argv[optind - 1][0] == 'b') {
++ /* blowfish */
++ strcpy(salt, "$2a$10$");
++ crypt_make_salt(salt + 7, 11, 0);
++#endif
+ } else {
+- crypt_make_salt(salt, 1, 0); /* des */
++ /* des */
++ crypt_make_salt(salt, 1, 0);
+ }
+
+ puts(pw_encrypt(argv[optind] ? argv[optind] : xmalloc_getline(stdin), salt));
diff --git a/tools/busybox-patches/unionfs-run-init-1.7.1.diff b/tools/busybox-patches/unionfs-run-init-1.7.1.diff
new file mode 100644
index 00000000..768e07c6
--- /dev/null
+++ b/tools/busybox-patches/unionfs-run-init-1.7.1.diff
@@ -0,0 +1,14 @@
+diff -ruw busybox-1.6.1/util-linux/switch_root.c busybox-1.6.1-openslx/util-linux/switch_root.c
+--- busybox-1.6.1/util-linux/switch_root.c 2007-06-30 17:06:48.000000000 +0200
++++ busybox-1.6.1-openslx/util-linux/switch_root.c 2007-08-03 18:52:59.000000000 +0200
+@@ -105,6 +105,10 @@
+ // Overmount / with newdir and chroot into it. The chdir is needed to
+ // recalculate "." and ".." links.
+
++ if ( !lstat("/rorootfs", &st1 ) )
++ if ( mount("/rorootfs", "/", NULL, MS_MOVE, NULL) )
++ bb_error_msg_and_die("moving rorootfs");
++
+ if (mount(".", "/", NULL, MS_MOVE, NULL) || chroot("."))
+ bb_error_msg_and_die("error moving root");
+ xchdir("/");