Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
84cf6d25
Commit
84cf6d25
authored
Jul 03, 2019
by
Wolfgang Bumiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: add lxc.seccomp.notify.cookie
This is an arbitrary string to to be included in proxied seccomp notification messages. Signed-off-by:
Wolfgang Bumiller
<
w.bumiller@proxmox.com
>
parent
99d03dec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
confile.c
src/lxc/confile.c
+34
-0
lxcseccomp.h
src/lxc/lxcseccomp.h
+1
-0
No files found.
src/lxc/confile.c
View file @
84cf6d25
...
...
@@ -153,6 +153,7 @@ lxc_config_define(rootfs_options);
lxc_config_define
(
rootfs_path
);
lxc_config_define
(
seccomp_profile
);
lxc_config_define
(
seccomp_allow_nesting
);
lxc_config_define
(
seccomp_notify_cookie
);
lxc_config_define
(
seccomp_notify_proxy
);
lxc_config_define
(
selinux_context
);
lxc_config_define
(
signal_halt
);
...
...
@@ -246,6 +247,7 @@ static struct lxc_config_t config_jump_table[] = {
{
"lxc.rootfs.options"
,
set_config_rootfs_options
,
get_config_rootfs_options
,
clr_config_rootfs_options
,
},
{
"lxc.rootfs.path"
,
set_config_rootfs_path
,
get_config_rootfs_path
,
clr_config_rootfs_path
,
},
{
"lxc.seccomp.allow_nesting"
,
set_config_seccomp_allow_nesting
,
get_config_seccomp_allow_nesting
,
clr_config_seccomp_allow_nesting
,
},
{
"lxc.seccomp.notify.cookie"
,
set_config_seccomp_notify_cookie
,
get_config_seccomp_notify_cookie
,
clr_config_seccomp_notify_cookie
,
},
{
"lxc.seccomp.notify.proxy"
,
set_config_seccomp_notify_proxy
,
get_config_seccomp_notify_proxy
,
clr_config_seccomp_notify_proxy
,
},
{
"lxc.seccomp.profile"
,
set_config_seccomp_profile
,
get_config_seccomp_profile
,
clr_config_seccomp_profile
,
},
{
"lxc.selinux.context"
,
set_config_selinux_context
,
get_config_selinux_context
,
clr_config_selinux_context
,
},
...
...
@@ -1013,6 +1015,16 @@ static int set_config_seccomp_allow_nesting(const char *key, const char *value,
#endif
}
static
int
set_config_seccomp_notify_cookie
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
,
void
*
data
)
{
#ifdef HAVE_SECCOMP_NOTIFY
return
set_config_string_item
(
&
lxc_conf
->
seccomp
.
notifier
.
cookie
,
value
);
#else
return
minus_one_set_errno
(
ENOSYS
);
#endif
}
static
int
set_config_seccomp_notify_proxy
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
,
void
*
data
)
{
...
...
@@ -3955,6 +3967,16 @@ static int get_config_seccomp_allow_nesting(const char *key, char *retv,
#endif
}
static
int
get_config_seccomp_notify_cookie
(
const
char
*
key
,
char
*
retv
,
int
inlen
,
struct
lxc_conf
*
c
,
void
*
data
)
{
#ifdef HAVE_SECCOMP_NOTIFY
return
lxc_get_conf_str
(
retv
,
inlen
,
c
->
seccomp
.
notifier
.
cookie
);
#else
return
minus_one_set_errno
(
ENOSYS
);
#endif
}
static
int
get_config_seccomp_notify_proxy
(
const
char
*
key
,
char
*
retv
,
int
inlen
,
struct
lxc_conf
*
c
,
void
*
data
)
{
...
...
@@ -4563,6 +4585,18 @@ static inline int clr_config_seccomp_allow_nesting(const char *key,
#endif
}
static
inline
int
clr_config_seccomp_notify_cookie
(
const
char
*
key
,
struct
lxc_conf
*
c
,
void
*
data
)
{
#ifdef HAVE_SECCOMP_NOTIFY
free
(
c
->
seccomp
.
notifier
.
cookie
);
c
->
seccomp
.
notifier
.
cookie
=
NULL
;
return
0
;
#else
return
minus_one_set_errno
(
ENOSYS
);
#endif
}
static
inline
int
clr_config_seccomp_notify_proxy
(
const
char
*
key
,
struct
lxc_conf
*
c
,
void
*
data
)
{
...
...
src/lxc/lxcseccomp.h
View file @
84cf6d25
...
...
@@ -69,6 +69,7 @@ struct seccomp_notify {
struct
sockaddr_un
proxy_addr
;
struct
seccomp_notif
*
req_buf
;
struct
seccomp_notif_resp
*
rsp_buf
;
char
*
cookie
;
};
#define HAVE_SECCOMP_NOTIFY 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment