74 Commits

Author SHA1 Message Date
topjohnwu
cf211e26f4 Move MagiskSU sources to native/jni/su 2018-07-18 18:23:36 +08:00
topjohnwu
6ccc5f3788 Use xwrap functions 2018-07-13 22:10:24 +08:00
topjohnwu
513d732934 SIGPIPE is handled in main daemon 2018-07-03 01:37:33 +08:00
topjohnwu
2c4001387e Several adjustments 2018-06-26 18:45:51 +08:00
topjohnwu
caa39474cb Fix force denying on exit 2018-06-26 17:33:16 +08:00
topjohnwu
30e459252c Update daemon 2018-06-17 01:26:38 +08:00
topjohnwu
79eb5b2ed2 Rename entry 2018-06-14 01:44:16 +08:00
topjohnwu
f0533fca70 Simplify su_info cache
The previous implementation is great if multiple different requesters call su rapidly in a very short period of time, however in the real world this is nearly impossible to happen. This comes with quite a big overhead, since it requires two lists and also an everlasting background thread to constantly maintain the lists.

The new implementation will spawn a collector thread for each cache miss, and the thread will terminate itself once the data is invalidated.
2018-06-13 23:04:57 +08:00
topjohnwu
08e98eeb15 Fail fast when possible 2018-06-13 18:14:23 +08:00
topjohnwu
b2f719989d Move database logic outside of MagiskSU 2018-06-13 04:33:32 +08:00
topjohnwu
7e2ba41c64 Refactoring 2018-04-22 02:16:16 +08:00
topjohnwu
bb2c744ec0 Change the default file secontext 2018-04-21 13:18:33 +08:00
topjohnwu
873f14bbe0 setexeccon is not needed 2018-04-15 03:15:29 +08:00
topjohnwu
190d857949 Allow su to work when manager uninstalled 2017-12-22 00:29:58 +08:00
topjohnwu
2b6c271d37 Initialize windows size 2017-12-18 15:46:01 +08:00
topjohnwu
b0c1a6f73a Update su to match Linux's implementation 2017-12-18 13:12:06 +08:00
topjohnwu
257308d5db Change database location and implementation 2017-12-12 03:03:05 +08:00
topjohnwu
18bee21cfc Add support to build with NDK r10e 2017-11-23 23:46:23 +08:00
topjohnwu
84ca8e1f3e Support changing requester in DB 2017-10-28 16:03:39 +08:00
topjohnwu
6b7b71b1f8 Remove error handler 2017-10-13 04:42:30 +08:00
topjohnwu
1a702b08b9 Support FBE: read from DE 2017-09-15 18:01:31 +08:00
topjohnwu
8c52dfb804 Cleanup 2017-09-15 15:23:50 +08:00
topjohnwu
9be2844c82 Fix multiuser in user independent mode 2017-08-12 01:09:02 +08:00
topjohnwu
875c687e3f Fix multiuser mode 2017-08-07 00:31:27 +08:00
topjohnwu
40b6de599c Prevent client error 2017-07-16 15:31:40 +08:00
topjohnwu
09392be069 Cleanup file descriptors and add info 2017-07-08 23:50:47 +08:00
topjohnwu
60ca704a9e Add mount-master option 2017-07-08 01:12:47 +08:00
topjohnwu
7c4d5cee95 Update to new list implementation 2017-07-02 17:46:30 +08:00
topjohnwu
c9286624d4 Add namespace mode support 2017-06-08 22:50:39 +08:00
topjohnwu
1ddd746862 Switch to DB based su config 2017-06-01 03:19:45 +08:00
topjohnwu
48ace3de57 Big refactor: Add request cache and collector 2017-05-29 18:54:33 +08:00
topjohnwu
3395c84560 Improve multiuser notifications 2017-05-28 01:28:18 +08:00
topjohnwu
94c2fc80d2 Add multiuser support 2017-05-27 02:40:12 +08:00
topjohnwu
371db886b4 Close client fd using thread local storage 2017-05-08 11:50:23 +08:00
topjohnwu
3904ca38c0 Do not fork a new process for waiting 2017-05-08 03:08:34 +08:00
topjohnwu
16527ceaf6 Use util function 2017-05-05 16:13:00 +08:00
topjohnwu
f799db67eb Add version info 2017-04-28 03:26:18 +08:00
topjohnwu
a0de3fc643 Change umask 2017-04-24 21:28:25 +08:00
topjohnwu
977c049875 Change flags 2017-04-18 21:09:53 +08:00
topjohnwu
aefbc1c9bf Move the helper function to higher level 2017-04-17 16:33:01 +08:00
topjohnwu
c37a2e61ed Set context manually 2017-04-17 16:32:41 +08:00
topjohnwu
f6d1f1985c Fix compile issue when using NDK Unified Headers 2017-04-16 23:12:53 +08:00
topjohnwu
222c31b306 Fix checking order 2017-04-16 23:10:18 +08:00
topjohnwu
743c4f554d Fix various issues 2017-04-16 02:28:12 +08:00
topjohnwu
a92c9fc226 MagiskSU rewrite for unified binary 2017-04-15 03:21:31 +08:00
topjohnwu
ed052e0b0b Compile with unified binary only
The su binary itself cannot do much, since it still requires a daemon to work
The daemon code will soon be moved to a higher level (out of MagiskSU), so there is no point in creating a separate binary
2017-04-06 06:18:39 +08:00
topjohnwu
3800b4b45c Adjustments for unified binary 2017-04-05 06:06:21 +08:00
topjohnwu
e103676b65 Bump version 2017-03-16 06:58:06 +08:00
topjohnwu
17e395c2a8 Cleanup and hide debug msg 2017-03-15 19:25:19 +08:00
topjohnwu
d50c1f39ab Make context option NOP 2017-03-15 17:31:21 +08:00