pws_memnuke man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

PWS_STR_MEMNUKE(3)	 BSD Library Functions Manual	    PWS_STR_MEMNUKE(3)

NAME
     pws_str_memnuke — Over-write the contents of a memory buffer with zeros

LIBRARY
     -lpwstor

SYNOPSIS
     #include <pwstor.h>

     void
     pws_str_memnuke(volatile void *b, size_t sz);

DESCRIPTION
     The function pws_str_memnuke() will over-write sz bytes of memory from
     the pointer referenced by b with zeros.  This is useful for clearing a
     memory buffer which contained, for example, a clear-text password.	 Calls
     to free() do not zero the memory, so another application could conceiv‐
     ably allocate memory which contains sensitive data from another applica‐
     tion.  Calling pws_str_memnuke() on the buffer prior to calling free() on
     it will prevent this potentially dangerous condition.

CAVEATS
     The pws_str_memnuke() function cannot indicate an error, for example if
     it returns prematurely because a null-pointer was passed to it.  It
     requires that b be cast (volatile) in order to prevent compilers from
     optimizing it out so that memory is safely wiped.

SEE ALSO
     pwstor(3)

BSD			       October 23, 2008				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net