Tue Jan 7 02:15:02 2014 UTC ()
Ignore non-literal format strings, the modifications can't be expressed
with the current framework.


(joerg)
diff -r1.5 -r1.6 src/external/bsd/openpam/dist/lib/openpam_log.c

cvs diff -r1.5 -r1.6 src/external/bsd/openpam/dist/lib/Attic/openpam_log.c (expand / switch to unified diff)

--- src/external/bsd/openpam/dist/lib/Attic/openpam_log.c 2013/12/27 20:10:21 1.5
+++ src/external/bsd/openpam/dist/lib/Attic/openpam_log.c 2014/01/07 02:15:02 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: openpam_log.c,v 1.5 2013/12/27 20:10:21 christos Exp $ */ 1/* $NetBSD: openpam_log.c,v 1.6 2014/01/07 02:15:02 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002-2003 Networks Associates Technology, Inc. 4 * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
5 * Copyright (c) 2004-2011 Dag-Erling Smørgrav 5 * Copyright (c) 2004-2011 Dag-Erling Smørgrav
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This software was developed for the FreeBSD Project by ThinkSec AS and 8 * This software was developed for the FreeBSD Project by ThinkSec AS and
9 * Network Associates Laboratories, the Security Research Division of 9 * Network Associates Laboratories, the Security Research Division of
10 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 10 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
11 * ("CBOSS"), as part of the DARPA CHATS research program. 11 * ("CBOSS"), as part of the DARPA CHATS research program.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions 14 * modification, are permitted provided that the following conditions
@@ -86,26 +86,27 @@ openpam_log(int level, const char *fmt,  @@ -86,26 +86,27 @@ openpam_log(int level, const char *fmt,
86 default: 86 default:
87 priority = LOG_ERR; 87 priority = LOG_ERR;
88 break; 88 break;
89 } 89 }
90 serrno = errno; 90 serrno = errno;
91 va_start(ap, fmt); 91 va_start(ap, fmt);
92 vsyslog(priority, fmt, ap); 92 vsyslog(priority, fmt, ap);
93 va_end(ap); 93 va_end(ap);
94 errno = serrno; 94 errno = serrno;
95} 95}
96 96
97#else 97#else
98 98
 99#pragma GCC diagnostic ignored "-Wformat-nonliteral"
99void 100void
100_openpam_log(int level, const char *func, const char *fmt, ...) 101_openpam_log(int level, const char *func, const char *fmt, ...)
101{ 102{
102 va_list ap; 103 va_list ap;
103 char *format; 104 char *format;
104 int priority; 105 int priority;
105 int serrno; 106 int serrno;
106 107
107 switch (level) { 108 switch (level) {
108 case PAM_LOG_LIBDEBUG: 109 case PAM_LOG_LIBDEBUG:
109 case PAM_LOG_DEBUG: 110 case PAM_LOG_DEBUG:
110 if (!openpam_debug) 111 if (!openpam_debug)
111 return; 112 return;