Module Name: src
Committed By: riastradh
Date: Thu Jul 11 17:26:53 UTC 2024
Modified Files:
src/crypto/external/bsd/openssh/dist: auth-pam.c clientloop.c
sshd-session.c sshd.c
Log Message:
openssh: Appease clang.
- Sprinke __dead on functions that don't return.
- Suppress -Wformat-nonliteral for a safely-constructed format string
in clientloop.c quit_message.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/openssh/dist/auth-pam.c
cvs rdiff -u -r1.41 -r1.42 src/crypto/external/bsd/openssh/dist/clientloop.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/dist/sshd-session.c
cvs rdiff -u -r1.52 -r1.53 src/crypto/external/bsd/openssh/dist/sshd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/openssh/dist/auth-pam.c
diff -u src/crypto/external/bsd/openssh/dist/auth-pam.c:1.22 src/crypto/external/bsd/openssh/dist/auth-pam.c:1.23
--- src/crypto/external/bsd/openssh/dist/auth-pam.c:1.22 Mon Jul 8 22:33:43 2024
+++ src/crypto/external/bsd/openssh/dist/auth-pam.c Thu Jul 11 17:26:53 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: auth-pam.c,v 1.22 2024/07/08 22:33:43 christos Exp $ */
+/* $NetBSD: auth-pam.c,v 1.23 2024/07/11 17:26:53 riastradh Exp $ */
/*-
* Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -53,7 +53,7 @@
/*
* NetBSD local changes
*/
-__RCSID("$NetBSD: auth-pam.c,v 1.22 2024/07/08 22:33:43 christos Exp $");
+__RCSID("$NetBSD: auth-pam.c,v 1.23 2024/07/11 17:26:53 riastradh Exp $");
#define _LIB_PTHREAD_H
#undef USE_POSIX_THREADS /* Not yet */
#define HAVE_SECURITY_PAM_APPL_H
@@ -1206,6 +1206,7 @@ static struct pam_conv tty_conv = { sshp
* XXX this should be done in the authentication phase, but ssh1 doesn't
* support that
*/
+__dead /* fatal is __dead */
void
do_pam_chauthtok(void)
{
Index: src/crypto/external/bsd/openssh/dist/clientloop.c
diff -u src/crypto/external/bsd/openssh/dist/clientloop.c:1.41 src/crypto/external/bsd/openssh/dist/clientloop.c:1.42
--- src/crypto/external/bsd/openssh/dist/clientloop.c:1.41 Mon Jul 8 22:33:43 2024
+++ src/crypto/external/bsd/openssh/dist/clientloop.c Thu Jul 11 17:26:53 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: clientloop.c,v 1.41 2024/07/08 22:33:43 christos Exp $ */
+/* $NetBSD: clientloop.c,v 1.42 2024/07/11 17:26:53 riastradh Exp $ */
/* $OpenBSD: clientloop.c,v 1.408 2024/07/01 04:31:17 djm Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: clientloop.c,v 1.41 2024/07/08 22:33:43 christos Exp $");
+__RCSID("$NetBSD: clientloop.c,v 1.42 2024/07/11 17:26:53 riastradh Exp $");
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -200,7 +200,10 @@ quit_message(const char *fmt, ...)
xasprintf(&fmt2, "%s\r\n", fmt);
va_start(args, fmt);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
xvasprintf(&msg, fmt2, args);
+#pragma GCC diagnostic pop
va_end(args);
(void)atomicio(vwrite, STDERR_FILENO, msg, strlen(msg));
Index: src/crypto/external/bsd/openssh/dist/sshd-session.c
diff -u src/crypto/external/bsd/openssh/dist/sshd-session.c:1.2 src/crypto/external/bsd/openssh/dist/sshd-session.c:1.3
--- src/crypto/external/bsd/openssh/dist/sshd-session.c:1.2 Mon Jul 8 22:33:44 2024
+++ src/crypto/external/bsd/openssh/dist/sshd-session.c Thu Jul 11 17:26:53 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: sshd-session.c,v 1.2 2024/07/08 22:33:44 christos Exp $ */
+/* $NetBSD: sshd-session.c,v 1.3 2024/07/11 17:26:53 riastradh Exp $ */
/* $OpenBSD: sshd-session.c,v 1.4 2024/06/26 23:16:52 deraadt Exp $ */
/*
@@ -30,7 +30,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: sshd-session.c,v 1.2 2024/07/08 22:33:44 christos Exp $");
+__RCSID("$NetBSD: sshd-session.c,v 1.3 2024/07/11 17:26:53 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -204,6 +204,7 @@ static void do_ssh2_kex(struct ssh *);
* As usual, this may only take signal-safe actions, even though it is
* terminal.
*/
+__dead
static void
grace_alarm_handler(int sig)
{
Index: src/crypto/external/bsd/openssh/dist/sshd.c
diff -u src/crypto/external/bsd/openssh/dist/sshd.c:1.52 src/crypto/external/bsd/openssh/dist/sshd.c:1.53
--- src/crypto/external/bsd/openssh/dist/sshd.c:1.52 Mon Jul 8 22:33:44 2024
+++ src/crypto/external/bsd/openssh/dist/sshd.c Thu Jul 11 17:26:53 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: sshd.c,v 1.52 2024/07/08 22:33:44 christos Exp $ */
+/* $NetBSD: sshd.c,v 1.53 2024/07/11 17:26:53 riastradh Exp $ */
/* $OpenBSD: sshd.c,v 1.609 2024/06/27 23:01:15 djm Exp $ */
/*
@@ -27,7 +27,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: sshd.c,v 1.52 2024/07/08 22:33:44 christos Exp $");
+__RCSID("$NetBSD: sshd.c,v 1.53 2024/07/11 17:26:53 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -480,6 +480,7 @@ sighup_handler(int sig)
* Called from the main program after receiving SIGHUP.
* Restarts the server.
*/
+__dead
static void
sighup_restart(void)
{