-
Notifications
You must be signed in to change notification settings - Fork 950
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
feature: adjust pouchd unix socket premissions #1561
Conversation
apis/server/server.go
Outdated
if err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) { | ||
return nil, err | ||
} | ||
mask := syscall.Umask(0777) |
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.
Could we use oldMask
to make it clear?
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.
Why it need to named oldMask
?
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.
apis/server/server.go
Outdated
if err != nil { | ||
// ignore error when group pouch not exist, group pouch should to be | ||
// created before pouchd started, it means code not create pouch group | ||
logrus.Warnf("failed to found group pouch") |
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.
s/found/find
adjust pouchd unix socket file mode, make it ownered by group pouch. Signed-off-by: Ace-Tang <aceapril@126.com>
Codecov Report
@@ Coverage Diff @@
## master #1561 +/- ##
===========================================
+ Coverage 17.89% 41.61% +23.72%
===========================================
Files 223 267 +44
Lines 14711 17362 +2651
===========================================
+ Hits 2633 7226 +4593
+ Misses 11906 9246 -2660
- Partials 172 890 +718
|
LGTM Next action: separate |
Oh, do you want to help this, @fuweid |
adjust pouchd unix socket file mode, make it ownered by group
pouch.
Ⅰ. Describe what this PR did
Before this patch, we can only use pouch with user root, with this patch, we add this permission to group pouch. We create a unix sock with pouch group, and change it mode to 0660, make other group can write
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews