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
26a38fb6
Unverified
Commit
26a38fb6
authored
Jun 23, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: remove lxc.kmsg
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
953fe44f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
99 deletions
+0
-99
lxc.container.conf.sgml.in
doc/lxc.container.conf.sgml.in
+0
-19
conf.c
src/lxc/conf.c
+0
-33
conf.h
src/lxc/conf.h
+0
-1
confile.c
src/lxc/confile.c
+0
-39
parse_config_file.c
src/tests/parse_config_file.c
+0
-7
No files found.
doc/lxc.container.conf.sgml.in
View file @
26a38fb6
...
...
@@ -792,25 +792,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</refsect2>
<refsect2>
<title>Enable kmsg symlink</title>
<para>
Enable creating /dev/kmsg as symlink to /dev/console. This defaults to 0.
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.kmsg</option>
</term>
<listitem>
<para>
Set this to 1 to enable /dev/kmsg symlinking.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Mount points</title>
<para>
The mount points section specifies the different places to be
...
...
src/lxc/conf.c
View file @
26a38fb6
...
...
@@ -1632,33 +1632,6 @@ static int lxc_setup_console(const struct lxc_rootfs *rootfs,
return
lxc_setup_ttydir_console
(
rootfs
,
console
,
ttydir
);
}
static
int
setup_kmsg
(
const
struct
lxc_rootfs
*
rootfs
,
const
struct
lxc_console
*
console
)
{
char
kpath
[
MAXPATHLEN
];
int
ret
;
if
(
!
rootfs
->
path
)
return
0
;
ret
=
snprintf
(
kpath
,
sizeof
(
kpath
),
"%s/dev/kmsg"
,
rootfs
->
mount
);
if
(
ret
<
0
||
ret
>=
sizeof
(
kpath
))
return
-
1
;
ret
=
unlink
(
kpath
);
if
(
ret
&&
errno
!=
ENOENT
)
{
SYSERROR
(
"error unlinking %s"
,
kpath
);
return
-
1
;
}
ret
=
symlink
(
"console"
,
kpath
);
if
(
ret
)
{
SYSERROR
(
"failed to create symlink for kmsg"
);
return
-
1
;
}
return
0
;
}
static
void
parse_mntopt
(
char
*
opt
,
unsigned
long
*
flags
,
char
**
data
)
{
struct
mount_opt
*
mo
;
...
...
@@ -2667,7 +2640,6 @@ struct lxc_conf *lxc_conf_init(void)
free
(
new
);
return
NULL
;
}
new
->
kmsg
=
0
;
new
->
logfd
=
-
1
;
lxc_list_init
(
&
new
->
cgroup
);
lxc_list_init
(
&
new
->
network
);
...
...
@@ -4206,11 +4178,6 @@ int lxc_setup(struct lxc_handler *handler)
return
-
1
;
}
if
(
lxc_conf
->
kmsg
)
{
if
(
setup_kmsg
(
&
lxc_conf
->
rootfs
,
&
lxc_conf
->
console
))
// don't fail
ERROR
(
"failed to setup kmsg for '%s'"
,
name
);
}
if
(
!
lxc_conf
->
is_execute
&&
setup_dev_symlinks
(
&
lxc_conf
->
rootfs
))
{
ERROR
(
"failed to setup /dev symlinks for '%s'"
,
name
);
return
-
1
;
...
...
src/lxc/conf.h
View file @
26a38fb6
...
...
@@ -351,7 +351,6 @@ struct lxc_conf {
int
haltsignal
;
// signal used to halt container
int
rebootsignal
;
// signal used to reboot container
int
stopsignal
;
// signal used to hard stop container
unsigned
int
kmsg
;
// if 1, create /dev/kmsg symlink
char
*
rcfile
;
// Copy of the top level rcfile we read
// Logfile and logleve can be set in a container config file.
...
...
src/lxc/confile.c
View file @
26a38fb6
...
...
@@ -87,12 +87,6 @@ static int get_config_ttydir(const char *, char *, int, struct lxc_conf *,
void
*
);
static
int
clr_config_ttydir
(
const
char
*
,
struct
lxc_conf
*
,
void
*
);
static
int
set_config_kmsg
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
,
void
*
);
static
int
get_config_kmsg
(
const
char
*
,
char
*
,
int
,
struct
lxc_conf
*
,
void
*
);
static
int
clr_config_kmsg
(
const
char
*
,
struct
lxc_conf
*
,
void
*
);
static
int
set_config_apparmor_profile
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
,
void
*
);
static
int
get_config_apparmor_profile
(
const
char
*
,
char
*
,
int
,
...
...
@@ -428,7 +422,6 @@ static struct lxc_config_t config[] = {
{
"lxc.pts"
,
set_config_pts
,
get_config_pts
,
clr_config_pts
,
},
{
"lxc.tty"
,
set_config_tty
,
get_config_tty
,
clr_config_tty
,
},
{
"lxc.devttydir"
,
set_config_ttydir
,
get_config_ttydir
,
clr_config_ttydir
,
},
{
"lxc.kmsg"
,
set_config_kmsg
,
get_config_kmsg
,
clr_config_kmsg
,
},
{
"lxc.apparmor.profile"
,
set_config_apparmor_profile
,
get_config_apparmor_profile
,
clr_config_apparmor_profile
,
},
{
"lxc.apparmor.allow_incomplete"
,
set_config_apparmor_allow_incomplete
,
get_config_apparmor_allow_incomplete
,
clr_config_apparmor_allow_incomplete
,
},
{
"lxc.selinux.context"
,
set_config_selinux_context
,
get_config_selinux_context
,
clr_config_selinux_context
,
},
...
...
@@ -1575,25 +1568,6 @@ static int set_config_ttydir(const char *key, const char *value,
NAME_MAX
+
1
);
}
static
int
set_config_kmsg
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
,
void
*
data
)
{
/* Set config value to default. */
if
(
lxc_config_value_empty
(
value
))
{
lxc_conf
->
kmsg
=
0
;
return
0
;
}
/* Parse new config value. */
if
(
lxc_safe_uint
(
value
,
&
lxc_conf
->
kmsg
)
<
0
)
return
-
1
;
if
(
lxc_conf
->
kmsg
>
1
)
return
-
1
;
return
0
;
}
static
int
set_config_apparmor_profile
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
,
void
*
data
)
{
...
...
@@ -3106,12 +3080,6 @@ static int get_config_ttydir(const char *key, char *retv, int inlen,
return
lxc_get_conf_str
(
retv
,
inlen
,
c
->
ttydir
);
}
static
int
get_config_kmsg
(
const
char
*
key
,
char
*
retv
,
int
inlen
,
struct
lxc_conf
*
c
,
void
*
data
)
{
return
lxc_get_conf_int
(
c
,
retv
,
inlen
,
c
->
kmsg
);
}
static
int
get_config_apparmor_profile
(
const
char
*
key
,
char
*
retv
,
int
inlen
,
struct
lxc_conf
*
c
,
void
*
data
)
{
...
...
@@ -3694,13 +3662,6 @@ static inline int clr_config_ttydir(const char *key, struct lxc_conf *c,
return
0
;
}
static
inline
int
clr_config_kmsg
(
const
char
*
key
,
struct
lxc_conf
*
c
,
void
*
data
)
{
c
->
kmsg
=
0
;
return
0
;
}
static
inline
int
clr_config_apparmor_profile
(
const
char
*
key
,
struct
lxc_conf
*
c
,
void
*
data
)
{
...
...
src/tests/parse_config_file.c
View file @
26a38fb6
...
...
@@ -321,13 +321,6 @@ int main(int argc, char *argv[])
goto
non_test_error
;
}
/* lxc.kmsg */
if
(
set_get_compare_clear_save_load
(
c
,
"lxc.kmsg"
,
"1"
,
tmpf
,
true
)
<
0
)
{
lxc_error
(
"%s
\n
"
,
"lxc.kmsg"
);
goto
non_test_error
;
}
/* REMOVE IN LXC 3.0
legacy security keys
*/
...
...
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