Partly to reassure the user that they got what they asked for, and
partly so that's a clue for us in the logs when we get bug reports.
This involved repurposing platform_psftp_post_option_setup() (no longer
used since
e22120fe) as platform_psftp_pre_conn_setup(), and moving it
to after logging is set up.
logctx = log_init(NULL, conf);
console_provide_logctx(logctx);
+ platform_psftp_pre_conn_setup();
+
err = back->init(NULL, &backhandle, conf,
conf_get_str(conf, CONF_host),
conf_get_int(conf, CONF_port),
argv += i;
back = NULL;
- platform_psftp_post_option_setup();
-
if (list) {
if (argc != 1)
usage();
logctx = log_init(NULL, conf);
console_provide_logctx(logctx);
+ platform_psftp_pre_conn_setup();
+
err = back->init(NULL, &backhandle, conf,
conf_get_str(conf, CONF_host),
conf_get_int(conf, CONF_port),
argv += i;
back = NULL;
- platform_psftp_post_option_setup();
-
/*
* If the loaded session provides a hostname, and a hostname has not
* otherwise been specified, pop it in `userhost' so that
char *ssh_sftp_get_cmdline(const char *prompt, int backend_required);
/*
- * Platform-specific function called after the command line has been
- * processed, so that any per-platform initialisation such as process
- * ACL setup can be done.
+ * Platform-specific function called when we're about to make a
+ * network connection.
*/
-void platform_psftp_post_option_setup(void);
+void platform_psftp_pre_conn_setup(void);
/*
* The main program in psftp.c. Called from main() in the platform-
void frontend_net_error_pending(void) {}
-void platform_psftp_post_option_setup(void) {}
+void platform_psftp_pre_conn_setup(void) {}
/*
* Main program: do platform-specific initialisation and then call
}
}
+ if (restricted_acl) {
+ logevent(NULL, "Running with restricted process ACL");
+ }
+
start_backend();
/*
return 1;
}
+ if (restricted_acl) {
+ logevent(NULL, "Running with restricted process ACL");
+ }
+
/*
* Start up the connection.
*/
return ctx->line;
}
-void platform_psftp_post_option_setup(void)
+void platform_psftp_pre_conn_setup(void)
{
+ if (restricted_acl) {
+ logevent(NULL, "Running with restricted process ACL");
+ }
}
/* ----------------------------------------------------------------------