Merge "Don't set /dev/hwrng to O_NONBLOCK" am: 94ad8ad990
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2480515
Change-Id: I03cd772bb81dd413ca9623f84d4c26fbfec8ba76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/prng_seeder/OWNERS b/prng_seeder/OWNERS
index 9202b90..51b7f38 100644
--- a/prng_seeder/OWNERS
+++ b/prng_seeder/OWNERS
@@ -1,2 +1,2 @@
paulcrowley@google.com
-prb@google.com
\ No newline at end of file
+prb@google.com
diff --git a/prng_seeder/src/conditioner.rs b/prng_seeder/src/conditioner.rs
index eca8af8..ec1181b 100644
--- a/prng_seeder/src/conditioner.rs
+++ b/prng_seeder/src/conditioner.rs
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use std::{fs::File, io::Read, os::unix::io::AsRawFd};
+use std::{fs::File, io::Read};
use anyhow::{ensure, Context, Result};
use log::debug;
-use nix::fcntl::{fcntl, FcntlArg::F_SETFL, OFlag};
use tokio::io::AsyncReadExt;
use crate::drbg;
@@ -34,8 +33,6 @@
let mut et: drbg::Entropy = [0; drbg::ENTROPY_LEN];
hwrng.read_exact(&mut et).context("hwrng.read_exact in new")?;
let rg = drbg::Drbg::new(&et)?;
- fcntl(hwrng.as_raw_fd(), F_SETFL(OFlag::O_NONBLOCK))
- .context("setting O_NONBLOCK on hwrng")?;
Ok(ConditionerBuilder { hwrng, rg })
}