summaryrefslogtreecommitdiffstats
path: root/libtar/libtar.h
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-12-09 21:52:12 +0100
committerEthan Yonker <dees_troy@teamw.in>2016-12-13 21:25:04 +0100
commit79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5 (patch)
treefef98df68f755305fcbb4da7d5cfaf0a8409a400 /libtar/libtar.h
parentSupport File Based Encryption (diff)
downloadandroid_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.tar
android_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.tar.gz
android_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.tar.bz2
android_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.tar.lz
android_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.tar.xz
android_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.tar.zst
android_bootable_recovery-79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5.zip
Diffstat (limited to '')
-rw-r--r--libtar/libtar.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libtar/libtar.h b/libtar/libtar.h
index 4a513754f..ab5a3bede 100644
--- a/libtar/libtar.h
+++ b/libtar/libtar.h
@@ -19,6 +19,11 @@
#include "libtar_listhash.h"
+#ifdef HAVE_EXT4_CRYPT
+#define EXT4_KEY_DESCRIPTOR_SIZE 8
+#define EXT4_KEY_DESCRIPTOR_HEX 17
+#endif
+
#ifdef __cplusplus
extern "C"
{
@@ -38,6 +43,7 @@ extern "C"
/* extended metadata for next file - used to store selinux_context */
#define TH_EXT_TYPE 'x'
+#define TH_POL_TYPE 'p'
/* our version of the tar header structure */
struct tar_header
@@ -64,6 +70,9 @@ struct tar_header
#ifdef HAVE_SELINUX
char *selinux_context;
#endif
+#ifdef HAVE_EXT4_CRYPT
+ char *e4crypt_policy;
+#endif
};
@@ -108,6 +117,7 @@ TAR;
#define TAR_IGNORE_CRC 64 /* ignore CRC in file header */
#define TAR_STORE_SELINUX 128 /* store selinux context */
#define TAR_USE_NUMERIC_ID 256 /* favor numeric owner over names */
+#define TAR_STORE_EXT4_POL 512 /* store ext4 crypto policy */
/* this is obsolete - it's here for backwards-compatibility only */
#define TAR_IGNORE_MAGIC 0
@@ -204,6 +214,7 @@ int th_write(TAR *t);
#define TH_ISLONGNAME(t) ((t)->th_buf.typeflag == GNU_LONGNAME_TYPE)
#define TH_ISLONGLINK(t) ((t)->th_buf.typeflag == GNU_LONGLINK_TYPE)
#define TH_ISEXTHEADER(t) ((t)->th_buf.typeflag == TH_EXT_TYPE)
+#define TH_ISPOLHEADER(t) ((t)->th_buf.typeflag == TH_POL_TYPE)
/* decode tar header info */
#define th_get_crc(t) oct_to_int((t)->th_buf.chksum, sizeof((t)->th_buf.chksum))