Blame SOURCES/bz1446254-ipc-allow-fs-sockets.patch

414eb6
diff -upr libqb-1.0.1.orig/configure.ac libqb-1.0.1/configure.ac
414eb6
--- libqb-1.0.1.orig/configure.ac	2016-11-08 11:15:16.000000000 +0000
414eb6
+++ libqb-1.0.1/configure.ac	2017-05-15 10:47:39.042145452 +0100
414eb6
@@ -482,6 +482,11 @@ AC_ARG_WITH([socket-dir],
414eb6
 	[ SOCKETDIR="$withval" ],
414eb6
 	[ SOCKETDIR="$localstatedir/run" ])
414eb6
 
414eb6
+AC_ARG_WITH([force-sockets-config-file],
414eb6
+  [AS_HELP_STRING([--with-force-sockets-config-file=FILE],[config file to force IPC to use filesystem sockets (Linux & Cygwin only) @<:@SYSCONFDIR/libqb/force-filesystem-sockets@:>@])],
414eb6
+	[ FORCESOCKETSFILE="$withval" ],
414eb6
+	[ FORCESOCKETSFILE="$sysconfdir/libqb/force-filesystem-sockets" ])
414eb6
+
414eb6
 AC_SUBST(CP)
414eb6
 # *FLAGS handling goes here
414eb6
 
414eb6
@@ -643,11 +648,14 @@ AM_CONDITIONAL([HAVE_DICT_WORDS], [test
414eb6
 # substitute what we need:
414eb6
 AC_SUBST([SOCKETDIR])
414eb6
 AC_SUBST([LINT_FLAGS])
414eb6
+AC_SUBST([FORCESOCKETSFILE])
414eb6
 
414eb6
 AC_DEFINE_UNQUOTED([SOCKETDIR], "$(eval echo ${SOCKETDIR})", [Socket directory])
414eb6
 AC_DEFINE_UNQUOTED([LOCALSTATEDIR], "$(eval echo ${localstatedir})", [localstate directory])
414eb6
 AC_DEFINE_UNQUOTED([PACKAGE_FEATURES], "${PACKAGE_FEATURES}", [quarterback built-in features])
414eb6
 
414eb6
+AC_DEFINE_UNQUOTED([FORCESOCKETSFILE], "$(eval echo ${FORCESOCKETSFILE})", [for sockets config file])
414eb6
+
414eb6
 # version parsing (for qbconfig.h)
414eb6
 AC_DEFINE_UNQUOTED([QB_VER_MAJOR],
414eb6
                    [$(echo "${VERSION}" \
414eb6
Only in libqb-1.0.1: configure.ac.orig
414eb6
diff -upr libqb-1.0.1.orig/docs/mainpage.h libqb-1.0.1/docs/mainpage.h
414eb6
--- libqb-1.0.1.orig/docs/mainpage.h	2016-11-08 10:10:23.000000000 +0000
414eb6
+++ libqb-1.0.1/docs/mainpage.h	2017-05-15 10:47:39.042145452 +0100
414eb6
@@ -101,6 +101,19 @@
414eb6
  * a single one pushed throughout its lifecycle just with a single thread;
414eb6
  * anything else would likely warrant external synchronization enforcement.
414eb6
  *
414eb6
+ * @par IPC sockets (Linux only)
414eb6
+ * On Linux IPC, abstract (non-filesystem) sockets are used by default. If you
414eb6
+ * need to override this (say in a net=host container) and use sockets that reside
414eb6
+ * in the filesystem, then create a file called /etc/libqb/force-filesystem-sockets
414eb6
+ * - this is the default name and can be changed at ./configure time.
414eb6
+ * The file need contain no text, it's not a configuration file as such, just its
414eb6
+ * presence will activate the feature.
414eb6
+ *
414eb6
+ * Note that this is a global option and read each time a new IPC connection
414eb6
+ * (client or server) is created. So, to avoid having clients that cannot
414eb6
+ * connect to running servers it is STRONGLY recommended to only create or remove
414eb6
+ * this file prior to a system reboot or container restart.
414eb6
+ *
414eb6
  * @par Client API
414eb6
  * @copydoc qbipcc.h
414eb6
  * @see qbipcc.h
414eb6
Only in libqb-1.0.1/docs: mainpage.h.orig
414eb6
diff -upr libqb-1.0.1.orig/lib/ipc_int.h libqb-1.0.1/lib/ipc_int.h
414eb6
--- libqb-1.0.1.orig/lib/ipc_int.h	2016-02-22 16:01:51.000000000 +0000
414eb6
+++ libqb-1.0.1/lib/ipc_int.h	2017-05-15 10:47:39.042145452 +0100
414eb6
@@ -205,4 +205,6 @@ int32_t qb_ipcs_process_request(struct q
414eb6
 
414eb6
 int32_t qb_ipc_us_sock_error_is_disconnected(int err);
414eb6
 
414eb6
+int use_filesystem_sockets(void);
414eb6
+
414eb6
 #endif /* QB_IPC_INT_H_DEFINED */
414eb6
diff -upr libqb-1.0.1.orig/lib/ipc_setup.c libqb-1.0.1/lib/ipc_setup.c
414eb6
--- libqb-1.0.1.orig/lib/ipc_setup.c	2016-11-08 10:10:23.000000000 +0000
414eb6
+++ libqb-1.0.1/lib/ipc_setup.c	2017-05-15 10:47:39.042145452 +0100
414eb6
@@ -69,7 +69,6 @@ struct ipc_auth_data {
414eb6
 
414eb6
 };
414eb6
 
414eb6
-
414eb6
 static int32_t qb_ipcs_us_connection_acceptor(int fd, int revent, void *data);
414eb6
 
414eb6
 ssize_t
414eb6
@@ -286,12 +285,13 @@ qb_ipcc_stream_sock_connect(const char *
414eb6
 	address.sun_len = QB_SUN_LEN(&address);
414eb6
 #endif
414eb6
 
414eb6
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
414eb6
-	snprintf(address.sun_path + 1, UNIX_PATH_MAX - 1, "%s", socket_name);
414eb6
-#else
414eb6
-	snprintf(address.sun_path, sizeof(address.sun_path), "%s/%s", SOCKETDIR,
414eb6
-		 socket_name);
414eb6
-#endif
414eb6
+	if (!use_filesystem_sockets()) {
414eb6
+		snprintf(address.sun_path + 1, UNIX_PATH_MAX - 1, "%s", socket_name);
414eb6
+	} else {
414eb6
+		snprintf(address.sun_path, sizeof(address.sun_path), "%s/%s", SOCKETDIR,
414eb6
+			 socket_name);
414eb6
+	}
414eb6
+
414eb6
 	if (connect(request_fd, (struct sockaddr *)&address,
414eb6
 		    QB_SUN_LEN(&address)) == -1) {
414eb6
 		res = -errno;
414eb6
@@ -535,10 +535,11 @@ qb_ipcs_us_publish(struct qb_ipcs_servic
414eb6
 #endif
414eb6
 
414eb6
 	qb_util_log(LOG_INFO, "server name: %s", s->name);
414eb6
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
414eb6
-	snprintf(un_addr.sun_path + 1, UNIX_PATH_MAX - 1, "%s", s->name);
414eb6
-#else
414eb6
-	{
414eb6
+
414eb6
+	if (!use_filesystem_sockets()) {
414eb6
+		snprintf(un_addr.sun_path + 1, UNIX_PATH_MAX - 1, "%s", s->name);
414eb6
+	}
414eb6
+	else {
414eb6
 		struct stat stat_out;
414eb6
 		res = stat(SOCKETDIR, &stat_out);
414eb6
 		if (res == -1 || (res == 0 && !S_ISDIR(stat_out.st_mode))) {
414eb6
@@ -552,7 +553,6 @@ qb_ipcs_us_publish(struct qb_ipcs_servic
414eb6
 			 s->name);
414eb6
 		unlink(un_addr.sun_path);
414eb6
 	}
414eb6
-#endif
414eb6
 
414eb6
 	res = bind(s->server_sock, (struct sockaddr *)&un_addr,
414eb6
 		   QB_SUN_LEN(&un_addr));
414eb6
@@ -561,15 +561,15 @@ qb_ipcs_us_publish(struct qb_ipcs_servic
414eb6
 		qb_util_perror(LOG_ERR, "Could not bind AF_UNIX (%s)",
414eb6
 			       un_addr.sun_path);
414eb6
 		goto error_close;
414eb6
-	}
414eb6
+        }
414eb6
 
414eb6
 	/*
414eb6
 	 * Allow everyone to write to the socket since the IPC layer handles
414eb6
 	 * security automatically
414eb6
 	 */
414eb6
-#if !defined(QB_LINUX) && !defined(QB_CYGWIN)
414eb6
-	res = chmod(un_addr.sun_path, S_IRWXU | S_IRWXG | S_IRWXO);
414eb6
-#endif
414eb6
+	if (use_filesystem_sockets()) {
414eb6
+	        res = chmod(un_addr.sun_path, S_IRWXU | S_IRWXG | S_IRWXO);
414eb6
+        }
414eb6
 #ifdef SO_PASSCRED
414eb6
 	setsockopt(s->server_sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
414eb6
 #endif
414eb6
@@ -593,6 +593,16 @@ qb_ipcs_us_withdraw(struct qb_ipcs_servi
414eb6
 	qb_util_log(LOG_INFO, "withdrawing server sockets");
414eb6
 	(void)s->poll_fns.dispatch_del(s->server_sock);
414eb6
 	shutdown(s->server_sock, SHUT_RDWR);
414eb6
+
414eb6
+	if (use_filesystem_sockets()) {
414eb6
+		struct sockaddr_un sockname;
414eb6
+		socklen_t socklen = sizeof(sockname);
414eb6
+		if ((getsockname(s->server_sock, (struct sockaddr *)&sockname, &socklen) == 0) &&
414eb6
+		    sockname.sun_family == AF_UNIX) {
414eb6
+			unlink(sockname.sun_path);
414eb6
+		}
414eb6
+	}
414eb6
+
414eb6
 	close(s->server_sock);
414eb6
 	s->server_sock = -1;
414eb6
 	return 0;
414eb6
diff -upr libqb-1.0.1.orig/lib/ipc_socket.c libqb-1.0.1/lib/ipc_socket.c
414eb6
--- libqb-1.0.1.orig/lib/ipc_socket.c	2016-11-08 10:10:23.000000000 +0000
414eb6
+++ libqb-1.0.1/lib/ipc_socket.c	2017-05-15 10:47:39.043145455 +0100
414eb6
@@ -42,6 +42,26 @@ struct ipc_us_control {
414eb6
 };
414eb6
 #define SHM_CONTROL_SIZE (3 * sizeof(struct ipc_us_control))
414eb6
 
414eb6
+int use_filesystem_sockets(void)
414eb6
+{
414eb6
+	static int need_init = 1;
414eb6
+	static int filesystem_sockets = 0;
414eb6
+
414eb6
+	if (need_init) {
414eb6
+		struct stat buf;
414eb6
+
414eb6
+		need_init = 0;
414eb6
+#if defined(QB_LINUX) || defined(QB_CYGWIN)
414eb6
+		if (stat(FORCESOCKETSFILE, &buf) == 0) {
414eb6
+			filesystem_sockets = 1;
414eb6
+		}
414eb6
+#else
414eb6
+		filesystem_sockets = 1;
414eb6
+#endif
414eb6
+	}
414eb6
+	return filesystem_sockets;
414eb6
+}
414eb6
+
414eb6
 static void
414eb6
 set_sock_addr(struct sockaddr_un *address, const char *socket_name)
414eb6
 {
414eb6
@@ -51,12 +71,12 @@ set_sock_addr(struct sockaddr_un *addres
414eb6
 	address->sun_len = QB_SUN_LEN(address);
414eb6
 #endif
414eb6
 
414eb6
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
414eb6
-	snprintf(address->sun_path + 1, UNIX_PATH_MAX - 1, "%s", socket_name);
414eb6
-#else
414eb6
-	snprintf(address->sun_path, sizeof(address->sun_path), "%s/%s", SOCKETDIR,
414eb6
-		 socket_name);
414eb6
-#endif
414eb6
+	if (!use_filesystem_sockets()) {
414eb6
+		snprintf(address->sun_path + 1, UNIX_PATH_MAX - 1, "%s", socket_name);
414eb6
+	} else {
414eb6
+		snprintf(address->sun_path, sizeof(address->sun_path), "%s/%s", SOCKETDIR,
414eb6
+			 socket_name);
414eb6
+	}
414eb6
 }
414eb6
 
414eb6
 static int32_t
414eb6
@@ -81,15 +101,16 @@ qb_ipc_dgram_sock_setup(const char *base
414eb6
 	}
414eb6
 	snprintf(sock_path, PATH_MAX, "%s-%s", base_name, service_name);
414eb6
 	set_sock_addr(&local_address, sock_path);
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-	res = unlink(local_address.sun_path);
414eb6
-#endif
414eb6
+	if (use_filesystem_sockets()) {
414eb6
+		res = unlink(local_address.sun_path);
414eb6
+	}
414eb6
 	res = bind(request_fd, (struct sockaddr *)&local_address,
414eb6
 		   sizeof(local_address));
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-	chmod(local_address.sun_path, 0660);
414eb6
-	chown(local_address.sun_path, -1, gid);
414eb6
-#endif
414eb6
+
414eb6
+	if (use_filesystem_sockets()) {
414eb6
+		chmod(local_address.sun_path, 0660);
414eb6
+		chown(local_address.sun_path, -1, gid);
414eb6
+	}
414eb6
 	if (res < 0) {
414eb6
 		goto error_connect;
414eb6
 	}
414eb6
@@ -316,36 +337,33 @@ _finish_connecting(struct qb_ipc_one_way
414eb6
 static void
414eb6
 qb_ipcc_us_disconnect(struct qb_ipcc_connection *c)
414eb6
 {
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-  struct sockaddr_un un_addr;
414eb6
-  socklen_t un_addr_len = sizeof(struct sockaddr_un);
414eb6
-  char *base_name;
414eb6
-  char sock_name[PATH_MAX];
414eb6
-  size_t length;
414eb6
-#endif
414eb6
-
414eb6
 	munmap(c->request.u.us.shared_data, SHM_CONTROL_SIZE);
414eb6
 	unlink(c->request.u.us.shared_file_name);
414eb6
 
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-    if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) {
414eb6
-      length = strlen(un_addr.sun_path);
414eb6
-      base_name = strndup(un_addr.sun_path,length-9);
414eb6
-      qb_util_log(LOG_DEBUG, "unlinking socket bound files with base_name=%s length=%d",base_name,length);
414eb6
-      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"request");
414eb6
-      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-      unlink(sock_name);
414eb6
-      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event");
414eb6
-      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-      unlink(sock_name);
414eb6
-      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event-tx");
414eb6
-      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-      unlink(sock_name);
414eb6
-      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"response");
414eb6
-      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-      unlink(sock_name);
414eb6
-    }
414eb6
-#endif
414eb6
+	if (use_filesystem_sockets()) {
414eb6
+		struct sockaddr_un un_addr;
414eb6
+		socklen_t un_addr_len = sizeof(struct sockaddr_un);
414eb6
+		char *base_name;
414eb6
+		char sock_name[PATH_MAX];
414eb6
+		size_t length;
414eb6
+		if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) {
414eb6
+			length = strlen(un_addr.sun_path);
414eb6
+			base_name = strndup(un_addr.sun_path,length-9);
414eb6
+			qb_util_log(LOG_DEBUG, "unlinking socket bound files with base_name=%s length=%d",base_name,length);
414eb6
+			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"request");
414eb6
+			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+			unlink(sock_name);
414eb6
+			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event");
414eb6
+			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+			unlink(sock_name);
414eb6
+			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event-tx");
414eb6
+			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+			unlink(sock_name);
414eb6
+			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"response");
414eb6
+			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+			unlink(sock_name);
414eb6
+		}
414eb6
+	}
414eb6
 	qb_ipcc_us_sock_close(c->event.u.us.sock);
414eb6
 	qb_ipcc_us_sock_close(c->request.u.us.sock);
414eb6
 	qb_ipcc_us_sock_close(c->setup.u.us.sock);
414eb6
@@ -451,11 +469,11 @@ retry_peek:
414eb6
 
414eb6
 		if (errno != EAGAIN) {
414eb6
 			final_rc = -errno;
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-			if (errno == ECONNRESET || errno == EPIPE) {
414eb6
-				final_rc = -ENOTCONN;
414eb6
+			if (use_filesystem_sockets()) {
414eb6
+				if (errno == ECONNRESET || errno == EPIPE) {
414eb6
+					final_rc = -ENOTCONN;
414eb6
+				}
414eb6
 			}
414eb6
-#endif
414eb6
 			goto cleanup_sigpipe;
414eb6
 		}
414eb6
 
414eb6
@@ -686,38 +704,36 @@ _sock_rm_from_mainloop(struct qb_ipcs_co
414eb6
 static void
414eb6
 qb_ipcs_us_disconnect(struct qb_ipcs_connection *c)
414eb6
 {
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-	struct sockaddr_un un_addr;
414eb6
-	socklen_t un_addr_len = sizeof(struct sockaddr_un);
414eb6
-	char *base_name;
414eb6
-	char sock_name[PATH_MAX];
414eb6
-	size_t length;
414eb6
-#endif
414eb6
 	qb_enter();
414eb6
 
414eb6
 	if (c->state == QB_IPCS_CONNECTION_ESTABLISHED ||
414eb6
 	    c->state == QB_IPCS_CONNECTION_ACTIVE) {
414eb6
 		_sock_rm_from_mainloop(c);
414eb6
 
414eb6
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
414eb6
-		if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) {
414eb6
-			length = strlen(un_addr.sun_path);
414eb6
-			base_name = strndup(un_addr.sun_path,length-8);
414eb6
-			qb_util_log(LOG_DEBUG, "unlinking socket bound files with base_name=%s length=%d",base_name,length);
414eb6
-			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"request");
414eb6
-			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-			unlink(sock_name);
414eb6
-			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event");
414eb6
-			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-			unlink(sock_name);
414eb6
-			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event-tx");
414eb6
-			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-			unlink(sock_name);
414eb6
-			snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"response");
414eb6
-			qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
-			unlink(sock_name);
414eb6
+		if (use_filesystem_sockets()) {
414eb6
+			struct sockaddr_un un_addr;
414eb6
+			socklen_t un_addr_len = sizeof(struct sockaddr_un);
414eb6
+			char *base_name;
414eb6
+			char sock_name[PATH_MAX];
414eb6
+			size_t length;
414eb6
+			if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) {
414eb6
+				length = strlen(un_addr.sun_path);
414eb6
+				base_name = strndup(un_addr.sun_path,length-8);
414eb6
+				qb_util_log(LOG_DEBUG, "unlinking socket bound files with base_name=%s length=%d",base_name,length);
414eb6
+				snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"request");
414eb6
+				qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+				unlink(sock_name);
414eb6
+				snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event");
414eb6
+				qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+				unlink(sock_name);
414eb6
+				snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event-tx");
414eb6
+				qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+				unlink(sock_name);
414eb6
+				snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"response");
414eb6
+				qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
414eb6
+				unlink(sock_name);
414eb6
+			}
414eb6
 		}
414eb6
-#endif
414eb6
 		qb_ipcc_us_sock_close(c->setup.u.us.sock);
414eb6
 		qb_ipcc_us_sock_close(c->request.u.us.sock);
414eb6
 		qb_ipcc_us_sock_close(c->event.u.us.sock);
414eb6
Only in libqb-1.0.1/lib: ipc_socket.c.orig
414eb6
diff -upr libqb-1.0.1.orig/tests/check_ipc.c libqb-1.0.1/tests/check_ipc.c
414eb6
--- libqb-1.0.1.orig/tests/check_ipc.c	2016-11-08 11:15:16.000000000 +0000
414eb6
+++ libqb-1.0.1/tests/check_ipc.c	2017-05-15 10:47:39.043145455 +0100
414eb6
@@ -1417,10 +1417,17 @@ END_TEST
414eb6
 #ifdef HAVE_FAILURE_INJECTION
414eb6
 START_TEST(test_ipcc_truncate_when_unlink_fails_shm)
414eb6
 {
414eb6
+	char sock_file[PATH_MAX];
414eb6
 	qb_enter();
414eb6
-	_fi_unlink_inject_failure = QB_TRUE;
414eb6
 	ipc_type = QB_IPC_SHM;
414eb6
 	set_ipc_name(__func__);
414eb6
+
414eb6
+	sprintf(sock_file, "%s/%s", SOCKETDIR, ipc_name);
414eb6
+	/* If there's an old socket left from a previous run this test will fail
414eb6
+	   unexpectedly, so try to remove it first */
414eb6
+	unlink(sock_file);
414eb6
+
414eb6
+	_fi_unlink_inject_failure = QB_TRUE;
414eb6
 	test_ipc_server_fail();
414eb6
 	_fi_unlink_inject_failure = QB_FALSE;
414eb6
 	qb_leave();
414eb6
Only in libqb-1.0.1/tests: check_ipc.c.orig