]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
random-seed: no need to pass 'mode' argument when opening /dev/urandom
authorFranck Bui <fbui@suse.com>
Thu, 20 Oct 2022 06:52:10 +0000 (08:52 +0200)
committerFranck Bui <fbui@suse.com>
Tue, 25 Oct 2022 10:16:22 +0000 (12:16 +0200)
The open() call is not supposed to create /dev/urandom.

No functional change.

src/random-seed/random-seed.c

index 5b5629d81703d838a42a5486db467887f9b15db5..4b8138ca03f9a1317a401ec74c175ab14360234c 100644 (file)
@@ -248,7 +248,7 @@ static int run(int argc, char *argv[]) {
                 } else
                         write_seed_file = true;
 
-                random_fd = open("/dev/urandom", O_RDWR|O_CLOEXEC|O_NOCTTY, 0600);
+                random_fd = open("/dev/urandom", O_RDWR|O_CLOEXEC|O_NOCTTY);
                 if (random_fd < 0)
                         return log_error_errno(errno, "Failed to open /dev/urandom: %m");