Re: [PATCH 2/2] Clean up: Now that `make -j' works, remove `default_options.h'

2017-07-12 Thread Michael Witten
It was safe to remove `default_options.h', but in my excitement to do so,
I forgot to take care of some administrative issues, namely that `git'
should be told to ignore that file, and the command `make clean' should
remove it, and there's now no need for a comment in `Makefile.in' about
the problems with `make -j'.

To apply this patch instead of the original, save this email to:

  /path/to/email.patch

and then apply it as follows:

  $ git am --scissors /path/to/email.patch

Here is the scissors line where `git' will cut in order to remove everything
above it.

8<8<8<8<8<8<8<8<8<8<8<8<8<
Date: Tue, 11 Jul 2017 19:56:37 -

Now, it will only be necessary to maintain `default_options.h.in',
though it does seem like a lot of trouble just to avoid having
users deal with #ifndef/#endif statements.
---
 .gitignore|   1 +
 Makefile.in   |   3 +-
 default_options.h | 466 --
 3 files changed, 2 insertions(+), 468 deletions(-)
 delete mode 100644 default_options.h

diff --git a/.gitignore b/.gitignore
index 1ef4318..010bb51 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
 /autom4te.cache
 /config.log
 /config.status
+/default_options.h
 /dbclient
 /dropbear
 /dropbearconvert
diff --git a/Makefile.in b/Makefile.in
index 885a4f0..812aa49 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -237,6 +237,7 @@ thisclean:
dropbearconvert$(EXEEXT) scp$(EXEEXT) 
scp-progress$(EXEEXT) \
dropbearmulti$(EXEEXT) *.o *.da *.bb *.bbg *.prof
-rm -rf $(prerequisites_dir)
+   -rm -f default_options.h
 
 .PHONY: distclean
 distclean: clean tidy
@@ -247,8 +248,6 @@ distclean: clean tidy
 tidy:
-rm -f *~ *.gcov */*~
 
-# default_options.h is stored in version control, could not find a workaround
-# for parallel "make -j" and dependency rules.
 default_options.h: default_options.h.in 
echo "# > > > Generated from $^, edit that file instead !" > $@.tmp
echo >> $@.tmp
diff --git a/default_options.h b/default_options.h
deleted file mode 100644
index 039d785..000
--- a/default_options.h
+++ /dev/null
@@ -1,466 +0,0 @@
-#ifndef DROPBEAR_DEFAULT_OPTIONS_H_
-#define DROPBEAR_DEFAULT_OPTIONS_H_
-/*
- > > > Read This < < <
-
-default_options.h.in (this file) documents compile-time options, and provides 
-default values.
-
-Local customisation should be added to localoptions.h which is
-used if it exists. Options defined there will override any options in this
-file (#ifndef guards added by ifndef_wrapper.sh).
-
-Options can also be defined with -DDROPBEAR_XXX in Makefile CFLAGS
-
-IMPORTANT: Many options will require "make clean" after changes */
-
-#ifndef DROPBEAR_DEFPORT
-#define DROPBEAR_DEFPORT "22"
-#endif
-
-/* Listen on all interfaces */
-#ifndef DROPBEAR_DEFADDRESS
-#define DROPBEAR_DEFADDRESS ""
-#endif
-
-/* Default hostkey paths - these can be specified on the command line */
-#ifndef DSS_PRIV_FILENAME
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
-#endif
-#ifndef RSA_PRIV_FILENAME
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
-#endif
-#ifndef ECDSA_PRIV_FILENAME
-#define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key"
-#endif
-
-/* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
- * on chosen ports and keeps accepting connections. This is the default.
- *
- * Set INETD_MODE if you want to be able to run Dropbear with inetd (or
- * similar), where it will use stdin/stdout for connections, and each process
- * lasts for a single connection. Dropbear should be invoked with the -i flag
- * for inetd, and can only accept IPv4 connections.
- *
- * Both of these flags can be defined at once, don't compile without at least
- * one of them. */
-#ifndef NON_INETD_MODE
-#define NON_INETD_MODE 1
-#endif
-#ifndef INETD_MODE
-#define INETD_MODE 1
-#endif
-
-/* Setting this disables the fast exptmod bignum code. It saves ~5kB, but is
- * perhaps 20% slower for pubkey operations (it is probably worth experimenting
- * if you want to use this) */
-/*#define NO_FAST_EXPTMOD*/
-
-/* Set this if you want to use the DROPBEAR_SMALL_CODE option. This can save
-several kB in binary size however will make the symmetrical ciphers and hashes
-slower, perhaps by 50%. Recommended for small systems that aren't doing
-much traffic. */
-#ifndef DROPBEAR_SMALL_CODE
-#define DROPBEAR_SMALL_CODE 1
-#endif
-
-/* Enable X11 Forwarding - server only */
-#ifndef DROPBEAR_X11FWD
-#define DROPBEAR_X11FWD 1
-#endif
-
-/* Enable TCP Fowarding */
-/* 'Local' is "-L" style (client listening port forwarded via server)
- * 'Remote' is "-R" style (server listening port forwarded via client) */
-
-#ifndef DROPBEAR_CLI_LOCALTCPFWD
-#define DROPBEAR_CLI_LOCALTCPFWD 1
-#endif
-#ifndef DROPBEAR_CLI_REMOTETCPFWD
-#define DROPBEAR_CLI_REMOTETCPFWD 1
-#endif
-
-#ifndef 

[PATCH 2/2] Clean up: Now that `make -j' works, remove `default_options.h'

2017-07-11 Thread Michael Witten
Now, it will only be necessary to maintain `default_options.h.in',
though it does seem like a lot of trouble just to avoid having
users deal with #ifndef/#endif statements.
---
 default_options.h | 466 --
 1 file changed, 466 deletions(-)
 delete mode 100644 default_options.h

diff --git a/default_options.h b/default_options.h
deleted file mode 100644
index 039d785..000
--- a/default_options.h
+++ /dev/null
@@ -1,466 +0,0 @@
-#ifndef DROPBEAR_DEFAULT_OPTIONS_H_
-#define DROPBEAR_DEFAULT_OPTIONS_H_
-/*
- > > > Read This < < <
-
-default_options.h.in (this file) documents compile-time options, and provides 
-default values.
-
-Local customisation should be added to localoptions.h which is
-used if it exists. Options defined there will override any options in this
-file (#ifndef guards added by ifndef_wrapper.sh).
-
-Options can also be defined with -DDROPBEAR_XXX in Makefile CFLAGS
-
-IMPORTANT: Many options will require "make clean" after changes */
-
-#ifndef DROPBEAR_DEFPORT
-#define DROPBEAR_DEFPORT "22"
-#endif
-
-/* Listen on all interfaces */
-#ifndef DROPBEAR_DEFADDRESS
-#define DROPBEAR_DEFADDRESS ""
-#endif
-
-/* Default hostkey paths - these can be specified on the command line */
-#ifndef DSS_PRIV_FILENAME
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
-#endif
-#ifndef RSA_PRIV_FILENAME
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
-#endif
-#ifndef ECDSA_PRIV_FILENAME
-#define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key"
-#endif
-
-/* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
- * on chosen ports and keeps accepting connections. This is the default.
- *
- * Set INETD_MODE if you want to be able to run Dropbear with inetd (or
- * similar), where it will use stdin/stdout for connections, and each process
- * lasts for a single connection. Dropbear should be invoked with the -i flag
- * for inetd, and can only accept IPv4 connections.
- *
- * Both of these flags can be defined at once, don't compile without at least
- * one of them. */
-#ifndef NON_INETD_MODE
-#define NON_INETD_MODE 1
-#endif
-#ifndef INETD_MODE
-#define INETD_MODE 1
-#endif
-
-/* Setting this disables the fast exptmod bignum code. It saves ~5kB, but is
- * perhaps 20% slower for pubkey operations (it is probably worth experimenting
- * if you want to use this) */
-/*#define NO_FAST_EXPTMOD*/
-
-/* Set this if you want to use the DROPBEAR_SMALL_CODE option. This can save
-several kB in binary size however will make the symmetrical ciphers and hashes
-slower, perhaps by 50%. Recommended for small systems that aren't doing
-much traffic. */
-#ifndef DROPBEAR_SMALL_CODE
-#define DROPBEAR_SMALL_CODE 1
-#endif
-
-/* Enable X11 Forwarding - server only */
-#ifndef DROPBEAR_X11FWD
-#define DROPBEAR_X11FWD 1
-#endif
-
-/* Enable TCP Fowarding */
-/* 'Local' is "-L" style (client listening port forwarded via server)
- * 'Remote' is "-R" style (server listening port forwarded via client) */
-
-#ifndef DROPBEAR_CLI_LOCALTCPFWD
-#define DROPBEAR_CLI_LOCALTCPFWD 1
-#endif
-#ifndef DROPBEAR_CLI_REMOTETCPFWD
-#define DROPBEAR_CLI_REMOTETCPFWD 1
-#endif
-
-#ifndef DROPBEAR_SVR_LOCALTCPFWD
-#define DROPBEAR_SVR_LOCALTCPFWD 1
-#endif
-#ifndef DROPBEAR_SVR_REMOTETCPFWD
-#define DROPBEAR_SVR_REMOTETCPFWD 1
-#endif
-
-/* Enable Authentication Agent Forwarding */
-#ifndef DROPBEAR_SVR_AGENTFWD
-#define DROPBEAR_SVR_AGENTFWD 1
-#endif
-#ifndef DROPBEAR_CLI_AGENTFWD
-#define DROPBEAR_CLI_AGENTFWD 1
-#endif
-
-
-/* Note: Both DROPBEAR_CLI_PROXYCMD and DROPBEAR_CLI_NETCAT must be set to
- * allow multihop dbclient connections */
-
-/* Allow using -J  to run the connection through a 
-   pipe to a program, rather the normal TCP connection */
-#ifndef DROPBEAR_CLI_PROXYCMD
-#define DROPBEAR_CLI_PROXYCMD 1
-#endif
-
-/* Enable "Netcat mode" option. This will forward standard input/output
- * to a remote TCP-forwarded connection */
-#ifndef DROPBEAR_CLI_NETCAT
-#define DROPBEAR_CLI_NETCAT 1
-#endif
-
-/* Whether to support "-c" and "-m" flags to choose ciphers/MACs at runtime */
-#ifndef ENABLE_USER_ALGO_LIST
-#define ENABLE_USER_ALGO_LIST 1
-#endif
-
-/* Encryption - at least one required.
- * Protocol RFC requires 3DES and recommends AES128 for interoperability.
- * Including multiple keysize variants the same cipher 
- * (eg AES256 as well as AES128) will result in a minimal size increase.*/
-#ifndef DROPBEAR_AES128
-#define DROPBEAR_AES128 1
-#endif
-#ifndef DROPBEAR_3DES
-#define DROPBEAR_3DES 1
-#endif
-#ifndef DROPBEAR_AES256
-#define DROPBEAR_AES256 1
-#endif
-/* Compiling in Blowfish will add ~6kB to runtime heap memory usage */
-/*#define DROPBEAR_BLOWFISH*/
-#ifndef DROPBEAR_TWOFISH256
-#define DROPBEAR_TWOFISH256 1
-#endif
-#ifndef DROPBEAR_TWOFISH128
-#define DROPBEAR_TWOFISH128 1
-#endif
-
-/* Enable CBC mode for ciphers. This has security issues though
- * is the most compatible with