]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
random-seed: don't use "label" version of mkdir_parents() 11905/head
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Mar 2019 14:06:37 +0000 (15:06 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Mar 2019 14:10:06 +0000 (15:10 +0100)
We don't load the selinux label database anyway, hence this is not going
to do anything at all. Let's simplify this hence and drop the explicit
request.

Also note that today SELinux can take the filename into account when
automatically deducing the label for a new file, hence even if this code
actually would have done something it is redundant today.

src/random-seed/random-seed.c

index 0c5f3297567f1c1f37d873eb6b0b4b98a6423148..71c2dba4318b73b74e3296a53b00ccab518b4893 100644 (file)
@@ -51,7 +51,7 @@ static int run(int argc, char *argv[]) {
         if (buf_size < POOL_SIZE_MIN)
                 buf_size = POOL_SIZE_MIN;
 
-        r = mkdir_parents_label(RANDOM_SEED, 0755);
+        r = mkdir_parents(RANDOM_SEED, 0755);
         if (r < 0)
                 return log_error_errno(r, "Failed to create directory " RANDOM_SEED_DIR ": %m");