Skip to content

Merge upstream branch 'main' - #62

Open
github-actions[bot] wants to merge 20 commits into
Container-On-Android:mainfrom
lxc:main
Open

github-actions[bot] wants to merge 20 commits into
Container-On-Android:mainfrom
lxc:main

Conversation

@github-actions

Copy link
Copy Markdown

Merge branch 'lxc:main' into main

emirbuljubasic and others added 20 commits May 29, 2026 18:59
Signed-off-by: Emir Buljubasic <emirbuljubasic329@gmail.com>
… v1 removal

Remove or rewrite descriptions that assumed cgroup v1 support,
following its removal in LXC 7.0.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
doc: update cgroup section of lxc.container.conf(5) to reflect cgroup v1 removal
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…heckout-7

build(deps): bump actions/checkout from 6 to 7
glibc 2.43 implements strchr(3), strrchr(3) and strstr(3) as
C23-style _Generic macros which propagate the const qualifier
of the input string to the return type.

For example, a 'const char *' input now produces 'const char *'
output types and vice-versa (non-const -> non-const).

Building with clang and -Werror=incompatible-pointer-types fails:

  src/lxc/confile.c:2690:4: error: assigning to 'char *' from
      'const char *' discards qualifiers
      [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Constify the result pointers where they are only read. Where the
code intentionally writes through the result into caller-owned
writable storage, drop the bogus const from the parameter instead
of casting it away: update_hwaddr() (and thus its caller
append_unexp_config_line()) modify the string in-place via
rand_complete_hwaddr(), so 'char *' is the honest type. The two
call sites already pass writable buffers (a strdup()'d line and an
internally built one), so no cast is needed.

The one remaining cast is in cgroup1-only pam_cgfs code
(cgv1_handle_cpuset_hierarchy) where the writable buffer is passed
down through a const 'cgroup' parameter; that hierarchy is slated
for removal, so the minimal cast is kept there.

This is just a build fix, the runtime behavior is unchanged.

Fixes: #4710
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
tree-wide: fix const-correctness issues exposed by glibc 2.43
lxc/criu: restore cgroup limits and freezer on restore
Signed-off-by: Kartik Kenchi <netliomax25@gmail.com>
…em-validate

commands: validate string in lxc_cmd_get_config_item_callback
Signed-off-by: Kartik Kenchi <netliomax25@gmail.com>
…atalen

commands: validate datalen in lxc_cmd_console_log_callback
If the init process is not run as root, then all capabilities will be
dropped.

This adds an option to let the container inherit the requested
capabilities when the init process is not root:

lxc.cap.inheritance=1

Signed-off-by: Jef Steelant <jef.steelant_ext@softathome.com>
Signed-off-by: Jef Steelant <jef.steelant_ext@softathome.com>
keep capabilities if init process is not run as root
Signed-off-by: Kemal Oktay <iletisim@oktayaktogan.com.tr>
Added MTU option to lxc-net
lxc-copy without -K updates the hostname in the container.  It does
this by opening /etc/hostname in the container and writing the new
hostname to it.  If /etc/hostname is a symbolic link, we can end up
ovewriting a host path.

lxc-copy is not setuid-root, so unprivileged users can't exploit this
without help.  More likely would be unprivileged users shooting
themselves in the foot and accidentally changing the hostname of the
original container.

Fix it by using openat2(RESOLVE_IN_ROOT) to make sure that if
/etc or /etc/hostname is a symlink, it is resolved inside the
container's fs.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Reported-by: 怀硕 <shuohuai@mail.nankai.edu.cn>
The hostname update code switched from fopen() to openat2()
and fdopen(), but fdopen() does not truncate an existing file.

Add O_TRUNC to preserve the previous fopen() behavior and avoid
leaving stale bytes after updating the hostname.

Signed-off-by: Shuo Huai <shuohuai@mail.nankai.edu.cn>
Fix symlink handling in lxc-copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants