address review feedback

This commit is contained in:
Tess Gauthier 2024-09-13 15:34:15 -04:00
parent f0d05b5fec
commit 4d7e9c189c
4 changed files with 23 additions and 22 deletions

15
log.c
View File

@ -452,21 +452,6 @@ sshlogdie(const char *file, const char *func, int line, int showfunc,
cleanup_exit(255);
}
#ifdef WINDOWS
void
sshsigdie(const char* file, const char* func, int line, int showfunc,
LogLevel level, const char* suffix, const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
suffix, fmt, args);
va_end(args);
_exit(1);
}
#endif /* WINDOWS */
void
sshlogv(const char *file, const char *func, int line, int showfunc,
LogLevel level, const char *suffix, const char *fmt, va_list args)

View File

@ -904,7 +904,11 @@ pkcs11_add_provider(char *name, char *pin, struct sshkey ***keysp,
struct sshkey *k;
int r, type;
u_char *blob;
char *label;
#ifdef WINDOWS
char *label = NULL;
#else
char* label;
#endif /* WINDOWS*/
size_t blen;
u_int nkeys, i;
struct sshbuf *msg;

View File

@ -94,7 +94,11 @@ process_sign(struct sshbuf *req)
struct sshbuf *resp, *kbuf;
struct sshkey *key = NULL;
uint32_t compat;
const u_char *message;
#ifdef WINDOWS
const u_char *message = NULL;
#else
const u_char* message;
#endif /* WINDOWS */
u_char *sig = NULL;
size_t msglen, siglen = 0;
char *provider = NULL, *pin = NULL;
@ -160,9 +164,15 @@ process_enroll(struct sshbuf *req)
{
int r;
u_int type;
char *provider, *application, *pin, *device, *userid;
#ifdef WINDOWS
char *provider = NULL, *application = NULL, *pin, *device, *userid;
uint8_t flags;
struct sshbuf *challenge, *attest, *kbuf, *resp;
struct sshbuf *challenge = NULL, *attest, *kbuf = NULL, *resp;
#else
char* provider, * application, * pin, * device, * userid;
uint8_t flags;
struct sshbuf* challenge, * attest, * kbuf, * resp;
#endif /* WINDOWS*/
struct sshkey *key;
if ((attest = sshbuf_new()) == NULL ||
@ -294,7 +304,11 @@ main(int argc, char **argv)
{
SyslogFacility log_facility = SYSLOG_FACILITY_AUTH;
LogLevel log_level = SYSLOG_LEVEL_ERROR;
struct sshbuf *req, *resp;
#ifdef WINDOWS
struct sshbuf *req, *resp = NULL;
#else
struct sshbuf* req, * resp;
#endif /* WINDOWS */
int in, out, ch, r, vflag = 0;
u_int rtype, ll = 0;
uint8_t version, log_stderr = 0;

2
sshd.c
View File

@ -1761,8 +1761,6 @@ main(int ac, char **av)
rexec_argv = xcalloc(rexec_argc + 3, sizeof(char *));
/* Point to the sshd-session binary instead of sshd */
rexec_argv[0] = options.sshd_session_path;
extern wchar_t* __wprogdir;
debug("__wprogdir: %ls", __wprogdir);
for (i = 1; i < (u_int)rexec_argc; i++) {
debug("rexec_argv[%d]='%s'", i, saved_argv[i]);
rexec_argv[i] = saved_argv[i];