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
1fb5e888
Unverified
Commit
1fb5e888
authored
Feb 01, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lsm: do not #ifdefine
Since we stopped linking against AppArmor we can now remove the conditional compilation. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2ddc6653
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
47 deletions
+4
-47
lsm.c
src/lxc/lsm/lsm.c
+1
-5
lsm.h
src/lxc/lsm/lsm.h
+2
-41
selinux.c
src/lxc/lsm/selinux.c
+1
-1
No files found.
src/lxc/lsm/lsm.c
View file @
1fb5e888
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
#if HAVE_APPARMOR || HAVE_SELINUX
#include <errno.h>
#include <errno.h>
#include <stdlib.h>
#include <stdlib.h>
#include <unistd.h>
#include <unistd.h>
...
@@ -31,7 +29,7 @@
...
@@ -31,7 +29,7 @@
#include "conf.h"
#include "conf.h"
#include "log.h"
#include "log.h"
#include "lsm
/lsm
.h"
#include "lsm.h"
lxc_log_define
(
lxc_lsm
,
lxc
);
lxc_log_define
(
lxc_lsm
,
lxc
);
...
@@ -183,5 +181,3 @@ int lsm_process_label_set(const char *label, struct lxc_conf *conf,
...
@@ -183,5 +181,3 @@ int lsm_process_label_set(const char *label, struct lxc_conf *conf,
}
}
return
drv
->
process_label_set
(
label
,
conf
,
use_default
,
on_exec
);
return
drv
->
process_label_set
(
label
,
conf
,
use_default
,
on_exec
);
}
}
#endif
src/lxc/lsm/lsm.h
View file @
1fb5e888
...
@@ -28,7 +28,7 @@ struct lxc_conf;
...
@@ -28,7 +28,7 @@ struct lxc_conf;
#include <sys/types.h>
#include <sys/types.h>
#include "
../
utils.h"
#include "utils.h"
#define LXC_LSMATTRLEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
#define LXC_LSMATTRLEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
...
@@ -41,7 +41,6 @@ struct lsm_drv {
...
@@ -41,7 +41,6 @@ struct lsm_drv {
bool
use_default
,
bool
on_exec
);
bool
use_default
,
bool
on_exec
);
};
};
#if HAVE_APPARMOR || HAVE_SELINUX
extern
void
lsm_init
(
void
);
extern
void
lsm_init
(
void
);
extern
int
lsm_enabled
(
void
);
extern
int
lsm_enabled
(
void
);
extern
const
char
*
lsm_name
(
void
);
extern
const
char
*
lsm_name
(
void
);
...
@@ -51,43 +50,5 @@ extern int lsm_process_label_set(const char *label, struct lxc_conf *conf,
...
@@ -51,43 +50,5 @@ extern int lsm_process_label_set(const char *label, struct lxc_conf *conf,
extern
int
lsm_process_label_fd_get
(
pid_t
pid
,
bool
on_exec
);
extern
int
lsm_process_label_fd_get
(
pid_t
pid
,
bool
on_exec
);
extern
int
lsm_process_label_set_at
(
int
label_fd
,
const
char
*
label
,
extern
int
lsm_process_label_set_at
(
int
label_fd
,
const
char
*
label
,
bool
on_exec
);
bool
on_exec
);
#else
static
inline
void
lsm_init
(
void
)
{
return
;
}
static
inline
int
lsm_enabled
(
void
)
{
#endif
/* __LXC_LSM_H */
return
0
;
}
static
inline
const
char
*
lsm_name
(
void
)
{
return
"none"
;
}
static
inline
char
*
lsm_process_label_get
(
pid_t
pid
)
{
return
NULL
;
}
static
inline
int
lsm_process_label_set
(
const
char
*
label
,
struct
lxc_conf
*
conf
,
bool
use_default
,
bool
on_exec
)
{
return
0
;
}
static
inline
int
lsm_process_label_fd_get
(
pid_t
pid
,
bool
on_exec
)
{
return
0
;
}
extern
int
lsm_process_label_set_at
(
int
label_fd
,
const
char
*
label
,
bool
on_exec
)
{
return
0
;
}
#endif
#endif
src/lxc/lsm/selinux.c
View file @
1fb5e888
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#include <selinux/selinux.h>
#include <selinux/selinux.h>
#include "log.h"
#include "log.h"
#include "lsm
/lsm
.h"
#include "lsm.h"
#include "conf.h"
#include "conf.h"
#define DEFAULT_LABEL "unconfined_t"
#define DEFAULT_LABEL "unconfined_t"
...
...
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