security: create separate security.h header

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Ruslan Kuprieiev 2015-01-29 22:59:27 +02:00 committed by Pavel Emelyanov
parent 0b08bcfcad
commit df301b7eb7
7 changed files with 17 additions and 6 deletions

View file

@ -73,6 +73,7 @@
#include "sysfs_parse.h"
#include "action-scripts.h"
#include "aio.h"
#include "security.h"
#include "asm/dump.h"

View file

@ -73,6 +73,7 @@
#include "file-lock.h"
#include "action-scripts.h"
#include "aio.h"
#include "security.h"
#include "parasite-syscall.h"

View file

@ -27,6 +27,7 @@
#include "mount.h"
#include "cgroup.h"
#include "action-scripts.h"
#include "security.h"
#include "setproctitle.h"

View file

@ -38,6 +38,7 @@
#include "cgroup.h"
#include "cpu.h"
#include "action-scripts.h"
#include "security.h"
#include "setproctitle.h"

View file

@ -24,12 +24,6 @@ extern int cr_check(void);
extern int cr_exec(int pid, char **opts);
extern int cr_dedup(void);
extern int restrict_uid(unsigned int uid, unsigned int gid);
struct proc_status_creds;
extern bool may_dump(struct proc_status_creds *);
struct _CredsEntry;
extern bool may_restore(struct _CredsEntry *);
extern bool cr_user_is_root(void);
extern int check_add_feature(char *arg);
#endif /* __CR_CRTOOLS_H__ */

12
include/security.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef __CR_SECURITY_H__
#define __CR_SECURITY_H__
#include "proc_parse.h"
#include "protobuf/creds.pb-c.h"
extern int restrict_uid(unsigned int uid, unsigned int gid);
extern bool may_dump(struct proc_status_creds *);
extern bool may_restore(struct _CredsEntry *);
extern bool cr_user_is_root(void);
#endif /* __CR_SECURITY_H__ */

View file

@ -19,6 +19,7 @@
#include "ptrace.h"
#include "proc_parse.h"
#include "crtools.h"
#include "security.h"
int unseize_task(pid_t pid, int orig_st, int st)
{