diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-08-13 15:27:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-08-13 15:27:04 +0200 |
commit | ac0930c892bc7979b4c9bc2a52e5e844650b025d (patch) | |
tree | f0388a829e7b827e0797fe5fab5ae50f79a6afcd /src/shared/util.c | |
parent | 6f67a45d8e61d69bf4f75e1da3edcf9fe7d89982 (diff) |
namespace: rework namespace support
- don't use pivot_root() anymore, just reuse root hierarchy
- first create all mounts, then mark them read-only so that we get the
right behaviour when people want writable mounts inside of
read-only mounts
- don't pass invalid combinations of MS_ constants to the kernel
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 946b7d53f9..e615195af5 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -3011,7 +3011,8 @@ unsigned long long random_ull(void) { uint64_t ull; ssize_t r; - if ((fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY)) < 0) + fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY); + if (fd < 0) goto fallback; r = loop_read(fd, &ull, sizeof(ull), true); |