Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-72 - Correct datatype, add test #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/test_nsncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rc=0
# basic lookups
getent passwd nsncdtest || rc=1
getent group nsncdtest || rc=1

id bug72 | grep 2709991565 || rc=1
# we expect all of these to succeed
for i in $(seq 1 100); do
getent services 65000 || rc=1
Expand Down
2 changes: 2 additions & 0 deletions ci/test_nspawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ sudo sed '$ a netgroup: files' -i /etc/nsswitch.conf
rc=0

sudo useradd nsncdtest
sudo groupadd bug72 --gid 2709991565
sudo useradd bug72 --gid 2709991565
cp /etc/services ./services

# simple service lookups
Expand Down
2 changes: 1 addition & 1 deletion src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ fn serialize_initgroups(groups: Vec<Gid>) -> Result<Vec<u8>> {

result.extend_from_slice(header.as_slice());
for group in groups.iter() {
result.extend_from_slice(&i32::to_ne_bytes(group.as_raw().try_into()?));
result.extend_from_slice(&u32::to_ne_bytes(group.as_raw()));
}

Ok(result)
Expand Down
Loading