Migrate connect.cpp to Rust

This commit is contained in:
topjohnwu
2025-08-08 17:27:45 -07:00
committed by John Wu
parent 6839cb9ab2
commit cd0eca20b0
9 changed files with 302 additions and 254 deletions

View File

@@ -140,8 +140,14 @@ pub struct FileAttr {
pub con: crate::Utf8CStrBufArr<128>,
}
impl Default for FileAttr {
fn default() -> Self {
Self::new()
}
}
impl FileAttr {
fn new() -> Self {
pub fn new() -> Self {
FileAttr {
st: unsafe { mem::zeroed() },
#[cfg(feature = "selinux")]