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
898b34e6
Unverified
Commit
898b34e6
authored
Aug 22, 2018
by
Stéphane Graber
Committed by
GitHub
Aug 22, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2565 from brauner/2018-08-22/more_fixes
remove last pam_cgfs special-casing
parents
95552b1b
9e99997b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
36 deletions
+21
-36
Makefile.am
src/lxc/Makefile.am
+5
-3
conf.h
src/lxc/conf.h
+4
-1
file_utils.c
src/lxc/file_utils.c
+0
-2
initutils.c
src/lxc/initutils.c
+0
-7
initutils.h
src/lxc/initutils.h
+4
-4
string_utils.c
src/lxc/string_utils.c
+7
-3
string_utils.h
src/lxc/string_utils.h
+1
-16
No files found.
src/lxc/Makefile.am
View file @
898b34e6
...
...
@@ -325,6 +325,7 @@ endif
if
ENABLE_COMMANDS
# Binaries shipping with liblxc
init_lxc_SOURCES
=
cmd/lxc_init.c
\
initutils.c initutils.h
\
string_utils.c string_utils.h
lxc_monitord_SOURCES
=
cmd/lxc_monitord.c
lxc_user_nic_SOURCES
=
cmd/lxc_user_nic.c
\
...
...
@@ -389,8 +390,10 @@ if HAVE_PAM
pam_LTLIBRARIES
=
pam_cgfs.la
pam_cgfs_la_SOURCES
=
pam/pam_cgfs.c
\
macro
.h
\
caps.c caps
.h
\
file_utils.c file_utils.h
\
log.c log.h
\
macro.h
\
string_utils.c string_utils.h
if
!HAVE_STRLCAT
...
...
@@ -401,8 +404,7 @@ if !HAVE_STRLCPY
pam_cgfs_la_SOURCES
+=
../include/strlcpy.c ../include/strlcpy.h
endif
pam_cgfs_la_CFLAGS
=
$(AM_CFLAGS)
\
-DNO_LOG
pam_cgfs_la_CFLAGS
=
$(AM_CFLAGS)
-DNO_LXC_CONF
pam_cgfs_la_LIBADD
=
$(AM_LIBS)
\
$(PAM_LIBS)
\
...
...
src/lxc/conf.h
View file @
898b34e6
...
...
@@ -26,14 +26,17 @@
#include "config.h"
#include <stdio.h>
#include <linux/magic.h>
#include <net/if.h>
#include <netinet/in.h>
#include <sys/param.h>
#include <sys/types.h>
#include <stdbool.h>
#include <sys/vfs.h>
#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include <stdbool.h>
#include "list.h"
#include "ringbuf.h"
...
...
src/lxc/file_utils.c
View file @
898b34e6
...
...
@@ -31,9 +31,7 @@
#include "macro.h"
#include "string.h"
#ifndef NO_LOG
lxc_log_define
(
file_utils
,
lxc
);
#endif
int
lxc_write_to_file
(
const
char
*
filename
,
const
void
*
buf
,
size_t
count
,
bool
add_newline
,
mode_t
mode
)
...
...
src/lxc/initutils.c
View file @
898b34e6
...
...
@@ -217,13 +217,6 @@ out:
return
values
[
i
];
}
extern
void
remove_trailing_slashes
(
char
*
p
)
{
int
l
=
strlen
(
p
);
while
(
--
l
>=
0
&&
(
p
[
l
]
==
'/'
||
p
[
l
]
==
'\n'
))
p
[
l
]
=
'\0'
;
}
/*
* Sets the process title to the specified title. Note that this may fail if
* the kernel doesn't support PR_SET_MM_MAP (kernels <3.18).
...
...
src/lxc/initutils.h
View file @
898b34e6
...
...
@@ -24,6 +24,8 @@
#ifndef __LXC_INITUTILS_H
#define __LXC_INITUTILS_H
#include "config.h"
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
...
...
@@ -31,12 +33,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "
config
.h"
#include "
string_utils
.h"
#define DEFAULT_VG "lxc"
#define DEFAULT_THIN_POOL "lxc"
...
...
@@ -70,8 +72,6 @@ struct prctl_mm_map {
extern
const
char
*
lxc_global_config_value
(
const
char
*
option_name
);
/* open a file with O_CLOEXEC */
extern
void
remove_trailing_slashes
(
char
*
p
);
extern
int
setproctitle
(
char
*
title
);
#endif
/* __LXC_INITUTILS_H */
src/lxc/string_utils.c
View file @
898b34e6
...
...
@@ -46,7 +46,6 @@
#include "namespace.h"
#include "parse.h"
#include "string_utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#include "include/strlcpy.h"
...
...
@@ -56,9 +55,7 @@
#include "include/strlcat.h"
#endif
#ifndef NO_LOG
lxc_log_define
(
string_utils
,
lxc
);
#endif
char
**
lxc_va_arg_list_to_argv
(
va_list
ap
,
size_t
skip
,
int
do_strdup
)
{
...
...
@@ -981,3 +978,10 @@ int lxc_is_line_empty(const char *line)
return
0
;
return
1
;
}
void
remove_trailing_slashes
(
char
*
p
)
{
int
l
=
strlen
(
p
);
while
(
--
l
>=
0
&&
(
p
[
l
]
==
'/'
||
p
[
l
]
==
'\n'
))
p
[
l
]
=
'\0'
;
}
src/lxc/string_utils.h
View file @
898b34e6
...
...
@@ -22,22 +22,6 @@
#include "config.h"
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include <linux/loop.h>
#include <linux/magic.h>
#include <linux/types.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/vfs.h>
#ifdef HAVE_LINUX_MEMFD_H
#include <linux/memfd.h>
#endif
#include "initutils.h"
#include "macro.h"
...
...
@@ -127,5 +111,6 @@ extern int lxc_char_right_gc(const char *buffer, size_t len);
extern
char
*
lxc_trim_whitespace_in_place
(
char
*
buffer
);
extern
int
lxc_is_line_empty
(
const
char
*
line
);
extern
void
remove_trailing_slashes
(
char
*
p
);
#endif
/* __LXC_STRING_UTILS_H */
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