-
Notifications
You must be signed in to change notification settings - Fork 122
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
Avoid creating executable files #865
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ramikg ! We are really thankful for your initiative! If you would like to implement boy scout rule and address some of my comments it would be really great. Thanks!
Thank you. I've addressed all comments except for one, which I've commented on. |
Thanks a lot! I answered your concern, I hope that I can convince you. |
@ramikg thank you very much for you input! Your help is appreciated :) Unfortunately, our policy does not allow direct merges from community, but I marked you as |
Description
This PR removes all executable bits in calls to
os.OpenFile()
oros.WriteFile()
.Previously, the file mode passed to these functions was
os.ModePerm
(which is equal to 0777, i.e. read/write/execute for everyone), which may have undesirable consequences.This value is sometimes used by Go programmers because it is conveniently exported in the
os
package, but it's intended usage is as a bitmask, and not as a file mode.I've changed this value to 0666 (i.e. removed the executable bits), like the one used by Go's
os.Create()
.Checklist
make fmt
to fix inconsistent formatsmake lint
to get lint errors and fix all of them