]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Revert "tools: s/strncpy()/strlcpy()/g"
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 11 May 2018 13:56:58 +0000 (15:56 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Dec 2018 07:19:24 +0000 (08:19 +0100)
This reverts commit 2ec47d5149e73db97f7877d06d67cb11421097bb.

First, I forgot to actually replace strncpy() with strlcpy(). Second, we don't
want to \0-terminate since this is an abstract unix socket and this is not
required. Instead, let's simply use memcpy() which is more correct and also
silences gcc-8.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/Makefile.am
src/lxc/tools/lxc_monitor.c

index 69f9a5eaa5393bce8ec904ed6cbf4b85549b0bee..1b10d6f63bde327b8ac8c69b6791299699d562ea 100644 (file)
@@ -289,10 +289,6 @@ if !HAVE_GETSUBOPT
 lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
 endif
 
-if !HAVE_STRLCPY
-lxc_monitor_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
-endif
-
 if HAVE_STATIC_LIBCAP
 sbin_PROGRAMS += init.lxc.static
 
index 3b629472cac03805bf56a022de20ecfac61caace..683df64613f9eb9323e645d282bb2fba549e8e2b 100644 (file)
 #include "arguments.h"
 #include "lxccontainer.h"
 
-#ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
-#endif
-
 static bool quit_monitord;
 
 static int my_parser(struct lxc_arguments* args, int c, char* arg)