> On Nov 11, 2017, at 7:30 PM, Matthew Martin <phy1...@gmail.com> wrote:
> 
> There's a stray whitespace change and explicit sorts below exit. [...]

Whoops, here you go.

--
Scott Cheloha

Index: usr.sbin/pppd/auth.c
===================================================================
RCS file: /cvs/src/usr.sbin/pppd/auth.c,v
retrieving revision 1.38
diff -u -p -r1.38 auth.c
--- usr.sbin/pppd/auth.c        24 Jun 2016 17:22:56 -0000      1.38
+++ usr.sbin/pppd/auth.c        12 Nov 2017 02:38:22 -0000
@@ -399,7 +399,7 @@ auth_withpeer_fail(unit, protocol)
     int unit, protocol;
 {
     if (passwd_from_file)
-       BZERO(passwd, MAXSECRETLEN);
+       EXPLICIT_BZERO(passwd, MAXSECRETLEN);
     /*
      * We've failed to authenticate ourselves to our peer.
      * He'll probably take the link down, and there's not much
@@ -422,7 +422,7 @@ auth_withpeer_success(unit, protocol)
        break;
     case PPP_PAP:
        if (passwd_from_file)
-           BZERO(passwd, MAXSECRETLEN);
+           EXPLICIT_BZERO(passwd, MAXSECRETLEN);
        bit = PAP_WITHPEER;
        break;
     default:
@@ -718,8 +718,8 @@ check_passwd(unit, auser, userlen, apass
        set_allowed_addrs(unit, addrs);
     }
 
-    BZERO(passwd, sizeof(passwd));
-    BZERO(secret, sizeof(secret));
+    EXPLICIT_BZERO(passwd, sizeof(passwd));
+    EXPLICIT_BZERO(secret, sizeof(secret));
 
     return ret;
 }
@@ -825,7 +825,7 @@ null_login(unit)
 
     i = scan_authfile(f, "", our_name, (u_int32_t)0, secret, &addrs, filename);
     ret = i >= 0 && (i & NONWILD_CLIENT) != 0 && secret[0] == 0;
-    BZERO(secret, sizeof(secret));
+    EXPLICIT_BZERO(secret, sizeof(secret));
 
     if (ret)
        set_allowed_addrs(unit, addrs);
@@ -864,7 +864,7 @@ get_pap_passwd(passwd)
        return 0;
     if (passwd != NULL)
        strlcpy(passwd, secret, MAXSECRETLEN);
-    BZERO(secret, sizeof(secret));
+    EXPLICIT_BZERO(secret, sizeof(secret));
     return 1;
 }
 
@@ -978,7 +978,7 @@ get_secret(unit, client, server, secret,
        len = MAXSECRETLEN;
     }
     BCOPY(secbuf, secret, len);
-    BZERO(secbuf, sizeof(secbuf));
+    EXPLICIT_BZERO(secbuf, sizeof(secbuf));
     *secret_len = len;
 
     return 1;
Index: usr.sbin/pppd/chap.c
===================================================================
RCS file: /cvs/src/usr.sbin/pppd/chap.c,v
retrieving revision 1.18
diff -u -p -r1.18 chap.c
--- usr.sbin/pppd/chap.c        15 Jan 2015 23:19:48 -0000      1.18
+++ usr.sbin/pppd/chap.c        12 Nov 2017 02:38:22 -0000
@@ -470,7 +470,7 @@ ChapReceiveChallenge(cstate, inp, id, le
        return;
     }
 
-    BZERO(secret, sizeof(secret));
+    EXPLICIT_BZERO(secret, sizeof(secret));
     ChapSendResponse(cstate);
 }
 
@@ -576,7 +576,7 @@ ChapReceiveResponse(cstate, inp, id, len
        }
     }
 
-    BZERO(secret, sizeof(secret));
+    EXPLICIT_BZERO(secret, sizeof(secret));
     ChapSendStatus(cstate, code);
 
     if (code == CHAP_SUCCESS) {
Index: usr.sbin/pppd/pppd.h
===================================================================
RCS file: /cvs/src/usr.sbin/pppd/pppd.h,v
retrieving revision 1.21
diff -u -p -r1.21 pppd.h
--- usr.sbin/pppd/pppd.h        6 Dec 2015 12:00:16 -0000       1.21
+++ usr.sbin/pppd/pppd.h        12 Nov 2017 02:38:23 -0000
@@ -404,6 +404,7 @@ extern struct option_info devnam_info;
 #define BMOVE(s, d, l)         memmove(d, s, l)
 #define BZERO(s, n)            memset(s, 0, n)
 #define EXIT(u)                        quit()
+#define EXPLICIT_BZERO(s, n)   explicit_bzero(s, n)
 
 #define PRINTMSG(m, l) { m[l] = '\0'; syslog(LOG_INFO, "Remote message: %s", 
m); }
 
Index: usr.sbin/pppd/upap.c
===================================================================
RCS file: /cvs/src/usr.sbin/pppd/upap.c,v
retrieving revision 1.10
diff -u -p -r1.10 upap.c
--- usr.sbin/pppd/upap.c        27 Oct 2009 23:59:53 -0000      1.10
+++ usr.sbin/pppd/upap.c        12 Nov 2017 02:38:23 -0000
@@ -402,7 +402,7 @@ upap_rauthreq(u, inp, id, len)
      */
     retcode = check_passwd(u->us_unit, ruser, ruserlen, rpasswd,
                           rpasswdlen, &msg, &msglen);
-    BZERO(rpasswd, rpasswdlen);
+    EXPLICIT_BZERO(rpasswd, rpasswdlen);
 
     upap_sresp(u, retcode, id, msg, msglen);
 

Reply via email to