Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Apply chmod on UNIX socket after creation #110
Overall, I'm thinking nothing needs to change here except to remove the setting of permissions and let the downstream clients adjust the permissions if needed. Would that be sufficient?
I'm not sure about complete removal of chmod recognizing that most of (or all?) other HTTP servers allow bypassing the config with these access privileges while having other sufficient default. Also, I'm not sure about what side-effects this removal may cause.
@@ Coverage Diff @@ ## master #110 +/- ## ========================================== - Coverage 70.28% 69.68% -0.61% ========================================== Files 20 20 Lines 3184 3219 +35 ========================================== + Hits 2238 2243 +5 - Misses 946 976 +30
I like the direction you've gone with this. @webknjaz has done a good job of factoring out functions for the separate aspects, so kudos for that.
This behavior now encapsulates enough functionality, I'm tempted to think that we should generalize this concept to a
SocketBuilder interface, something that clearly encapsulates the different behaviors of
Maybe that would be worthwhile, but doesn't need to happen with this PR.
I do feel a little uneasy adding all of these changes just to set permissions after the socket is created.