mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
In LXD, we use the container name in the LSM profile. If the container name
is changed on migrate (on the host side), we want to use a different LSM
profile name (a. la. --cgroup-root). This flag adds that support.
v2: remove unused field, add comment about double detection in
kerndat_lsm()
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
35 lines
752 B
C
35 lines
752 B
C
#ifndef __CR_LSM_H__
|
|
#define __CR_LSM_H__
|
|
|
|
#include "protobuf/inventory.pb-c.h"
|
|
#include "protobuf/creds.pb-c.h"
|
|
|
|
/*
|
|
* Get the Lsmtype for the current host.
|
|
*/
|
|
extern Lsmtype host_lsm_type(void);
|
|
|
|
/*
|
|
* Initilize the Lsmtype for the current host
|
|
*/
|
|
extern void kerndat_lsm(void);
|
|
|
|
/*
|
|
* Read the LSM profile for the pstree item
|
|
*/
|
|
extern int collect_lsm_profile(pid_t, CredsEntry *);
|
|
|
|
/*
|
|
* Validate that the LSM profiles can be correctly applied (must happen after
|
|
* pstree is set up).
|
|
*/
|
|
int validate_lsm(char *profile);
|
|
|
|
/*
|
|
* Render the profile name in the way that the LSM wants it written to
|
|
* /proc/<pid>/attr/current.
|
|
*/
|
|
int render_lsm_profile(char *profile, char **val);
|
|
|
|
extern int parse_lsm_arg(char *arg);
|
|
#endif /* __CR_LSM_H__ */
|