Christian Ebner and Dietmar Maurer
2dbba78b98
src/pxar/sequential_decoder.rs: impl support to dump/restore ACLs from pxar archives
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-24 06:27:24 +02:00
Christian Ebner and Dietmar Maurer
6a19448004
src/pxar/encoder.rs: impl support to store ACLs in pxar achives
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-24 06:21:33 +02:00
Christian Ebner and Dietmar Maurer
7cfaade7c8
src/pxar/format_definition.rs: define types and structs needed to impl ACL support in pxar
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-24 06:16:55 +02:00
Christian Ebner and Dietmar Maurer
b344461b33
pxar: pass feature_flags to encoder/decoder instead of individual flags
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-24 06:11:36 +02:00
Christian Ebner and Dietmar Maurer
687407741b
src/tools/xattr.rs: add test for is_valid_xattr_name()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-24 06:11:36 +02:00
Christian Ebner and Dietmar Maurer
357e4614e2
Minor refactoring of pxars xattr encoder/decoder, mostly reformatting and renaming.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-24 06:11:36 +02:00
Christian Ebner and Dietmar Maurer
238dd1b7ab
tests/catar.rs: Pass dummy xattr/fcaps feature_flags to encoder.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:41:03 +02:00
Christian Ebner and Dietmar Maurer
0d9bab05ab
src/bin/pxar.rs: impl CLI flags to disable archiving/restoring of xattrs and fcaps.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:40:50 +02:00
Christian Ebner and Dietmar Maurer
4add706092
src/client/: pass dummy flags for xattrs and fcaps to pxar encoder/decoder.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:40:32 +02:00
Christian Ebner and Dietmar Maurer
54b14ad741
src/pxar/decoder.rs: pass flags for xattrs and fcaps to decoder.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:40:09 +02:00
Christian Ebner and Dietmar Maurer
1201360def
src/pxar/sequential_decoder.rs: Conditional restore xattrs and fcaps if feature_flags is set
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:39:16 +02:00
Christian Ebner and Dietmar Maurer
8bc8791338
src/pxar/format_definitions.rs: do not store the feature_flags in pxar archive.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:37:37 +02:00
Christian Ebner and Dietmar Maurer
a45a123950
src/pxar/encoder: Use encoder feature_flags, do not store them within the archive.
...
Instead of testing and storing the feature_flags in the pxar archive, set and use
the feature flags within the encoder.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:34:36 +02:00
Christian Ebner and Dietmar Maurer
fe61cc1099
tests/pxar.rs: Make sure the correct pxar binary is run in the tests.
...
If compiled in debug mode, the debug binary should be tested, in release mode
the release binary has to be invoked.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:31:37 +02:00
Christian Ebner and Dietmar Maurer
ec56f07bec
Makefile: make the tests folder available in the build folder on 'make deb'
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:31:06 +02:00
Christian Ebner and Dietmar Maurer
cc119edbe5
Makefile: Allow to pass parameter tests=pattern to make test
...
`make test tests=pattern` will only run the subset of tests containing pattern,
therefore allowing to specify which subset of tests to run.
If the parameter is not specified, all tests are run.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-22 10:01:35 +02:00
Christian Ebner and Dietmar Maurer
de61bc9264
src/tools/xattr.rs: impl unit tests for fsetattr and fgetattr
...
As git does not preserve xattrs they have to be set before they can be read.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-22 10:01:10 +02:00
Christian Ebner and Dietmar Maurer
015c5f6bfb
tests/pxar.rs: Integrity test for pxar
...
Test the integrity of the restored folder content of data previously archived with pxar
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:26:34 +02:00
Christian Ebner and Dietmar Maurer
596182056b
src/pxar/sequential_decoder.rs: impl functionality to restore xattrs/fcaps from pxar achives
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:15:30 +02:00
Christian Ebner and Dietmar Maurer
b303057a19
src/pxar/encoder.rs: impl functionality to encode xattrs/fcaps in pxar
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:06:26 +02:00
Christian Ebner and Dietmar Maurer
bee8d8ea78
src/tools/xattr.rs: add functions name_store and security_capability
...
These functions allow to check if the name for xattrs/fcaps are valid.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:05:31 +02:00
Christian Ebner and Dietmar Maurer
2dcdd3b427
src/tools/xattrs.rs: impl libc wrapper functions to get/set xattrs and fcaps
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-16 11:14:21 +02:00
Christian Ebner and Dietmar Maurer
de2016d58a
src/pxar/format_definitions.rs: add format definitions for xattrs and fcaps
...
In addition to the format definition, the traits needed for sorting of xattr
entries by name are derived.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-16 11:14:13 +02:00
Christian Ebner and Dietmar Maurer
dec1ff18b8
src/tools/acl.rs: impl add_entry_full for ACL and set_permissions for ACLEntry
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-16 11:10:06 +02:00
Christian Ebner and Dietmar Maurer
25e205a1d3
src/tools.rs: add mod acl to tools
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-14 06:34:24 +02:00
Christian Ebner and Dietmar Maurer
d22096ef4b
src/tools/acl.rs: impl POSIX access control list (ACL) manipulation tools
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-14 06:28:42 +02:00
Christian Ebner and Dietmar Maurer
8b7c0def84
src/tools/procfs.rs: clean up tab indentation and use whitespaces instead
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-25 13:14:52 +02:00
Christian Ebner and Dietmar Maurer
ae694f44ef
src/tools/procfs.rs: add tests for read_proc_net_route() and read_proc_net_ipv6_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-24 06:43:52 +02:00
Christian Ebner and Dietmar Maurer
ec8db837fb
src/tools/procfs.rs: refactor read_proc_net_route() and read_proc_net_ipv6_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-24 06:43:32 +02:00
Christian Ebner and Dietmar Maurer
eb46c3d1ec
src/tools/procfs.rs: implement read_proc_net_ipv6_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-23 14:31:23 +02:00
Christian Ebner and Dietmar Maurer
286f0d4099
src/tools/procfs.rs: implement read_proc_net_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-15 11:13:16 +02:00
Christian Ebner and Dietmar Maurer
d2981e2738
src/tools/procfs.rs: implement read_proc_net_dev()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-13 11:52:59 +02:00
Christian Ebner and Dietmar Maurer
13abfdc57a
src/tools/procfs.rs: implement read_memory_usage()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-13 11:52:01 +02:00
Christian Ebner and Dietmar Maurer
3005ef48b6
src/tools/procfs.rs: Rename variable and struct to be more consistent
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-12 12:13:34 +02:00
Christian Ebner and Dietmar Maurer
cc93bacb72
src/tools/procfs.rs: simplify read_cpuinfo()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-12 12:13:14 +02:00
Christian Ebner and Dietmar Maurer
1cd33633aa
/src/tools: Cleanup tempfiles in folder
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-10 13:56:22 +02:00
Christian Ebner and Dietmar Maurer
2b6a3e1396
src/tools/procfs.rs: implement read_cpuinfo()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-10 13:11:11 +02:00
Christian Ebner and Dietmar Maurer
1f6fbf1c57
src/tools/procfs.rs: implement read_meminfo()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-09 15:21:49 +02:00
Christian Ebner and Dietmar Maurer
a2474d328f
src/tools/procfs.rs: implement read_proc_uptime and read_proc_uptime_ticks
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-05 06:22:21 +02:00
Christian Ebner and Dietmar Maurer
08daa81af6
procfs: implement check_process_running and check_process_running_pstart
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-04 13:54:17 +02:00
Christian Ebner and Dietmar Maurer
e04d1bfadc
Cleanup of if statement with unwraps by a more compact match statement
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-03-20 09:49:18 +01:00