parser_lib.h 1.3 KB
Newer Older
R
Roberto Sassu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * Copyright (C) 2019-2020 Huawei Technologies Duesseldorf GmbH
 *
 * Author: Roberto Sassu <roberto.sassu@huawei.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, version 2 of the
 * License.
 *
 * File: parser_lib.h
 *      Header of parser_lib.c
 */

#ifndef _PARSER_LIB_H
#define _PARSER_LIB_H

#include "compact_list.h"

int add_digest(int fd, struct list_head *head, u16 type, u16 modifiers,
A
Anakin Zhang 已提交
21
           u16 algo, u8 *digest);
R
Roberto Sassu 已提交
22
int calc_metadata_digest(int fd, struct list_head *head, u16 type,
A
Anakin Zhang 已提交
23 24 25
             u16 modifiers, u16 algo, u8 *digest, u8 *evm_digest,
             char *path, uid_t uid, gid_t gid, mode_t mode,
             char *obj_label, char *caps);
R
Roberto Sassu 已提交
26
int add_metadata_digest(int fd, struct list_head *head, u16 modifiers,
A
Anakin Zhang 已提交
27
            u8 *evm_digest);
R
Roberto Sassu 已提交
28
int add_ima_xattr(int fd, struct list_head *head, u16 type, u16 modifiers,
A
Anakin Zhang 已提交
29
          u16 algo, u8 *digest, char *path);
R
Roberto Sassu 已提交
30
int check_repair_xattr(char *path, char *xattr_name, void *xattr_value,
A
Anakin Zhang 已提交
31 32
               int xattr_value_len, int ima_algo, int modifiers,
               int repair);
R
Roberto Sassu 已提交
33
int check_repair_attr(char *path, uid_t uid, gid_t gid, mode_t mode,
A
Anakin Zhang 已提交
34
              int repair);
R
Roberto Sassu 已提交
35 36

#endif /*_PARSER_LIB_H*/