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

Improve is_file and posix_searchpath #421

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

apocelipes
Copy link
Contributor

  • On unix-like systems, use stat to check if the path is a file, this is more clear and faster than using fopen
  • use is_file instead of access, which is more portable and can give us correct results under a setuid/setgid program (access only uses the real UID and real GID sometime can run into problems)

- use stat to check if the path is a file, this is more clear and
  faster than using fopen
- use is_file instead of access, which is more portable and can
  give us correct results under a setuid/setgid program (access only
  use the real UID and real GID)
@dtschump dtschump merged commit 41b823b into GreycLab:master Jun 8, 2024
2 checks passed
dtschump added a commit that referenced this pull request Jun 8, 2024
@dtschump
Copy link
Collaborator

dtschump commented Jun 8, 2024

Thanks for the contribution.
If possible, next time, could you please do the PR for the 'develop' branch instead?

@apocelipes
Copy link
Contributor Author

If possible, next time, could you please do the PR for the 'develop' branch instead?

OK. I got it.

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