-
Notifications
You must be signed in to change notification settings - Fork 14
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
Release 1.2.1 #32
Release 1.2.1 #32
Conversation
71f4120
to
4737815
Compare
OK, finally got the failing test working: https://github.com/twosigma/nsncd/runs/3833571070 I originally tried to be lazy and add it to /etc/group, but reliably detecting "did nsncd crash" ended up being hard (I think we were racing the nsncd process in the middle of crashing, or something?). So I instead just went with extending our existing whatami module to dynamically create |
|
||
enum nss_status | ||
_nss_whatami_getpwnam_r(const char *name, struct passwd *result, char *buffer, size_t buflen, int *errnop) | ||
{ | ||
if (strcmp(name, "whatami") == 0) { | ||
if (strcmp(name, "whatami") == 0 || strncmp(name, "am_i_", 5) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we're accepting more names, should we set result->pw_name = name
? it probably doesn't matter for this test but maybe we won't regret it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have...questions...about the implementation of _nss_whatami_initgroups_dyn
, but also, if the test works it works and maybe that's okay.
Let me know if you'd like me to comment all over that function, or just merge.
I'm going to merge (and do an internal release) because both of these are comments on the test code, but definitely happy to accept comments on the test code. I am not sure I have a lot of answers for questions though :) |
Bump nix dependency to 0.21.2 to pick up fix for nix-rust/nix#1541 aka RUSTSEC-2021-0119, memory corruption when using initgroups on a user in more than 16 groups
Also add an integration regression test.