Commit Graph

4 Commits

Author SHA1 Message Date
greatroar 2573693ec5 Support os.Mode{Setuid,Setgid,Sticky} in Chmod
Previously, these bits were ignored by Chmod, which sent the numerical
value of the mode argument as-is to the server. As a result, callers had
to supply POSIX values for setuid, setgid and sticky to Chmod.

The new version supports both the POSIX values and the Go values.

Also added a note to the docs to clarify that the umask is not
subtracted from the mode, and why that is. The only portable way to get
the umask is to set it, then reset it, but that's racy. On Linux, we
could parse /proc/self/status, but that doesn't work portably and will
fail where /proc is not available (some Docker containers, notably).
2021-03-12 16:17:56 +01:00
Cassondra Foesch 328101fbc9 go fmt 2020-09-17 09:54:29 +00:00
Fazlul Shahriar b89e2825a4
Replace an one-case switch statement with an if-statement 2020-09-15 18:43:45 -04:00
Fazlul Shahriar 6120cae121
Fix build on Plan 9
All test are passing on Plan 9, and I've also verified
`examples/go-sftp-server` is working.
2020-09-10 18:18:22 -04:00