Skip to content

Commit

Permalink
Merge branch 'custom-cli' into 'main'
Browse files Browse the repository at this point in the history
Also change directory when not running pivot root

See merge request nvidia/container-toolkit/libnvidia-container!175
  • Loading branch information
Evan Lezar committed Jul 26, 2022
2 parents 78ae451 + fd323cb commit ab4ac25
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/deb/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
libnvidia-container (1.11.0~rc.2-1) experimental; urgency=medium

* Dummy entry
* Ensure that no-pivot-root option also updates LDCache

-- NVIDIA CORPORATION <cudatools@nvidia.com> Tue, 26 Jul 2022 14:59:03 +0200

Expand Down
2 changes: 1 addition & 1 deletion pkg/rpm/SPECS/libnvidia-container.spec
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This package contains command-line tools that facilitate using the library.

%changelog
* Tue Jul 26 2022 NVIDIA CORPORATION <cudatools@nvidia.com> 1.11.0-0.1.rc.2
- Dummy entry
- Ensure that no-pivot-root option also updates LDCache

* Wed Jul 13 2022 NVIDIA CORPORATION <cudatools@nvidia.com> 1.11.0-0.1.rc.1
- Dummy entry
Expand Down
8 changes: 8 additions & 0 deletions src/nvc_ldcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ change_rootfs(struct error *err, const char *rootfs, bool no_pivot, bool mount_p
if (xmount(err, rootfs, "/", NULL, MS_MOVE, NULL) < 0) {
goto fail;
}
if ((newroot = xopen(err, rootfs, O_PATH|O_DIRECTORY)) < 0) {
log_errf("failed calling xopen %s", rootfs);
goto fail;
}
if (fchdir(newroot) < 0) {
log_errf("failed calling fchdir %s", newroot);
goto fail;
}
} else {
if ((oldroot = xopen(err, "/", O_PATH|O_DIRECTORY)) < 0)
goto fail;
Expand Down

0 comments on commit ab4ac25

Please sign in to comment.