Mercurial > dropbear
diff default_options.h @ 1921:284c3837891c
Allow user space file locations (rootless support)
Why:
Running dropbear as a user (rootless) is aided if
files and programs can be saved/removed without
needing sudo.
What:
Use the same convention as DROPBEAR_DEFAULT_CLI_AUTHKEY;
if not starting with '/', then is relative to hedge's /home/hedge:
*_PRIV_FILENAME
DROPBEAR_PIDFILE
SFTPSERVER_PATH
default_options.h commentary added.
Changes kept to a minimum, so log entry in svr_kex.c#163
is refactored.
From:
Generated hostkey is <path> ... <finger-print>
to:
Generated hostkey path is <path>
Generated hostkey fingerprint is <fp>
Otherwise the unexpanded path was reported.
Patch modified by Matt Johnston
Signed-off-by: Begley Brothers Inc <[email protected]>
author | Begley Brothers Inc <begleybrothers@gmail.com> |
---|---|
date | Thu, 09 Jul 2020 17:47:58 +1000 |
parents | ff8a81386a2b |
children | 70f05f7d4d11 |
line wrap: on
line diff
--- a/default_options.h Wed Mar 30 12:56:09 2022 +0800 +++ b/default_options.h Thu Jul 09 17:47:58 2020 +1000 @@ -18,7 +18,9 @@ /* Listen on all interfaces */ #define DROPBEAR_DEFADDRESS "" -/* Default hostkey paths - these can be specified on the command line */ +/* Default hostkey paths - these can be specified on the command line. + * Homedir is prepended if path begins with ~ + */ #define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key" #define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key" #define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key" @@ -231,9 +233,10 @@ #define DROPBEAR_CLI_PASSWORD_AUTH 1 #define DROPBEAR_CLI_PUBKEY_AUTH 1 -/* A default argument for dbclient -i <privatekey>. -Homedir is prepended unless path begins with / */ -#define DROPBEAR_DEFAULT_CLI_AUTHKEY ".ssh/id_dropbear" +/* A default argument for dbclient -i <privatekey>. + * Homedir is prepended if path begins with ~ + */ +#define DROPBEAR_DEFAULT_CLI_AUTHKEY "~/.ssh/id_dropbear" /* Allow specifying the password for dbclient via the DROPBEAR_PASSWORD * environment variable. */ @@ -275,7 +278,9 @@ #define UNAUTH_CLOSE_DELAY 0 /* The default file to store the daemon's process ID, for shutdown - scripts etc. This can be overridden with the -P flag */ + * scripts etc. This can be overridden with the -P flag. + * Homedir is prepended if path begins with ~ + */ #define DROPBEAR_PIDFILE "/var/run/dropbear.pid" /* The command to invoke for xauth when using X11 forwarding. @@ -283,9 +288,11 @@ #define XAUTH_COMMAND "/usr/bin/xauth -q" -/* if you want to enable running an sftp server (such as the one included with +/* If you want to enable running an sftp server (such as the one included with * OpenSSH), set the path below and set DROPBEAR_SFTPSERVER. - * The sftp-server program is not provided by Dropbear itself */ + * The sftp-server program is not provided by Dropbear itself. + * Homedir is prepended if path begins with ~ + */ #define DROPBEAR_SFTPSERVER 1 #define SFTPSERVER_PATH "/usr/libexec/sftp-server"