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

General hardening #7764

Closed
wants to merge 2 commits into from
Closed
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 Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4045,7 +4045,7 @@ intgcheck-prepare:
--with-files-provider \
--with-session-recording-shell=/bin/false \
$(INTGCHECK_CONFIGURE_FLAGS) \
CFLAGS="-O2 -g $$CFLAGS"; \
CFLAGS="-O2 -g $$CFLAGS -DINTGCHECK_BUILD"; \
$(MAKE) $(AM_MAKEFLAGS) ; \
$(MAKE) $(AM_MAKEFLAGS) test_ssh_client; \
: Force single-thread install to workaround concurrency issues; \
Expand Down
12 changes: 12 additions & 0 deletions src/responder/pam/pamsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,18 @@ int main(int argc, const char *argv[])

umask(DFL_RSP_UMASK);

#ifndef INTGCHECK_BUILD
/* This is to clear dangerous variables like 'LDB_MODULES_PATH'
* from environment of privileged responder. It's easier to
* clear everything since 'sssd_pam' shouldn't rely on any.
*/
ret = clearenv();
if (ret != 0) {
fprintf(stderr, "Failed to clear env.\n");
return 1;
}
#endif /* 'intgcheck' relies on 'LDB_MODULES_PATH' to setup a test env */

pc = poptGetContext(argv[0], argc, argv, long_options, 0);
while((opt = poptGetNextOpt(pc)) != -1) {
switch(opt) {
Expand Down
Loading