]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-ns.c
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / test / test-ns.c
index 0125d905a633d18f259452ebd9735e06d5849aff..80dbbca69bb5334a6fcf116d19f6a65dc839671d 100644 (file)
@@ -1,22 +1,9 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
   Copyright 2010 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -46,7 +33,7 @@ int main(int argc, char *argv[]) {
                 NULL
         };
 
-        static const NameSpaceInfo ns_info = {
+        static const NamespaceInfo ns_info = {
                 .private_dev = true,
                 .protect_control_groups = true,
                 .protect_kernel_tunables = true,
@@ -82,7 +69,9 @@ int main(int argc, char *argv[]) {
                             (char **) writable,
                             (char **) readonly,
                             (char **) inaccessible,
+                            NULL,
                             &(BindMount) { .source = (char*) "/usr/bin", .destination = (char*) "/etc/systemd", .read_only = true }, 1,
+                            &(TemporaryFileSystem) { .path = (char*) "/var", .options = (char*) "ro" }, 1,
                             tmp_dir,
                             var_tmp_dir,
                             PROTECT_HOME_NO,