Changeset View
Changeset View
Standalone View
Standalone View
head/sys/security/mac_veriexec/mac_veriexec_internal.h
/* | /* | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
* | * | ||||
* Copyright (c) 2011, 2012, 2013, 2015, 2016, Juniper Networks, Inc. | * Copyright (c) 2011, 2012, 2013, 2015, 2016, 2019, Juniper Networks, Inc. | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
* notice, this list of conditions and the following disclaimer. | * notice, this list of conditions and the following disclaimer. | ||||
* 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright | ||||
Show All 36 Lines | |||||
struct mac_veriexec_file_info | struct mac_veriexec_file_info | ||||
{ | { | ||||
int flags; | int flags; | ||||
long fileid; | long fileid; | ||||
unsigned long gen; | unsigned long gen; | ||||
struct mac_veriexec_fpops *ops; | struct mac_veriexec_fpops *ops; | ||||
unsigned char fingerprint[MAXFINGERPRINTLEN]; | unsigned char fingerprint[MAXFINGERPRINTLEN]; | ||||
char *label; | |||||
size_t labellen; | |||||
LIST_ENTRY(mac_veriexec_file_info) entries; | LIST_ENTRY(mac_veriexec_file_info) entries; | ||||
}; | }; | ||||
MALLOC_DECLARE(M_VERIEXEC); | MALLOC_DECLARE(M_VERIEXEC); | ||||
SYSCTL_DECL(_security_mac_veriexec); | SYSCTL_DECL(_security_mac_veriexec); | ||||
struct cred; | struct cred; | ||||
struct image_params; | struct image_params; | ||||
struct proc; | struct proc; | ||||
struct sbuf; | struct sbuf; | ||||
struct thread; | struct thread; | ||||
struct ucred; | struct ucred; | ||||
struct vattr; | struct vattr; | ||||
struct vnode; | struct vnode; | ||||
int mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp, | int mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp, | ||||
struct vattr *vap, struct thread *td, int check_files); | struct vattr *vap, struct thread *td, int check_files); | ||||
int mac_veriexec_metadata_get_executable_flags(struct ucred *cred, | int mac_veriexec_metadata_get_executable_flags(struct ucred *cred, | ||||
struct proc *p, int *flags, int check_files); | struct proc *p, int *flags, int check_files); | ||||
int mac_veriexec_metadata_get_file_flags(dev_t fsid, long fileid, | int mac_veriexec_metadata_get_file_flags(dev_t fsid, long fileid, | ||||
unsigned long gen, int *flags, int check_files); | unsigned long gen, int *flags, int check_files); | ||||
struct mac_veriexec_file_info * | |||||
mac_veriexec_metadata_get_file_info(dev_t fsid, long fileid, | |||||
unsigned long gen, int *found_dev, int check_files); | |||||
void mac_veriexec_metadata_init(void); | void mac_veriexec_metadata_init(void); | ||||
void mac_veriexec_metadata_print_db(struct sbuf *sbp); | void mac_veriexec_metadata_print_db(struct sbuf *sbp); | ||||
int mac_veriexec_metadata_unmounted(dev_t fsid, struct thread *td); | int mac_veriexec_metadata_unmounted(dev_t fsid, struct thread *td); | ||||
int mac_veriexec_fingerprint_add_ops(struct mac_veriexec_fpops *fpops); | int mac_veriexec_fingerprint_add_ops(struct mac_veriexec_fpops *fpops); | ||||
int mac_veriexec_fingerprint_check_image(struct image_params *imgp, | int mac_veriexec_fingerprint_check_image(struct image_params *imgp, | ||||
int check_files, struct thread *td); | int check_files, struct thread *td); | ||||
Show All 16 Lines |