CismonX
3e5c800de8
backend_chromium: improve sandboxing
...
- Always lazy-init watcher when possible.
- Add a check in `backend_create()` that fails when the bookmark
storage does not exist, so that function behavior is more
consistent on different platforms with and without sandboxing.
- Only check Landlock flags on Linux.
2025-02-24 17:45:52 +08:00
CismonX
8a0070833a
doc: misc update
2025-02-23 10:53:23 +08:00
CismonX
9494bf72af
doc: update backend API
...
- Add subsection for general information.
2025-02-22 19:19:55 +08:00
CismonX
6d99a3574c
doc: update backend API
...
- Add doc for the `bookmark_check` function.
- Other misc changes.
2025-02-21 18:44:58 +08:00
CismonX
e7743f0285
doc: fix syntax problems
2025-02-20 14:13:20 +08:00
CismonX
5affe9ee02
test: misc updates
...
- Export feature variables for conditional testing.
- Add helper macros.
- Move helper shell functions from atlocal.in to testsuite.at.
The atlocal file should only contain feature variables.
- Update existing tests.
2025-02-20 11:11:10 +08:00
CismonX
bd90602d4a
xattr: misc refactor
...
- Check for XATTR_CREATE in setxattr.
- Rename bookmark_attrs -> xattr_names.
- Other misc changes.
2025-02-19 11:34:03 +08:00
CismonX
63c491bc02
doc: update backend API
...
Add doc for the `bookmark_permute` function.
2025-02-18 12:29:12 +08:00
CismonX
d7724e9a8f
db: disable SQL printing in debug mode by default
2025-02-18 10:31:55 +08:00
CismonX
e97adeaa7b
doc: update backend API
...
- Add doc for the `bookmark_delete` function.
- Other misc changes.
2025-02-17 19:26:13 +08:00
CismonX
fef7b4d3a8
backend: remove BOOKMARKFS_BOOKMARK_DELETE_DIR
...
It's up to the backend to check whether it's deleting a directory.
2025-02-17 17:52:50 +08:00
CismonX
557cc17449
doc: misc updates
2025-02-16 08:59:22 +08:00
CismonX
dd4e6401e8
doc: update backend API
...
- Add doc for the `bookmark_rename` function.
- Other misc changes.
2025-02-16 08:08:11 +08:00
CismonX
c90c5f6fc7
all: fix build with musl libc
...
- Should not assume whether O_xxx macros are defined by checking
feature test macros.
- Workaround conflicting getdents() declaration.
2025-02-16 00:19:51 +08:00
CismonX
1db61bc878
all: debug_puts() should accept arbitrary string
2025-02-15 19:38:15 +08:00
CismonX
bf9e0e7f92
sandbox: workaround legacy landlock
...
So that they can build with kernel headers older than 6.2,
and still work as expected on newer kernels.
2025-02-15 19:08:08 +08:00
CismonX
5c244c4ef5
doc: update backend API
...
- Add doc for the `bookmark_create` function.
- Other misc updates.
2025-02-14 19:24:44 +08:00
CismonX
9afdfc45d7
backend: rename bookmark_check
args
...
- Rename `id` -> `parent_id`, since the function works on
the parent directory.
2025-02-13 17:48:07 +08:00
CismonX
52b3707d2b
backend: rename bookmark_fsck -> bookmark_check
...
Some relevant names are also renamed.
2025-02-12 20:47:10 +08:00
CismonX
3375674973
backend: ignore val_len
when updating timestamps
2025-02-12 12:36:30 +08:00
CismonX
a7575dc074
doc: update backend API
...
Add doc for the `bookmark_set` function.
2025-02-12 12:34:10 +08:00
CismonX
87931bc1f7
doc: update doc for the Firefox backend
2025-02-11 18:45:49 +08:00
CismonX
31067eff42
build: misc update
2025-02-11 18:28:30 +08:00
CismonX
e199a1203a
backend: fix includes
...
Fix a regression in commit d1dac54b72
where sys/stat.h is no longer
included in backend_firefox.c and backend_chromium.c.
It has to be explicitly included for the UTIME_xxx macros.
2025-02-10 19:55:43 +08:00
CismonX
916102484f
all: only log line numbers in debug mode
2025-02-10 18:43:15 +08:00
CismonX
cd3d6a6232
backend_firefox: improve mkfs
...
Switch to schema version 74, so that it is compatible with
browsers (e.g., GNU IceCat) which are still based on
Firefox 115 ESR (now end-of-life), as well as saving us
a bit more space since there are fewer tables to be created.
2025-02-10 18:40:00 +08:00
CismonX
4f8b15fd80
backend_firefox: improve bookmark storage init
...
- Check schema version when initializing database.
- Minor refactor for db_check().
2025-02-09 23:49:21 +08:00
CismonX
df29392008
all: fix conditional build
...
There were bad code changes that cause the compiler to complain or
panic, but went unnoticed since they are only built if toggled with
`--enable-xxx` or `--disable-xxx` during build configuration.
Fix them altogether.
2025-02-08 19:47:20 +08:00
CismonX
d1dac54b72
chore: tidy up includes
2025-02-08 18:56:45 +08:00
CismonX
08f0655721
test: init tests; add tests for util lib
...
- Init Autotest.
Not using DejaGNU since there won't be many interactive testing.
- Add basic test cases for the utility library (hash and prng).
2025-02-08 01:48:07 +08:00
CismonX
b195e7821a
hash: add hash_digestcb() function
...
May be useful for calculating hash of a stream of input data.
2025-02-06 16:09:58 +08:00
CismonX
767e25e867
xstd: update xabort_() output format
2025-02-05 18:28:22 +08:00
CismonX
d99ef6d681
chore: update links
...
- Specify the full homepage URL.
- Follow GNU's naming convention for mailing lists.
2025-02-05 18:11:37 +08:00
CismonX
fbed71ce3e
all: add line number to log output
2025-02-04 20:55:49 +08:00
CismonX
852caab209
doc: misc update
2025-02-04 20:55:29 +08:00
CismonX
8b848825f2
doc: update backend API
...
Add doc for the `cookie_free` and `bookmark_sync` functions.
2025-02-04 16:51:31 +08:00
CismonX
d0aa74b212
backend: rename object_free
-> cookie_free
2025-02-03 18:15:52 +08:00
CismonX
f92054bdf5
doc: update backend API
...
- Add doc for the `bookmark_get` function.
- Update doc for the `bookmark_list` function.
2025-02-03 18:02:59 +08:00
CismonX
1d1ff58aa4
ioctl: move type definitions to common.h
2025-02-02 21:35:12 +08:00
CismonX
031691fae5
build: move BUILDING_BOOKMARKFS to config.h
2025-02-02 18:51:48 +08:00
CismonX
d08848c097
db: minor refactor
2025-02-02 17:55:14 +08:00
CismonX
54c81c43bb
all: fix __FILE_NAME__ workaround
...
Do not apply offset for __FILE__ in non-VPATH build,
since the path is not prefixed with `${srcdir}/` in that case.
2025-02-02 17:48:42 +08:00
CismonX
c17d6ebadf
all: better workaround for __FILE_NAME__
...
There's only a few legacy releases of gcc and clang that
support -fmacro-prefix-map but not __FILE_NAME__.
Thus the originial workaround is not very beneficial.
Switching to a more portable `__FILE__ + offset` workaround
that works for any standard-compliant compiler, even TinyCC.
However, this workaround may produce binaries that leak
information about the build environment, especially when using
an exotic build path.
2025-02-01 23:25:19 +08:00
CismonX
5286cda051
doc: update backend API
...
- Add doc for the `bookmark_list` function.
- Other misc changes.
2025-02-01 19:07:42 +08:00
CismonX
88e38bd38e
backend: update cookie even on callback failure
...
No need to check status and always update cookie after
invoking callback for bookmark_list() and bookmark_fsck().
2025-02-01 00:21:02 +08:00
CismonX
78b80be2e5
backend: rename struct bookmarkfs_bookmark_entry
...
Rename field `next` -> `off`.
2025-01-31 20:31:52 +08:00
CismonX
93ff8cabe9
doc: update backend API
...
Add doc for the `backend_mkfs` function.
2025-01-31 00:09:17 +08:00
CismonX
6cae25ee7f
doc: misc update
2025-01-30 21:50:56 +08:00
CismonX
da453cdefd
doc: update backend API
...
Add doc for the `backend_sandbox` function.
2025-01-29 23:10:22 +08:00
CismonX
341b7b3d5a
doc: misc update
...
- Add manual section for the utility library.
- Add comments for utility library functions.
- Fix installation path for backends and fsck handlers.
2025-01-28 20:56:06 +08:00