pub fn ensure_safe_dir(dir: &Path, uid: u32) -> boolExpand description
Ensure dir is a 0700 directory owned by uid, creating it atomically
at that mode when absent. Returns false if it exists as a symlink or as
another user’s directory, which are never chmod’d through; a real
directory we own but with loose permissions is tightened in place.