ComixHe
2cb58b3a0f
fix: do not define syscall number directly
...
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-06-11 18:17:20 +08:00
ComixHe
cc49934702
fix: avoid dead loop in close_range_fallback
...
add helper class 'defer'
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-06-04 11:48:34 +08:00
ComixHe
d2b7adbb1d
feat: add flag 'mount_dev_from_host'
...
skip processing default devices if user binds '/dev' from host
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-05-30 17:56:03 +08:00
ComixHe
4f8ad981d5
build: add public definition 'LINYAPS_BOX_STATIC_LINK' to library target
...
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-05-30 16:19:26 +08:00
ComixHe
594bedcf1c
refactor: add version flag
...
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-05-23 14:32:44 +08:00
ComixHe
25fdeda582
refactor: try single mapping at first if it could be
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-08 15:32:36 +08:00
ComixHe
6b9422ff84
refactor: remove unneed shared_ptr
...
improve open/open_at
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-30 17:40:13 +08:00
ComixHe
4d3d0002f2
test: ignore deprecated warning from libstdc++
...
refer: 5c34f02ba7
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-30 16:42:57 +08:00
ComixHe
f1378216b3
chore: correct log
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-30 12:10:53 +08:00
ComixHe
22c8a34f3a
test: add smoke test 'output-to-null'
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-28 16:41:07 +08:00
ComixHe
599b433142
refactor: output file path when failed to open or create it
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-25 17:09:13 +08:00
ComixHe
06f3a86652
refactor: try to create devices at first
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-25 16:16:02 +08:00
ComixHe
0bed97d189
fix: remove MS_NODEV option for /dev
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-25 13:28:02 +08:00
ComixHe
e83566c4b4
refactor: ignore 'owner' field when box is linked statically
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-24 17:05:52 +08:00
ComixHe
cc3db26490
Revert "fix: remove 'owner' from container state file"
...
This reverts commit 0cb72a0b1a .
linyaps needs this field.
2025-04-24 17:05:52 +08:00
ComixHe
0cb72a0b1a
fix: remove 'owner' from container state file
...
we need support linking statically but calling
getpwuid from a statically linked program may cause
a segment fault.
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-21 15:57:53 +08:00
ComixHe
2f74ccca81
fix: the argument 'argv' and 'envp' of execvpe shouldn't be nullptr
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-21 15:57:53 +08:00
ComixHe
fda6b3954d
build: specifying labmda return type
...
compatible with old gcc
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-18 17:35:22 +08:00
ComixHe
adcb988fa1
fix: correct args of executing hook
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-16 17:59:18 +08:00
ComixHe
26e24766d0
fix: splitting prestart hook and createRuntime hook into two steps
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-16 16:27:38 +08:00
ComixHe
a1aad2f284
fix: correct hooks type
...
'args' and 'env' are optional in hooks
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-16 14:46:57 +08:00
ComixHe
08305e83d0
fix: correct bind mount flags of the configure_device fallback
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-16 12:23:39 +08:00
ComixHe
f6661b83bf
chore: update dependency 'nlohmann_json'
...
- nlohmann_json 3.12.0 released in 2025-04-11
- change the minimal dependencies version
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-15 10:51:14 +08:00
ComixHe
cf2e547d09
refactor: compatible with libcap 2.25
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-02 16:32:07 +08:00
ComixHe
23414a6aab
refactor: change the way of feature detecting
...
- compatible with older gcc and cmake
- remove configuration
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-02 15:04:39 +08:00
ComixHe
7d678a48ba
build: change the compatible way of finding GTest in older cmake
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-02 13:37:00 +08:00
ComixHe
60b31b423e
build: vendoring CLI11 and nlohmann_json
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-01 17:36:48 +08:00
ComixHe
c6725bd393
chore: use macro instead of if constexpr
...
compatible with old gcc
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-31 17:58:49 +08:00
ComixHe
e28caa9340
chore: adjust build process when disable cap and seccomp
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-31 17:40:11 +08:00
ComixHe
c01c7bf36d
refactor: implement close_range by ourself
...
compatible with old kernel and glibc
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-31 16:55:08 +08:00
ComixHe
ed9fb921e8
refactor: improve openat2 implementation
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-31 16:55:08 +08:00
ComixHe
17c3827688
fix: fcntl is only used to set flags to a duplicated fd
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-28 17:37:00 +08:00
ComixHe
7b60087a2e
fix: compatible with older libstdc++
...
DR: https://cplusplus.github.io/LWG/lwg-defects.html#1203
libstdc++ resolved commit: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=a87ceadf17b4a899f3e74e2da8b6b209461d2742
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-27 17:45:10 +08:00
ComixHe
301aced752
chore: update reuse file
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-26 17:55:44 +08:00
ComixHe
2f0b801885
build: support fetching deps by CPM
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-26 17:55:44 +08:00
ComixHe
c3590bc7b0
build: fix static build
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-26 17:55:44 +08:00
ComixHe
1a07d78884
chore: remove gdwarf64 for compatibility
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-26 16:37:01 +08:00
ComixHe
88f8f97465
feat: support readonly root
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-26 16:15:55 +08:00
ComixHe
1cb3bad58d
refactor: box subcommand
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-20 13:07:18 +08:00
ComixHe
3a51dab444
refactor: improve copy-symlink error message
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-19 05:12:05 +00:00
ComixHe
6c71a61249
fix: config.json location
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-19 05:12:05 +00:00
ComixHe
377ff9c4c1
feat: support masked path
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-18 10:02:44 +00:00
ComixHe
95ac068ed0
feat: support readonly path
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-18 08:09:14 +00:00
ComixHe
2f70c75e51
feat: support setting process oom_score_adj
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-17 07:55:20 +00:00
ComixHe
6f4ddaefe5
test: adjust smoking test
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-17 07:03:51 +00:00
ComixHe
1cf359e14d
feat: support set rlimits
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-17 05:43:08 +00:00
ComixHe
813bc6b072
feat: support umask
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-17 03:31:40 +00:00
ComixHe
f1856a5404
test: adjust smoke tests
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-17 02:48:35 +00:00
ComixHe
7e74723197
test: adjust smoking test
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-14 09:10:40 +00:00
ComixHe
2586753235
feat: initialize exec capability support
...
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-14 07:03:55 +00:00