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
4eb19ac0
Unverified
Commit
4eb19ac0
authored
Jan 28, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lsm: s/lsm_init/lsm_init_static/g
Make it clear that there is nothing to free here. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
677e1d27
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
attach.c
src/lxc/attach.c
+1
-1
lsm.c
src/lxc/lsm/lsm.c
+1
-1
lsm.h
src/lxc/lsm/lsm.h
+1
-1
start.c
src/lxc/start.c
+1
-1
attach.c
src/tests/attach.c
+1
-1
No files found.
src/lxc/attach.c
View file @
4eb19ac0
...
@@ -120,7 +120,7 @@ static int get_attach_context(struct attach_context *ctx,
...
@@ -120,7 +120,7 @@ static int get_attach_context(struct attach_context *ctx,
if
(
!
found
)
if
(
!
found
)
return
log_error_errno
(
-
ENOENT
,
ENOENT
,
"Failed to read capability bounding set from %s"
,
proc_fn
);
return
log_error_errno
(
-
ENOENT
,
ENOENT
,
"Failed to read capability bounding set from %s"
,
proc_fn
);
ctx
->
lsm_ops
=
lsm_init
();
ctx
->
lsm_ops
=
lsm_init
_static
();
ctx
->
lsm_label
=
ctx
->
lsm_ops
->
process_label_get
(
ctx
->
lsm_ops
,
ctx
->
init_pid
);
ctx
->
lsm_label
=
ctx
->
lsm_ops
->
process_label_get
(
ctx
->
lsm_ops
,
ctx
->
init_pid
);
ctx
->
ns_inherited
=
0
;
ctx
->
ns_inherited
=
0
;
...
...
src/lxc/lsm/lsm.c
View file @
4eb19ac0
...
@@ -21,7 +21,7 @@ __hidden extern struct lsm_ops *lsm_apparmor_ops_init(void);
...
@@ -21,7 +21,7 @@ __hidden extern struct lsm_ops *lsm_apparmor_ops_init(void);
__hidden
extern
struct
lsm_ops
*
lsm_selinux_ops_init
(
void
);
__hidden
extern
struct
lsm_ops
*
lsm_selinux_ops_init
(
void
);
__hidden
extern
struct
lsm_ops
*
lsm_nop_ops_init
(
void
);
__hidden
extern
struct
lsm_ops
*
lsm_nop_ops_init
(
void
);
struct
lsm_ops
*
lsm_init
(
void
)
struct
lsm_ops
*
lsm_init
_static
(
void
)
{
{
struct
lsm_ops
*
ops
=
NULL
;
struct
lsm_ops
*
ops
=
NULL
;
...
...
src/lxc/lsm/lsm.h
View file @
4eb19ac0
...
@@ -33,6 +33,6 @@ struct lsm_ops {
...
@@ -33,6 +33,6 @@ struct lsm_ops {
int
(
*
process_label_set_at
)(
struct
lsm_ops
*
ops
,
int
label_fd
,
const
char
*
label
,
bool
on_exec
);
int
(
*
process_label_set_at
)(
struct
lsm_ops
*
ops
,
int
label_fd
,
const
char
*
label
,
bool
on_exec
);
};
};
__hidden
extern
struct
lsm_ops
*
lsm_init
(
void
);
__hidden
extern
struct
lsm_ops
*
lsm_init
_static
(
void
);
#endif
/* __LXC_LSM_H */
#endif
/* __LXC_LSM_H */
src/lxc/start.c
View file @
4eb19ac0
...
@@ -728,7 +728,7 @@ int lxc_init(const char *name, struct lxc_handler *handler)
...
@@ -728,7 +728,7 @@ int lxc_init(const char *name, struct lxc_handler *handler)
if
(
status_fd
<
0
)
if
(
status_fd
<
0
)
return
log_error_errno
(
-
1
,
errno
,
"Failed to open monitor status fd"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to open monitor status fd"
);
handler
->
lsm_ops
=
lsm_init
();
handler
->
lsm_ops
=
lsm_init
_static
();
TRACE
(
"Initialized LSM"
);
TRACE
(
"Initialized LSM"
);
/* Begin by setting the state to STARTING. */
/* Begin by setting the state to STARTING. */
...
...
src/tests/attach.c
View file @
4eb19ac0
...
@@ -400,7 +400,7 @@ int main(int argc, char *argv[])
...
@@ -400,7 +400,7 @@ int main(int argc, char *argv[])
(
void
)
strlcpy
(
template
,
P_tmpdir
"/attach_XXXXXX"
,
sizeof
(
template
));
(
void
)
strlcpy
(
template
,
P_tmpdir
"/attach_XXXXXX"
,
sizeof
(
template
));
lsm_ops
=
lsm_init
();
lsm_ops
=
lsm_init
_static
();
i
=
lxc_make_tmpfile
(
template
,
false
);
i
=
lxc_make_tmpfile
(
template
,
false
);
if
(
i
<
0
)
{
if
(
i
<
0
)
{
...
...
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