Re: [PATCH] newgrp: use libc explicit_bzero() when it is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/05/2017 11:33 PM, Sami Kerola wrote:
> +#ifdef HAVE_EXPLICIT_BZERO
> +		explicit_bzero(xpwd, strlen(xpwd));
> +#else
>  		xmemset_s(xpwd, strlen(xpwd), 0);
> +#endif
>  		free(xpwd);

Do you think it's worth making things even more complicated
for overwriting a simple string?  I mean, a simple

  for (char *c = xpwd; c; c++)
    c = '\0';

would do, wouldn't it?

Have a nice day,
Berny
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux