explicit_bzero(3bsd)
π explicit_bzero β the manual page, but make it slay π
okay bestie, come sit with me π this is explicit_bzero(3bsd), a lil function from the BSD world that is genuinely iconic and also extremely serious business. it's giving "I wipe your secrets and I mean it." no cap.
β¨ NAME β¨
explicit_bzero β write zeroes to a byte string π«Ά
π LIBRARY π
Utility functions from BSD systems β that's libbsd, and you link it with -lbsd. π
πΈ SYNOPSIS πΈ
#include <string.h>
(See libbsd(7) for include usage.)
void
explicit_bzero(void *buf, size_t len);
heads up bestie: peep libbsd(7) for the whole include-usage situation, because it's a whole thing. iykyk π§
π DESCRIPTION π
so like. the explicit_bzero() function writes len zero bytes into the string buf. that's it, that's the job, and she does it flawlessly. β¨
and if len is zero? then explicit_bzero() literally does nothing. zero bytes of zeroes. it's giving "girl, there was nothing to do." π
now here's the part that makes her main character energy: explicit_bzero() behaves the same as the bzero() function, BUT β and this is the whole point, fr fr β she will not be removed by a compiler's dead store optimization pass. π
which means she's useful for clearing sensitive memory such as a password. π because your compiler is out here like "hmm, nobody reads this memory afterward, let me just delete that line for you, you're welcome π₯°" and you're like NO. THAT WAS MY PASSWORD. π explicit_bzero() says "not on my watch." periodt.
π SEE ALSO π
go read those too, bestie, they're the supporting cast π¦
β HISTORY β
the explicit_bzero() function first appeared in OpenBSD 5.5 and in glibc 2.25. a legend from day one, honestly. π
and that's the whole page!! π this lil beauty came from the Debian crew and it's dated January 22, 2014 β and yeah, it's filed under explicit_bzero(3bsd) in the LOCAL section, so now you know exactly where to find her. π stay safe out there, wipe your passwords, love u bye π«Άβ¨π
π¦ where this page comes from
- alpine 3.22: libbsd-doc 0.12.2-r0 Β· BSD-3-Clause
- alpine 3.23: libbsd-doc 0.12.2-r0 Β· BSD-3-Clause
- alpine 3.24: libbsd-doc 0.12.2-r0 Β· BSD-3-Clause
- arch rolling: libbsd 0.12.2-2 Β· custom
- debian bookworm: libbsd-dev 0.11.7-2
- debian trixie: libbsd-dev 0.12.2-2
- epel 10: libbsd-devel 0.12.2-4.el10_0 Β· Beerware AND BSD-2-Clause AND BSD-3-Clause AND ISC AND libutil-David-Nugent AND MIT AND LicenseRef-Fedora-Public-Domain
- epel 9: libbsd-devel 0.12.2-1.el9 Β· Beerware AND BSD-2-Clause AND BSD-3-Clause AND ISC AND libutil-David-Nugent AND MIT AND LicenseRef-Fedora-Public-Domain
- fedora 43: libbsd-devel 0.12.2-6.fc43 Β· Beerware AND BSD-2-Clause AND BSD-3-Clause AND ISC AND libutil-David-Nugent AND MIT AND LicenseRef-Fedora-Public-Domain
- fedora 43: libbsd-devel 0.12.2-6.fc43 Β· Beerware AND BSD-2-Clause AND BSD-3-Clause AND ISC AND libutil-David-Nugent AND MIT AND LicenseRef-Fedora-Public-Domain
- fedora 44: libbsd-devel 0.12.2-7.fc44 Β· Beerware AND BSD-2-Clause AND BSD-3-Clause AND ISC AND libutil-David-Nugent AND MIT AND LicenseRef-Fedora-Public-Domain
- fedora 44: libbsd-devel 0.12.2-7.fc44 Β· Beerware AND BSD-2-Clause AND BSD-3-Clause AND ISC AND libutil-David-Nugent AND MIT AND LicenseRef-Fedora-Public-Domain
- nixos 26.05: libbsd 0.12.2
- nixpkgs unstable: libbsd 0.12.2
- opensuse-leap 16.0: libbsd-devel 0.11.7-160000.3.2 Β· BSD-3-Clause
- opensuse-leap 16.0: libbsd-devel 0.11.7-160000.3.2 Β· BSD-3-Clause
- opensuse-leap 16.0: libbsd-devel 0.11.7-160000.3.2 Β· BSD-3-Clause
- opensuse-leap 16.0: libbsd-devel 0.11.7-160000.3.2 Β· BSD-3-Clause
- ubuntu noble: libbsd-dev 0.12.1-1build1
- ubuntu noble: libbsd-dev 0.12.1-1build1.1
- ubuntu questing: libbsd-dev 0.12.2-2build1
- ubuntu resolute: libbsd-dev 0.12.2-2build2
- ubuntu stonking: libbsd-dev 0.12.2-3
- Copyright (c) 1990, 1991 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms