2019-06-01 16:08:55 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2010-07-30 05:47:57 +08: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 18:25:14 +08:00
|
|
|
PATH_MEDIATE_DELETED = 0x10000, /* mediate deleted paths */
|
2010-07-30 05:47:57 +08:00
|
|
|
};
|
|
|
|
|
2017-05-23 18:25:14 +08:00
|
|
|
int aa_path_name(const struct path *path, int flags, char *buffer,
|
2017-05-22 18:06:52 +08:00
|
|
|
const char **name, const char **info,
|
|
|
|
const char *disconnected);
|
2010-07-30 05:47:57 +08:00
|
|
|
|
2019-09-14 18:34:06 +08:00
|
|
|
#define IN_ATOMIC true
|
|
|
|
char *aa_get_buffer(bool in_atomic);
|
2019-05-03 22:12:21 +08:00
|
|
|
void aa_put_buffer(char *buf);
|
2017-01-16 16:43:10 +08:00
|
|
|
|
2010-07-30 05:47:57 +08:00
|
|
|
#endif /* __AA_PATH_H */
|