Commit Graph

211 Commits

Author SHA1 Message Date
vvb2060 ff18cb8e70 su: support drop capabilities 2025-07-03 02:42:08 -07:00
topjohnwu 37a9724a54 Apply clippy fix 2025-07-02 21:20:14 -07:00
topjohnwu 1460317ebd Cleanup C++ headers 2025-06-16 02:25:38 -07:00
topjohnwu b36066bbcd Run clippy fix 2025-06-10 16:34:38 -07:00
Wang Han 0b494ed7df Avoid throwing error if chmod a symlink
It is possible that we want to clone attributes of a regular file to a
symlink. In this case, we don't need to error out if chmod fails. Just
skip it.
2025-06-06 17:08:34 -07:00
topjohnwu d8cf42af16 Reduce unstable feature usage 2025-05-30 11:11:36 -07:00
topjohnwu dc0acea47c Remove C++ I/O streams 2025-05-20 03:26:00 -07:00
topjohnwu 78d1200608 Migrate all compression code to Rust 2025-05-20 03:26:00 -07:00
topjohnwu 527bbc0368 Migrate module mounting to Rust 2025-05-20 03:24:43 -07:00
topjohnwu 4f4b1ff885 Add sepolicy.rule patching tests 2025-05-13 14:08:54 -07:00
topjohnwu 03e034795d Implement Ord and PartialOrd for Utf8CStr familiy 2025-05-05 11:33:33 -07:00
vvb2060 86da917174 core: fix mkdirs 2025-05-02 16:39:46 -07:00
topjohnwu d1829308e9 Move more daemon_start code into Rust 2025-04-28 17:22:14 -07:00
topjohnwu 73840f8721 Migrate selinux.cpp to selinux.rs 2025-04-28 17:22:14 -07:00
topjohnwu c7d1af9805 Stop using PathBuf in package.rs 2025-04-28 17:22:14 -07:00
topjohnwu 4ad26d3dfb Better path methods 2025-04-28 17:22:14 -07:00
topjohnwu 0c70b7670c Cleanup dir implementations 2025-04-28 17:22:14 -07:00
topjohnwu f44d044095 Remove Utf8CStrBuffer 2025-04-28 17:22:14 -07:00
topjohnwu 5c1cb13472 Remove AsUtf8CStr trait 2025-04-28 17:22:14 -07:00
topjohnwu 3327fc668e Remove FsPath and FsPathMnt trait
Directly use Utf8CStr
2025-04-28 17:22:14 -07:00
topjohnwu 610945ac54 Remove open_fd macro 2025-04-28 17:22:14 -07:00
topjohnwu e02b5f7868 Rename cstr_buf to cstr::buf 2025-04-22 03:21:00 -07:00
topjohnwu ab2e5d1e7e Make FsPathBuf a trait and rename to FsPathBuilder 2025-04-22 03:21:00 -07:00
topjohnwu f3fef7bfe4 Make FsPath a trait 2025-04-22 03:21:00 -07:00
topjohnwu c34c7838bb Cleanup cstr implementation 2025-04-22 03:21:00 -07:00
topjohnwu c8a16b0e0c Remove unused code 2025-04-16 17:13:03 -07:00
topjohnwu 14f9ed91a1 Remove unused methods 2025-04-15 11:35:31 -07:00
topjohnwu 7a207d4ccf Only accept UTF-8 directory entries 2025-04-15 10:26:22 -07:00
topjohnwu 92a42d901f Move most implementation into Directory 2025-04-15 10:26:22 -07:00
topjohnwu 084d89fcce Create Utf8CStrBuffer type 2025-04-15 10:26:22 -07:00
topjohnwu 55b036c071 Introduce BorrowedDirectory 2025-04-15 10:26:22 -07:00
topjohnwu 30e79310ab Make pointers NonNull after error check 2025-04-15 00:18:48 -07:00
topjohnwu f063fa5054 Cleanup xwrap implementation 2025-04-15 00:18:48 -07:00
topjohnwu 7bd901273c Provide richer error messages
Make sure most syscall/libc calls results are mapped to OsResult
that can produce more detailed error messages.
2025-04-15 00:18:48 -07:00
topjohnwu 9c7d359093 Optimize and format imports
[skip ci]
2025-04-08 09:57:09 -07:00
topjohnwu d4a0286e13 Migrate magiskinit selinux.cpp to Rust 2025-04-08 02:33:52 -07:00
topjohnwu e0a356b319 Introduce mount helper methods 2025-03-24 17:26:03 -07:00
topjohnwu c09a792958 Reorganize magiskinit code 2025-03-24 17:26:03 -07:00
topjohnwu 95d3eac2e0 Cleanup xwrap functions 2025-03-09 01:10:41 -08:00
topjohnwu 6ff82c4e86 Introduce FsPathFollow
Make sure all operations of FsPath do not follow symlinks, and provide
a way to explicitly switch over to a set of operations that DO follow
symlinks by FsPath::follow_link.
2025-03-07 15:51:51 -08:00
topjohnwu c90e73ccec Migration to Edition 2024 2025-03-07 02:35:25 -08:00
topjohnwu a43c1267d8 Update Cargo.toml 2025-03-07 02:35:25 -08:00
vvb2060 e8958c6b5c get_secontext: ignore ENODATA 2025-03-06 20:03:36 -08:00
LoveSy e8a3bf82c6 set exit code of log ExitOnError to -1 2025-03-06 20:03:15 -08:00
topjohnwu b6b34f7612 Fix overlay.d context preservation 2025-02-27 01:57:25 -08:00
topjohnwu 019eb03823 Hide or remove mut constructors for Utf8CStr 2025-02-17 11:38:11 -08:00
topjohnwu 363410e1c0 Introduce cstr_buf helper functions 2025-02-17 11:32:21 -08:00
topjohnwu fc2ef21660 Introduce path! macro for FsPath 2025-02-17 01:46:19 -08:00
topjohnwu b73d4a7022 Fix log_ok() 2025-02-16 12:01:25 -08:00
topjohnwu bf591fca12 Fix Utf8CString constructor and add more comments 2025-02-16 01:17:48 -08:00