Skip to content

Callbacks#1

Open
silverdaz wants to merge 2 commits into
masterfrom
callbacks
Open

Callbacks#1
silverdaz wants to merge 2 commits into
masterfrom
callbacks

Conversation

@silverdaz
Copy link
Copy Markdown
Collaborator

We replace the code defining functions with local context passed as argument (ie functional programming), to explicit callbacks.
GCC needed to create crazy stack jumps, which didn't feel that clean.
Not sure other compilers even allow it.
=> we use callbacks.

In this PR, we also include relocating the NSS config file.
call make NSS_CFGFILE="/etc/other/location/blabla.conf"

Finally, we add a PAM setting to swap the main group of a given user.

@silverdaz silverdaz self-assigned this May 6, 2026
@silverdaz silverdaz requested review from omllobet and sdelatorrep May 6, 2026 09:05
@silverdaz silverdaz mentioned this pull request May 7, 2026
7 tasks
@silverdaz
Copy link
Copy Markdown
Collaborator Author

It would be also correct to change "NSS" into "NSS/PAM" in the repo description. I don't have the rights to update it.

Copy link
Copy Markdown
Member

@omllobet omllobet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Just some little formatting

Comment thread src/pam_acct.c
struct group *g = getgrnam(*argv+11);
if(g == NULL){
D1("unknown supplementary group: %s", *argv+11);
continue;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation looks weird

Comment thread src/pam_acct.c
Comment on lines +66 to +67
D1("unknown supplementary group: %s", *argv+9);
//continue;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation looks weird

@silverdaz
Copy link
Copy Markdown
Collaborator Author

Ready to merge then, or waiting for Sabela's review too ?

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