2019-06-01 08:08:55 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2010-07-29 21:47:57 +00:00
|
|
|
/*
|
|
|
|
* AppArmor security module
|
|
|
|
*
|
|
|
|
* This file contains AppArmor basic path manipulation function definitions.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1998-2008 Novell/SUSE
|
|
|
|
* Copyright 2009-2010 Canonical Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __AA_PATH_H
|
|
|
|
#define __AA_PATH_H
|
|
|
|
|
|
|
|
enum path_flags {
|
|
|
|
PATH_IS_DIR = 0x1, /* path is a directory */
|
|
|
|
PATH_CONNECT_PATH = 0x4, /* connect disconnected paths to / */
|
|
|
|
PATH_CHROOT_REL = 0x8, /* do path lookup relative to chroot */
|
|
|
|
PATH_CHROOT_NSCONNECT = 0x10, /* connect paths that are at ns root */
|
|
|
|
|
|
|
|
PATH_DELEGATE_DELETED = 0x08000, /* delegate deleted files */
|
2017-05-23 10:25:14 +00:00
|
|
|
PATH_MEDIATE_DELETED = 0x10000, /* mediate deleted paths */
|
2010-07-29 21:47:57 +00:00
|
|
|
};
|
|
|
|
|
2017-05-23 10:25:14 +00:00
|
|
|
int aa_path_name(const struct path *path, int flags, char *buffer,
|
2017-05-22 10:06:52 +00:00
|
|
|
const char **name, const char **info,
|
|
|
|
const char *disconnected);
|
2010-07-29 21:47:57 +00:00
|
|
|
|
2019-09-14 10:34:06 +00:00
|
|
|
#define IN_ATOMIC true
|
|
|
|
char *aa_get_buffer(bool in_atomic);
|
2019-05-03 14:12:21 +00:00
|
|
|
void aa_put_buffer(char *buf);
|
2017-01-16 08:43:10 +00:00
|
|
|
|
2010-07-29 21:47:57 +00:00
|
|
|
#endif /* __AA_PATH_H */
|