[hackers] [ubase] Remove explicit_bzero() calls || sin

From: <git_AT_suckless.org>
Date: Tue, 03 Jun 2014 13:18:23 +0200

commit 2f10d16b9fc907a05a3b40573a614a561a40d68f
Author: sin <sin_AT_2f30.org>
Date: Tue Jun 3 12:13:48 2014 +0100

    Remove explicit_bzero() calls

diff --git a/login.c b/login.c
index 36de069..a1cb0e2 100644
--- a/login.c
+++ b/login.c
_AT_@ -85,16 +85,12 @@ main(int argc, char *argv[])
                         eprintf("denied
");
                 }
                 cryptpass = crypt(pass, spw->sp_pwdp);
- explicit_bzero(pass, strlen(pass));
                 if (!cryptpass)
                         eprintf("crypt:");
                 if (strcmp(cryptpass, spw->sp_pwdp) != 0)
                         eprintf("login failed
");
- explicit_bzero(cryptpass, strlen(cryptpass));
- explicit_bzero(spw, sizeof *spw);
         } else {
                 cryptpass = crypt(pass, pw->pw_passwd);
- explicit_bzero(pass, strlen(pass));
                 if (!cryptpass)
                         eprintf("crypt:");
                 if (strcmp(cryptpass, pw->pw_passwd) != 0)
diff --git a/su.c b/su.c
index 2c32338..f5ac7d9 100644
--- a/su.c
+++ b/su.c
_AT_@ -101,7 +101,6 @@ main(int argc, char *argv[])
                         if (strcmp(cryptpass, spw->sp_pwdp) != 0)
                                 eprintf(randreply());
                 }
- explicit_bzero(spw, sizeof *spw);
         } else {
                 if (uid) {
                         cryptpass = crypt(pass, pw->pw_passwd);
_AT_@ -112,11 +111,6 @@ main(int argc, char *argv[])
                 }
         }
 
- if (uid) {
- explicit_bzero(pass, strlen(pass));
- explicit_bzero(cryptpass, strlen(cryptpass));
- }
-
 dosu:
         if (initgroups(usr, pw->pw_gid) < 0)
                 eprintf("initgroups:");
Received on Tue Jun 03 2014 - 13:18:23 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 03 2014 - 13:24:08 CEST