Skip to content

Commit

Permalink
Merge branch 'fix-app-profiles' into 'main'
Browse files Browse the repository at this point in the history
Fix bug in checking file existence

See merge request nvidia/container-toolkit/libnvidia-container!189
  • Loading branch information
Evan Lezar committed Jan 25, 2023
2 parents ad68344 + 733ac8d commit 7aa2c9b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions pkg/deb/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
libnvidia-container (1.12.0~rc.4-1) experimental; urgency=medium

* Fix bug when checking whether files exist on file creation from 1.12.0-rc.2

-- NVIDIA CORPORATION <[email protected]> Wed, 18 Jan 2023 16:50:59 +0100

libnvidia-container (1.12.0~rc.3-1) experimental; urgency=medium

* Bump version to 1.12.0-rc.3
Expand Down
3 changes: 3 additions & 0 deletions pkg/rpm/SPECS/libnvidia-container.spec
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ This package contains command-line tools that facilitate using the library.
%{_bindir}/*

%changelog
* Wed Jan 18 2023 NVIDIA CORPORATION <[email protected]> 1.12.0-0.1.rc.4
- Fix bug when checking whether files exist on file creation from 1.12.0-rc.2

* Fri Dec 09 2022 NVIDIA CORPORATION <[email protected]> 1.12.0-0.1.rc.3
- Bump version to 1.12.0-rc.3

Expand Down
4 changes: 2 additions & 2 deletions src/nvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ extern "C" {
// For stable releases, this should be defined as empty.
// For release candidates, this should be defined with the format "rc.1"
// The version string should also be updated accordingly, using a ~ separator where applicable.
#define NVC_TAG "rc.3"
#define NVC_VERSION "1.12.0~rc.3"
#define NVC_TAG "rc.4"
#define NVC_VERSION "1.12.0~rc.4"

#define NVC_ARG_MAX 256

Expand Down
2 changes: 1 addition & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ file_create(struct error *err, const char *path, const char *data, uid_t uid, gi
int rv = -1;

// We check whether the file already exists with the required mode and skip the creation.
if (file_mode(err, path, &perm) == 0) {
if (data == NULL && file_mode(err, path, &perm) == 0) {
if (perm == mode) {
log_errf("The path %s alreay exists with the required mode; skipping create", path);
return (0);
Expand Down

0 comments on commit 7aa2c9b

Please sign in to comment.