diff --git a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c index 61f9e855..970ce750 100644 --- a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +++ b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c @@ -119,8 +119,7 @@ randombytes_salsa20_random_random_dev_open(void) int fd; do { - if (access(*device, F_OK | R_OK) == 0 && - (fd = open(*device, O_RDONLY)) != -1) { + if ((fd = open(*device, O_RDONLY)) != -1) { if (fstat(fd, &st) == 0 && S_ISCHR(st.st_mode)) { return fd; } diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index f38c681f..efb7dbef 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -111,8 +111,7 @@ randombytes_sysrandom_random_dev_open(void) int fd; do { - if (access(*device, F_OK | R_OK) == 0 && - (fd = open(*device, O_RDONLY)) != -1) { + if ((fd = open(*device, O_RDONLY)) != -1) { if (fstat(fd, &st) == 0 && S_ISCHR(st.st_mode)) { return fd; }