2012-12-24 15:36:14 +04:00
|
|
|
#ifndef __CR_CRTOOLS_H__
|
|
|
|
#define __CR_CRTOOLS_H__
|
2011-09-23 12:00:45 +04:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
2012-05-31 14:50:00 +04:00
|
|
|
#include "list.h"
|
2013-01-09 17:02:47 +04:00
|
|
|
#include "asm/types.h"
|
2013-11-05 20:17:47 +04:00
|
|
|
#include "servicefd.h"
|
2011-09-23 12:00:45 +04:00
|
|
|
|
2011-10-03 11:52:13 +04:00
|
|
|
#define CR_FD_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
|
2011-09-23 12:00:45 +04:00
|
|
|
|
2012-07-19 17:37:25 +04:00
|
|
|
int check_img_inventory(void);
|
|
|
|
int write_img_inventory(void);
|
2013-03-27 16:16:25 +04:00
|
|
|
void kill_inventory(void);
|
2012-07-19 17:37:25 +04:00
|
|
|
|
2011-12-01 18:21:17 +04:00
|
|
|
#define LAST_PID_PATH "/proc/sys/kernel/ns_last_pid"
|
|
|
|
|
2013-05-08 16:00:53 +04:00
|
|
|
int cr_dump_tasks(pid_t pid);
|
2013-05-14 12:00:40 +04:00
|
|
|
int cr_pre_dump_tasks(pid_t pid);
|
2013-05-28 21:11:13 +04:00
|
|
|
int cr_restore_tasks(void);
|
|
|
|
int cr_show(int pid);
|
2011-10-04 01:50:19 +04:00
|
|
|
int convert_to_elf(char *elf_path, int fd_core);
|
2012-03-02 14:01:08 +04:00
|
|
|
int cr_check(void);
|
2012-12-17 22:56:06 +03:00
|
|
|
int cr_exec(int pid, char **opts);
|
2011-09-23 12:00:45 +04:00
|
|
|
|
2013-09-28 15:51:09 +04:00
|
|
|
void restrict_uid(unsigned int uid, unsigned int gid);
|
2013-09-28 15:48:44 +04:00
|
|
|
struct proc_status_creds;
|
|
|
|
bool may_dump(struct proc_status_creds *);
|
|
|
|
struct _CredsEntry;
|
|
|
|
bool may_restore(struct _CredsEntry *);
|
2013-09-28 06:16:17 +04:00
|
|
|
|
2012-12-25 22:40:24 +04:00
|
|
|
#endif /* __CR_CRTOOLS_H__ */
|