]> Dogcows Code - chaz/tar/commit
Add SELinux context store/restore/list support.
authorPavel Raiskup <praiskup@redhat.com>
Sun, 18 Nov 2012 20:28:01 +0000 (22:28 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 18 Nov 2012 20:28:01 +0000 (22:28 +0200)
commit085cace1805308589c6211429068f68047be0b0e
treef9f1902f8aa98cb0e5496565b1208c3224c85d28
parentd36f5a3cc3280d6c4a58367bf51b527d5c14ac04
Add SELinux context store/restore/list support.

* gnulib.modules: Add selinux-at.
* src/Makefile.am (tar_LDADD): Add LIB_SELINUX.

* src/create.c (start_header, dump_file0): Handle selinux contexts.
* src/extract.c (delayed_set_stat) <cntx_name>: New member.
(delayed_link) <cntx_name>: New member.
(set_stat, delay_set_stat)
(apply_nonancestor_delayed_set_stat): Handle selinux contexts.
* src/tar.c: New options: "--selinux", "--no-selinux".
(tar_stat_destroy): Free cntx_name.
* src/tar.h (tar_stat_info) <cntx_name>: New member.
* src/xattrs.c (xattrs_selinux_get)
(xattrs_selinux_set): New functions.
(xattrs_print_char): Honor selinux_context_option.
(xattrs_print): Print selinux context.
* src/xheader.c: Handle new keyword "RHT.security.selinux".
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Likewise.
* tests/selacl01.at: New test.
* tests/selnx01.at: New test.
12 files changed:
gnulib.modules
src/Makefile.am
src/create.c
src/extract.c
src/tar.c
src/tar.h
src/xattrs.c
src/xheader.c
tests/Makefile.am
tests/selacl01.at [new file with mode: 0644]
tests/selnx01.at [new file with mode: 0644]
tests/testsuite.at
This page took 0.023022 seconds and 4 git commands to generate.