"ERROR: kinit not found" when kinit is a symlink
- Dominant language
- Go
- Stars
- 133
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
`check_file_permissions` fails when kinit is a symlink due to the use of lstat instead of stat here: https://github.com/aws/credentials-fetcher/blob/182c04bb7f937dd9c02c46919563141a3def88d6/common/util.hpp#L23-L31
testing v.1.3.8 on Ubuntu 24.04:
```
Credentials-fetcher daemon has started running
on request failures check logs located at /var/credentials-fetcher/logging
krb_files_dir = /var/credentials-fetcher/krbdir
cred_file = /var/credentials-fetcher/credspec.json (lease id: credspec)
logging_dir = /var/credentials-fetcher/logging
unix_socket_dir = /var/credentials-fetcher/socket
2026-01-26 06:14:40 ERROR: kinit not found
```
on Ubuntu 24.04 `/usr/bin/kinit` -> `/etc/alternatives/kinit` -> `/usr/bin/kinit.mit`
the service is running after replacing the symlink with a copy as a workaround
Contributor guide
Research direction
Start in common/util.hpp at lines 23-31, where check_file_permissions is linked from the issue, and reproduce the check with the Ubuntu 24.04 /usr/bin/kinit symlink chain. Done means the credentials-fetcher daemon recognizes the symlinked kinit and no longer reports “kinit not found”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100