Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@disconnect3d
Copy link
Contributor

@disconnect3d disconnect3d commented Aug 23, 2021

Fixes the fs::set_permissions(&busybox_jail_path, fs::Permissions::from_mode(755))?; line so it sets proper permissions as it seems the 755 (decimal) was intended to be 0o755 (octal).

The difference in between the two can be seen below:

In [15]: os.chmod('x', 755)

In [16]: !ls -la x
--wxrw--wt  1 dc  staff  0 Aug 23 19:52 x

In [17]: os.chmod('x', 0o755)

In [18]: !ls -la x
-rwxr-xr-x  1 dc  staff  0 Aug 23 19:52 x

FWIW clippy should also be able to detect this.

Found thx to https://grep.app/search?q=from_mode%5C%28%5B0-9%5D%7B3%7D&regexp=true

Fixes the `fs::set_permissions(&busybox_jail_path, fs::Permissions::from_mode(755))?;` line so it sets proper permissions as it seems the 755 (decimal) was intended to be 0o755 (octal).

The difference in between the two can be seen below:
```
In [16]: !ls -la x
--wxrw--wt  1 dc  staff  0 Aug 23 19:52 x

In [17]: os.chmod('x', 0o755)

In [18]: !ls -la x
-rwxr-xr-x  1 dc  staff  0 Aug 23 19:52 x
```

FWIW clippy should also be able to detect this.

Found thx to https://grep.app/search?q=from_mode%5C%28%5B0-9%5D%7B3%7D&regexp=true
@disconnect3d disconnect3d changed the title Fix busybox_jail_path permissions Fix busybox_jail_path file permissions Aug 23, 2021
@coord-e
Copy link
Owner

coord-e commented Feb 2, 2022

thanks!

@coord-e coord-e merged commit 25b5b82 into coord-e:develop Feb 2, 2022
coord-e added a commit that referenced this pull request Mar 5, 2022
Bug fixes and dependency updates.

Changelog for v1.3.0:

- Fix busybox_jail_path file permissions ([#6](#6))
- Update and renew dependencies ([#7](#7))
- Fix usage of ExitStatus::from_raw and remove Error::DynamicSignaled ([#9](#9))
- Several CI fixes ([#8](#8), [#10](#10))
  - This changed how `busybox` installed in the container images
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.

2 participants