Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2018 19:57:47 +0000 (UTC)
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335678 - head/lib/libcasper/services/cap_pwd
Message-ID:  <201806261957.w5QJvl86029037@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oshogbo
Date: Tue Jun 26 19:57:47 2018
New Revision: 335678
URL: https://svnweb.freebsd.org/changeset/base/335678

Log:
  [libcasper] Use explicit_bzero instead of memset to clear pwd struct
  
  Submitted by:	David Carlier <devnexen@gmail.com>
  Differential Revision:	https://reviews.freebsd.org/D16015

Modified:
  head/lib/libcasper/services/cap_pwd/cap_pwd.c

Modified: head/lib/libcasper/services/cap_pwd/cap_pwd.c
==============================================================================
--- head/lib/libcasper/services/cap_pwd/cap_pwd.c	Tue Jun 26 19:26:07 2018	(r335677)
+++ head/lib/libcasper/services/cap_pwd/cap_pwd.c	Tue Jun 26 19:57:47 2018	(r335678)
@@ -100,7 +100,7 @@ passwd_unpack(const nvlist_t *nvl, struct passwd *pwd,
 	if (!nvlist_exists_string(nvl, "pw_name"))
 		return (EINVAL);
 
-	memset(pwd, 0, sizeof(*pwd));
+	explicit_bzero(pwd, sizeof(*pwd));
 
 	error = passwd_unpack_string(nvl, "pw_name", &pwd->pw_name, &buffer,
 	    &bufsize);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806261957.w5QJvl86029037>