Skip to content

Replace getlogin() with getenv("USER")#582

Merged
sahlberg merged 1 commit intosahlberg:masterfrom
nilcons-contrib:master
Mar 18, 2026
Merged

Replace getlogin() with getenv("USER")#582
sahlberg merged 1 commit intosahlberg:masterfrom
nilcons-contrib:master

Conversation

@errge
Copy link
Copy Markdown
Contributor

@errge errge commented Mar 18, 2026

getlogin() fails with NULL in containerized environments, where utmp doesn't exist. This results in a segfault down the line.

getlogin() fails with NULL in containerized environments, where utmp
doesn't exist.  This results in a segfault down the line.
@sahlberg sahlberg merged commit 22bbe67 into sahlberg:master Mar 18, 2026
6 of 10 checks passed
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