add support for sticky bit on directories
parent
5e958a41f6
commit
a4cd154343
|
@ -919,6 +919,12 @@ func convertAttributes(
|
||||||
if in.Mode&os.ModeSetuid != 0 {
|
if in.Mode&os.ModeSetuid != 0 {
|
||||||
out.Mode |= syscall.S_ISUID
|
out.Mode |= syscall.S_ISUID
|
||||||
}
|
}
|
||||||
|
if in.Mode&os.ModeSetgid != 0 {
|
||||||
|
out.Mode |= syscall.S_ISGID
|
||||||
|
}
|
||||||
|
if in.Mode&os.ModeSticky != 0 {
|
||||||
|
out.Mode |= syscall.S_ISVTX
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert an absolute cache expiration time to a relative time from now for
|
// Convert an absolute cache expiration time to a relative time from now for
|
||||||
|
@ -975,6 +981,9 @@ func convertFileMode(unixMode uint32) os.FileMode {
|
||||||
if unixMode&syscall.S_ISGID != 0 {
|
if unixMode&syscall.S_ISGID != 0 {
|
||||||
mode |= os.ModeSetgid
|
mode |= os.ModeSetgid
|
||||||
}
|
}
|
||||||
|
if unixMode&syscall.S_ISVTX != 0 {
|
||||||
|
mode |= os.ModeSticky
|
||||||
|
}
|
||||||
return mode
|
return mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue