X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fauth%2FCrypto.cc;h=150052bfef1710840ff2cee09d704c8333013836;hb=91327a770de101c8d859649fa82e887fff521e13;hp=0186b7b2255d670a218a8883751472164be403b9;hpb=b32d239b4982c57cf7d9816de026050a5af8d14f;p=ceph.git diff --git a/ceph/src/auth/Crypto.cc b/ceph/src/auth/Crypto.cc index 0186b7b22..150052bfe 100644 --- a/ceph/src/auth/Crypto.cc +++ b/ceph/src/auth/Crypto.cc @@ -12,6 +12,9 @@ */ #include +#include +#include + #include "Crypto.h" #ifdef USE_CRYPTOPP # include @@ -37,7 +40,7 @@ int get_random_bytes(char *buf, int len) { - int fd = TEMP_FAILURE_RETRY(::open("/dev/urandom", O_RDONLY)); + int fd = TEMP_FAILURE_RETRY(::open("/dev/urandom", O_RDONLY|O_CLOEXEC)); if (fd < 0) return -errno; int ret = safe_read_exact(fd, buf, len);