Skip to content

Commit d371f90

Browse files
committed
configure: Fix (deprecated) plugin option
Actually two issues here. On one hand there was the incomplete rename from --enable-plugin to --enable-plugin-deprecated triggering new warnings with dropbear-2026.92. Technically new options where ignored while the old --enable-plugin and --disable-plugin where still considered. On the other hand the previous option was broken from the beginning, because when passing --enable-plugin or --disable-plugin explicitly the option was not evaluated correctly. Link: https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Package-Options.html Fixes: 8c6aaf8 ("External Public-Key Authentication API (#72)") Fixes: #298 Fixes: e3e7b28 ("Make -t two factor and plugins deprecated") Signed-off-by: Alexander Dahl <ada@thorsis.com>
1 parent cfedf98 commit d371f90

2 files changed

Lines changed: 28 additions & 10 deletions

File tree

configure

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ enable_pam
736736
enable_openpty
737737
enable_syslog
738738
enable_shadow
739-
enable_plugin
739+
enable_plugin_deprecated
740740
enable_fuzz
741741
enable_bundled_libtom
742742
enable_lastlog
@@ -5838,22 +5838,33 @@ fi
58385838

58395839

58405840
# Plugin support will be removed soon. Open a github issue if you're using it.
5841-
# Check whether --enable-plugin was given.
5842-
if test ${enable_plugin+y}
5841+
# Check whether --enable-plugin-deprecated was given.
5842+
if test ${enable_plugin_deprecated+y}
58435843
then :
5844-
enableval=$enable_plugin;
5844+
enableval=$enable_plugin_deprecated;
5845+
if test "x$enableval" = "xyes"; then
58455846

58465847
printf "%s\n" "#define DROPBEAR_PLUGIN 1" >>confdefs.h
58475848

5848-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling support for External Public Key Authentication" >&5
5849+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling support for External Public Key Authentication" >&5
58495850
printf "%s\n" "$as_me: Enabling support for External Public Key Authentication" >&6;}
5850-
DROPBEAR_PLUGIN=1
5851+
DROPBEAR_PLUGIN=1
5852+
else
5853+
5854+
printf "%s\n" "#define DROPBEAR_PLUGIN 0" >>confdefs.h
5855+
5856+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling support for External Public Key Authentication" >&5
5857+
printf "%s\n" "$as_me: Disabling support for External Public Key Authentication" >&6;}
5858+
DROPBEAR_PLUGIN=0
5859+
fi
58515860

58525861
else $as_nop
58535862

58545863

58555864
printf "%s\n" "#define DROPBEAR_PLUGIN 0" >>confdefs.h
58565865

5866+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling support for External Public Key Authentication" >&5
5867+
printf "%s\n" "$as_me: Disabling support for External Public Key Authentication" >&6;}
58575868
DROPBEAR_PLUGIN=0
58585869

58595870

configure.ac

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,22 @@ AC_ARG_ENABLE(shadow,
345345
)
346346

347347
# Plugin support will be removed soon. Open a github issue if you're using it.
348-
AC_ARG_ENABLE(plugin,
348+
AC_ARG_ENABLE(plugin-deprecated,
349349
[AS_HELP_STRING([--enable-plugin-deprecated], [Enable support for External Public Key Authentication plug-in])],
350350
[
351-
AC_DEFINE(DROPBEAR_PLUGIN, 1, External Public Key Authentication)
352-
AC_MSG_NOTICE(Enabling support for External Public Key Authentication)
353-
DROPBEAR_PLUGIN=1
351+
if test "x$enableval" = "xyes"; then
352+
AC_DEFINE(DROPBEAR_PLUGIN, 1, External Public Key Authentication)
353+
AC_MSG_NOTICE(Enabling support for External Public Key Authentication)
354+
DROPBEAR_PLUGIN=1
355+
else
356+
AC_DEFINE(DROPBEAR_PLUGIN, 0, External Public Key Authentication)
357+
AC_MSG_NOTICE(Disabling support for External Public Key Authentication)
358+
DROPBEAR_PLUGIN=0
359+
fi
354360
],
355361
[
356362
AC_DEFINE(DROPBEAR_PLUGIN, 0, External Public Key Authentication)
363+
AC_MSG_NOTICE(Disabling support for External Public Key Authentication)
357364
DROPBEAR_PLUGIN=0
358365
]
359366

0 commit comments

Comments
 (0)