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
8de0119d
Unverified
Commit
8de0119d
authored
Jun 14, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree-wide: replace problematic terminology
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
f48e8071
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
18 deletions
+18
-18
lxc-complex.conf.in
doc/examples/lxc-complex.conf.in
+1
-1
lxc.container.conf.sgml.in
doc/ja/lxc.container.conf.sgml.in
+1
-1
lxc.container.conf.sgml.in
doc/ko/lxc.container.conf.sgml.in
+1
-1
lxc.container.conf.sgml.in
doc/lxc.container.conf.sgml.in
+1
-1
attach.c
src/lxc/attach.c
+2
-2
cgroup2_devices.c
src/lxc/cgroups/cgroup2_devices.c
+2
-2
conf.c
src/lxc/conf.c
+5
-5
start.c
src/lxc/start.c
+3
-3
lxc_ls.c
src/lxc/tools/lxc_ls.c
+1
-1
lxc-test-unpriv
src/tests/lxc-test-unpriv
+1
-1
No files found.
doc/examples/lxc-complex.conf.in
View file @
8de0119d
...
@@ -17,7 +17,7 @@ lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
...
@@ -17,7 +17,7 @@ lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.0.type = phys
lxc.net.0.type = phys
lxc.net.0.flags = up
lxc.net.0.flags = up
lxc.net.0.link =
dummy
0
lxc.net.0.link =
random
0
lxc.net.0.hwaddr = 4a:49:43:49:79:ff
lxc.net.0.hwaddr = 4a:49:43:49:79:ff
lxc.net.0.ipv4.address = 10.2.3.6/24
lxc.net.0.ipv4.address = 10.2.3.6/24
lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
doc/ja/lxc.container.conf.sgml.in
View file @
8de0119d
...
@@ -3844,7 +3844,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
...
@@ -3844,7 +3844,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.2.type = phys
lxc.net.2.type = phys
lxc.net.2.flags = up
lxc.net.2.flags = up
lxc.net.2.link =
dummy
0
lxc.net.2.link =
random
0
lxc.net.2.hwaddr = 4a:49:43:49:79:ff
lxc.net.2.hwaddr = 4a:49:43:49:79:ff
lxc.net.2.ipv4.address = 10.2.3.6/24
lxc.net.2.ipv4.address = 10.2.3.6/24
lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
...
...
doc/ko/lxc.container.conf.sgml.in
View file @
8de0119d
...
@@ -2613,7 +2613,7 @@ mknod errno 0
...
@@ -2613,7 +2613,7 @@ mknod errno 0
lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.2.type = phys
lxc.net.2.type = phys
lxc.net.2.flags = up
lxc.net.2.flags = up
lxc.net.2.link =
dummy
0
lxc.net.2.link =
random
0
lxc.net.2.hwaddr = 4a:49:43:49:79:ff
lxc.net.2.hwaddr = 4a:49:43:49:79:ff
lxc.net.2.ipv4.address = 10.2.3.6/24
lxc.net.2.ipv4.address = 10.2.3.6/24
lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
...
...
doc/lxc.container.conf.sgml.in
View file @
8de0119d
...
@@ -3100,7 +3100,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -3100,7 +3100,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
lxc.net.2.type = phys
lxc.net.2.type = phys
lxc.net.2.flags = up
lxc.net.2.flags = up
lxc.net.2.link =
dummy
0
lxc.net.2.link =
random
0
lxc.net.2.hwaddr = 4a:49:43:49:79:ff
lxc.net.2.hwaddr = 4a:49:43:49:79:ff
lxc.net.2.ipv4.address = 10.2.3.6/24
lxc.net.2.ipv4.address = 10.2.3.6/24
lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
...
...
src/lxc/attach.c
View file @
8de0119d
...
@@ -997,7 +997,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
...
@@ -997,7 +997,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
if
(
!
token
)
if
(
!
token
)
continue
;
continue
;
/* next:
dummy
password field */
/* next:
placeholder
password field */
token
=
strtok_r
(
NULL
,
":"
,
&
saveptr
);
token
=
strtok_r
(
NULL
,
":"
,
&
saveptr
);
if
(
!
token
)
if
(
!
token
)
continue
;
continue
;
...
@@ -1009,7 +1009,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
...
@@ -1009,7 +1009,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
value
==
LONG_MAX
)
value
==
LONG_MAX
)
continue
;
continue
;
/*
dummy sanity
check: user id matches */
/*
placeholder conherence
check: user id matches */
if
((
uid_t
)
value
!=
uid
)
if
((
uid_t
)
value
!=
uid
)
continue
;
continue
;
...
...
src/lxc/cgroups/cgroup2_devices.c
View file @
8de0119d
...
@@ -528,7 +528,7 @@ int bpf_list_add_device(struct bpf_devices *bpf_devices,
...
@@ -528,7 +528,7 @@ int bpf_list_add_device(struct bpf_devices *bpf_devices,
bool
bpf_devices_cgroup_supported
(
void
)
bool
bpf_devices_cgroup_supported
(
void
)
{
{
__do_bpf_program_free
struct
bpf_program
*
prog
=
NULL
;
__do_bpf_program_free
struct
bpf_program
*
prog
=
NULL
;
const
struct
bpf_insn
dummy
[]
=
{
const
struct
bpf_insn
insn
[]
=
{
BPF_MOV64_IMM
(
BPF_REG_0
,
1
),
BPF_MOV64_IMM
(
BPF_REG_0
,
1
),
BPF_EXIT_INSN
(),
BPF_EXIT_INSN
(),
};
};
...
@@ -546,7 +546,7 @@ bool bpf_devices_cgroup_supported(void)
...
@@ -546,7 +546,7 @@ bool bpf_devices_cgroup_supported(void)
if
(
ret
)
if
(
ret
)
return
log_error_errno
(
false
,
ENOMEM
,
"Failed to initialize bpf program"
);
return
log_error_errno
(
false
,
ENOMEM
,
"Failed to initialize bpf program"
);
ret
=
bpf_program_add_instructions
(
prog
,
dummy
,
ARRAY_SIZE
(
dummy
));
ret
=
bpf_program_add_instructions
(
prog
,
insn
,
ARRAY_SIZE
(
insn
));
if
(
ret
<
0
)
if
(
ret
<
0
)
return
log_trace
(
false
,
"Failed to add new instructions to bpf device cgroup program"
);
return
log_trace
(
false
,
"Failed to add new instructions to bpf device cgroup program"
);
...
...
src/lxc/conf.c
View file @
8de0119d
...
@@ -1722,11 +1722,11 @@ static int lxc_setup_devpts_child(struct lxc_handler *handler)
...
@@ -1722,11 +1722,11 @@ static int lxc_setup_devpts_child(struct lxc_handler *handler)
DEBUG
(
"Removed existing
\"
/dev/ptmx
\"
file"
);
DEBUG
(
"Removed existing
\"
/dev/ptmx
\"
file"
);
}
}
/* Create
dummy
/dev/ptmx file as bind mountpoint for /dev/pts/ptmx. */
/* Create
placeholder
/dev/ptmx file as bind mountpoint for /dev/pts/ptmx. */
ret
=
mknodat
(
rootfs
->
dfd_dev
,
"ptmx"
,
S_IFREG
|
0000
,
0
);
ret
=
mknodat
(
rootfs
->
dfd_dev
,
"ptmx"
,
S_IFREG
|
0000
,
0
);
if
(
ret
<
0
&&
errno
!=
EEXIST
)
if
(
ret
<
0
&&
errno
!=
EEXIST
)
return
log_error_errno
(
-
1
,
errno
,
"Failed to create
dummy
\"
/dev/ptmx
\"
file as bind mount target"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to create
\"
/dev/ptmx
\"
file as bind mount target"
);
DEBUG
(
"Created
dummy
\"
/dev/ptmx
\"
file as bind mount target"
);
DEBUG
(
"Created
\"
/dev/ptmx
\"
file as bind mount target"
);
/* Fallback option: create symlink /dev/ptmx -> /dev/pts/ptmx */
/* Fallback option: create symlink /dev/ptmx -> /dev/pts/ptmx */
ret
=
mount
(
"/dev/pts/ptmx"
,
"/dev/ptmx"
,
NULL
,
MS_BIND
,
NULL
);
ret
=
mount
(
"/dev/pts/ptmx"
,
"/dev/ptmx"
,
NULL
,
MS_BIND
,
NULL
);
...
@@ -1736,7 +1736,7 @@ static int lxc_setup_devpts_child(struct lxc_handler *handler)
...
@@ -1736,7 +1736,7 @@ static int lxc_setup_devpts_child(struct lxc_handler *handler)
/* Fallthrough and try to create a symlink. */
/* Fallthrough and try to create a symlink. */
ERROR
(
"Failed to bind mount
\"
/dev/pts/ptmx
\"
to
\"
/dev/ptmx
\"
"
);
ERROR
(
"Failed to bind mount
\"
/dev/pts/ptmx
\"
to
\"
/dev/ptmx
\"
"
);
/* Remove the
dummy
/dev/ptmx file we created above. */
/* Remove the
placeholder
/dev/ptmx file we created above. */
ret
=
unlinkat
(
rootfs
->
dfd_dev
,
"ptmx"
,
0
);
ret
=
unlinkat
(
rootfs
->
dfd_dev
,
"ptmx"
,
0
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
log_error_errno
(
-
1
,
errno
,
"Failed to remove existing
\"
/dev/ptmx
\"
"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to remove existing
\"
/dev/ptmx
\"
"
);
...
@@ -3761,7 +3761,7 @@ static int lxc_execute_bind_init(struct lxc_handler *handler)
...
@@ -3761,7 +3761,7 @@ static int lxc_execute_bind_init(struct lxc_handler *handler)
if
(
!
file_exists
(
destpath
))
{
if
(
!
file_exists
(
destpath
))
{
ret
=
mknod
(
destpath
,
S_IFREG
|
0000
,
0
);
ret
=
mknod
(
destpath
,
S_IFREG
|
0000
,
0
);
if
(
ret
<
0
&&
errno
!=
EEXIST
)
if
(
ret
<
0
&&
errno
!=
EEXIST
)
return
log_error_errno
(
-
1
,
errno
,
"Failed to create
dummy
\"
%s
\"
file as bind mount target"
,
destpath
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to create
\"
%s
\"
file as bind mount target"
,
destpath
);
}
}
ret
=
safe_mount
(
path
,
destpath
,
"none"
,
MS_BIND
,
NULL
,
conf
->
rootfs
.
mount
);
ret
=
safe_mount
(
path
,
destpath
,
"none"
,
MS_BIND
,
NULL
,
conf
->
rootfs
.
mount
);
...
...
src/lxc/start.c
View file @
8de0119d
...
@@ -1537,9 +1537,9 @@ int resolve_clone_flags(struct lxc_handler *handler)
...
@@ -1537,9 +1537,9 @@ int resolve_clone_flags(struct lxc_handler *handler)
* newer glibc versions where the getpid() cache is removed and the pid/tid is
* newer glibc versions where the getpid() cache is removed and the pid/tid is
* not reset anymore.
* not reset anymore.
* However, if for whatever reason you - dear committer - somehow need to get the
* However, if for whatever reason you - dear committer - somehow need to get the
* pid of the
dummy intermediate process for do_share_ns() you need to call
* pid of the
placeholder intermediate process for do_share_ns() you need to
*
lxc_raw_getpid(). The next lxc_raw_clone() call does not employ CLONE_VM and
*
call lxc_raw_getpid(). The next lxc_raw_clone() call does not employ
* will be fine.
*
CLONE_VM and
will be fine.
*/
*/
static
inline
int
do_share_ns
(
void
*
arg
)
static
inline
int
do_share_ns
(
void
*
arg
)
{
{
...
...
src/lxc/tools/lxc_ls.c
View file @
8de0119d
...
@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
...
@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
/*
/*
* The lxc parser requires that my_args.name is set. So let's satisfy
* The lxc parser requires that my_args.name is set. So let's satisfy
* that condition by setting a
dummy
name which is never used.
* that condition by setting a
placeholder
name which is never used.
*/
*/
my_args
.
name
=
""
;
my_args
.
name
=
""
;
if
(
lxc_arguments_parse
(
&
my_args
,
argc
,
argv
))
if
(
lxc_arguments_parse
(
&
my_args
,
argc
,
argv
))
...
...
src/tests/lxc-test-unpriv
View file @
8de0119d
...
@@ -42,7 +42,7 @@ if modprobe -q overlayfs; then
...
@@ -42,7 +42,7 @@ if modprobe -q overlayfs; then
mkdir
${
MOUNTDIR
}
/
{
lowerdir,upperdir,workdir,overlayfs
}
mkdir
${
MOUNTDIR
}
/
{
lowerdir,upperdir,workdir,overlayfs
}
mount
-t
overlayfs
-o
lowerdir
=
"
${
MOUNTDIR
}
/lowerdir"
,upperdir
=
"
${
MOUNTDIR
}
/upperdir"
,workdir
=
"
${
MOUNTDIR
}
/workdir"
none
"
${
MOUNTDIR
}
/overlayfs"
mount
-t
overlayfs
-o
lowerdir
=
"
${
MOUNTDIR
}
/lowerdir"
,upperdir
=
"
${
MOUNTDIR
}
/upperdir"
,workdir
=
"
${
MOUNTDIR
}
/workdir"
none
"
${
MOUNTDIR
}
/overlayfs"
CORRECT_LINK_TARGET
=
"
${
MOUNTDIR
}
/overlayfs/
dummy
_file"
CORRECT_LINK_TARGET
=
"
${
MOUNTDIR
}
/overlayfs/
placeholder
_file"
exec
9>
"
${
CORRECT_LINK_TARGET
}
"
exec
9>
"
${
CORRECT_LINK_TARGET
}
"
DETECTED_LINK_TARGET
=
$(
readlink
-q
/proc/
$$
/fd/9
)
DETECTED_LINK_TARGET
=
$(
readlink
-q
/proc/
$$
/fd/9
)
...
...
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