[systemd-commits] TODO man/systemd-nspawn.xml src/nspawn

Lennart Poettering lennart at kemper.freedesktop.org
Fri Feb 7 10:29:59 PST 2014


 TODO                   |    2 --
 man/systemd-nspawn.xml |    2 +-
 src/nspawn/nspawn.c    |   12 ++++++------
 3 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit ba978d7b325998709fb19d368d290fa1dff37699
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Feb 7 19:29:28 2014 +0100

    nspawn: rename --file-label to --apifs-label since it's really just about the API file systems, nothing else

diff --git a/TODO b/TODO
index b9a0f0f..57e82ff 100644
--- a/TODO
+++ b/TODO
@@ -36,8 +36,6 @@ External:
 
 Features:
 
-* nspawn: rename --file-label to --apifs-label
-
 * hookup nspawn and PrivateNetwork=yes with "ip netns"
 
 * socket units: support creating sockets in different namespace,
diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
index df318d7..c95a7c0 100644
--- a/man/systemd-nspawn.xml
+++ b/man/systemd-nspawn.xml
@@ -250,7 +250,7 @@
 
                         <varlistentry>
                                 <term><option>-L</option></term>
-                                <term><option>--file-label=</option></term>
+                                <term><option>--apifs-label=</option></term>
 
                                 <listitem><para>Sets the mandatory
                                 access control (MAC/SELinux) file
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index f904ebe..46ca335 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -81,7 +81,7 @@ static char *arg_user = NULL;
 static sd_id128_t arg_uuid = {};
 static char *arg_machine = NULL;
 static char *arg_process_label = NULL;
-static char *arg_file_label = NULL;
+static char *arg_apifs_label = NULL;
 static const char *arg_slice = NULL;
 static bool arg_private_network = false;
 static bool arg_read_only = false;
@@ -131,7 +131,7 @@ static int help(void) {
                "     --uuid=UUID            Set a specific machine UUID for the container\n"
                "  -M --machine=NAME         Set the machine name for the container\n"
                "  -S --slice=SLICE          Place the container in the specified slice\n"
-               "  -L --file-label=LABEL     Set the MAC file label to be used by tmpfs file\n"
+               "  -L --apifs-label=LABEL    Set the MAC file label to be used by API/tmpfs file\n"
                "                            systems in the container\n"
                "  -Z --process-label=LABEL  Set the MAC label to be used by processes in\n"
                "                            the container\n"
@@ -185,7 +185,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "slice",           required_argument, NULL, 'S'                 },
                 { "setenv",          required_argument, NULL, ARG_SETENV          },
                 { "process-label",   required_argument, NULL, 'Z'                 },
-                { "file-label",      required_argument, NULL, 'L'                 },
+                { "apifs-label",     required_argument, NULL, 'L'                 },
                 { "quiet",           no_argument,       NULL, 'q'                 },
                 {}
         };
@@ -262,7 +262,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case 'L':
-                        arg_file_label = optarg;
+                        arg_apifs_label = optarg;
                         break;
 
                 case 'Z':
@@ -449,8 +449,8 @@ static int mount_all(const char *dest) {
                 mkdir_p(where, 0755);
 
 #ifdef HAVE_SELINUX
-                if (arg_file_label && (streq_ptr(mount_table[k].what, "tmpfs") || streq_ptr(mount_table[k].what, "devpts"))) {
-                        options = strjoin(mount_table[k].options, ",context=\"", arg_file_label, "\"", NULL);
+                if (arg_apifs_label && (streq_ptr(mount_table[k].what, "tmpfs") || streq_ptr(mount_table[k].what, "devpts"))) {
+                        options = strjoin(mount_table[k].options, ",context=\"", arg_apifs_label, "\"", NULL);
                         if (!options)
                                 return log_oom();
 



More information about the systemd-commits mailing list