mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:57:34 +00:00
Ports: Add preliminary dropbear port
This is very basic and doesn't support many features. Instead of describing what it *doesn't* support, I'll describe what I have tested: 1. Public key authentication (password is not supported) 2. Single command execution 3. PTY-less interactive bash shell (/bin/sh doesn't work) 4. Multi-user (i.e you can ssh as 'anon' as well as root)
This commit is contained in:
parent
b03fefd9f8
commit
c377e6af29
16 changed files with 384 additions and 1 deletions
84
Ports/dropbear/patches/disable-ssp.patch
Normal file
84
Ports/dropbear/patches/disable-ssp.patch
Normal file
|
@ -0,0 +1,84 @@
|
|||
I patch both configure.ac and configure itself (though only configure is required for the build)
|
||||
Serenity's GCC doesn't support SSP, so this is disabled.
|
||||
--- a/configure.ac.orig
|
||||
+++ b/configure.ac
|
||||
@@ -99,22 +99,7 @@
|
||||
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
|
||||
)
|
||||
fi # non-static
|
||||
- # stack protector. -strong is good but only in gcc 4.9 or later
|
||||
- OLDCFLAGS="$CFLAGS"
|
||||
- TESTFLAGS="-fstack-protector-strong"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
|
||||
- [
|
||||
- CFLAGS="$OLDCFLAGS"
|
||||
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
|
||||
- [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ]
|
||||
- )
|
||||
- ]
|
||||
- )
|
||||
+
|
||||
# FORTIFY_SOURCE
|
||||
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])
|
||||
|
||||
--- a/configure.orig
|
||||
+++ b/configure
|
||||
@@ -3357,53 +3357,7 @@
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi # non-static
|
||||
- # stack protector. -strong is good but only in gcc 4.9 or later
|
||||
- OLDCFLAGS="$CFLAGS"
|
||||
- TESTFLAGS="-fstack-protector-strong"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
-
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_compile "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5
|
||||
-$as_echo "$as_me: Setting $TESTFLAGS" >&6;}
|
||||
-else
|
||||
-
|
||||
- CFLAGS="$OLDCFLAGS"
|
||||
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
-
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_compile "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5
|
||||
-$as_echo "$as_me: Setting $TESTFLAGS" >&6;}
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: Not setting $TESTFLAGS" >&5
|
||||
-$as_echo "$as_me: Not setting $TESTFLAGS" >&6;}; CFLAGS="$OLDCFLAGS"
|
||||
-
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
-
|
||||
-
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
# FORTIFY_SOURCE
|
||||
{
|
||||
OLDFLAGS="$CFLAGS"
|
Loading…
Add table
Add a link
Reference in a new issue