[PATCH] memset_s() and talloc_set_secure()
Ralph Böhme
slow at samba.org
Thu Oct 11 10:58:31 UTC 2018
Hi Andreas,
On Thu, Oct 11, 2018 at 12:17:55PM +0200, Andreas Schneider via samba-technical wrote:
>Please review and someone who knows how to change the version of talloc
>correctly, please push.
thanks a lot for looking into this!
>--- a/lib/replace/replace.h
>+++ b/lib/replace/replace.h
>@@ -925,6 +925,11 @@ void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
> void rep_setproctitle_init(int argc, char *argv[], char *envp[]);
> #endif
this missised the define and check for __STDC_WANT_LIB_EXT1__ and
__STDC_LIB_EXT1__ as pointed out or IRC.
>
>+#ifndef HAVE_MEMSET_S
>+#define memset_s rep_memset_s
>+int rep_memset_s(void *dest, size_t destsz, int ch, size_t count);
>+#endif
>+
> #ifndef FALL_THROUGH
> # ifdef HAVE_FALLTHROUGH_ATTRIBUTE
> # define FALL_THROUGH __attribute__ ((fallthrough))
>diff --git a/lib/replace/wscript b/lib/replace/wscript
>index 8e2873424be..8adfffe9584 100644
>--- a/lib/replace/wscript
>+++ b/lib/replace/wscript
>@@ -195,6 +195,23 @@ def configure(conf):
> 'socket nsl', checklibc=True,
> headers='sys/socket.h netinet/in.h arpa/inet.h netdb.h')
>
>+ conf.CHECK_FUNCS('memset_s memset_explicit')
dito. You don't get memset_s if you don't request it.
-slow
--
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
GPG Key Fingerprint: FAE2 C608 8A24 2520 51C5
59E4 AA1E 9B71 2639 9E46
More information about the samba-technical
mailing list