Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/pam-u2f/dist define as empty when not debugging



details:   https://anonhg.NetBSD.org/src/rev/c635dd2a6604
branches:  trunk
changeset: 745465:c635dd2a6604
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 03 00:20:20 2020 +0000

description:
define as empty when not debugging

diffstat:

 external/bsd/pam-u2f/dist/util.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r e9040157082c -r c635dd2a6604 external/bsd/pam-u2f/dist/util.c
--- a/external/bsd/pam-u2f/dist/util.c  Tue Mar 03 00:18:44 2020 +0000
+++ b/external/bsd/pam-u2f/dist/util.c  Tue Mar 03 00:20:20 2020 +0000
@@ -236,7 +236,7 @@
       *n_devs = 0;
 
       i = 0;
-      while ((s_token = strtok_r(NULL, ",", &saveptr))) {
+      while ((s_token = strtok_r(NULL, ",", &saveptr)) != NULL) {
         if ((*n_devs)++ > max_devs - 1) {
           *n_devs = max_devs;
           if (verbose)
@@ -1131,7 +1131,7 @@
 
 char *converse(pam_handle_t *pamh, int echocode, const char *prompt) {
   const struct pam_message msg = {.msg_style = echocode,
-                                  .msg = (char *) prompt};
+                                  .msg = (char *)(uintptr_t)prompt};
   const struct pam_message *msgs = &msg;
   struct pam_response *resp = NULL;
   int retval = _converse(pamh, 1, &msgs, &resp);
@@ -1163,10 +1163,10 @@
             const char *fmt, ...) {
   va_list ap;
   va_start(ap, fmt);
-#ifdef __linux__
+#ifdef LOG_DEBUG
   if (debug_file == (FILE *) -1) {
-    syslog(LOG_AUTHPRIV | LOG_DEBUG, DEBUG_STR, file, line, func);
-    vsyslog(LOG_AUTHPRIV | LOG_DEBUG, fmt, ap);
+    syslog(LOG_AUTHPRIV | LOG_ERR, DEBUG_STR, file, line, func);
+    vsyslog(LOG_AUTHPRIV | LOG_ERR, fmt, ap);
   } else {
     fprintf(debug_file, DEBUG_STR, file, line, func);
     vfprintf(debug_file, fmt, ap);



Home | Main Index | Thread Index | Old Index