From 1da023b4ca0c3295fa9686632ab0df6cbc18963c Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Fri, 13 Nov 2026 15:46:58 -0800 Subject: [PATCH] Point setUserID and setGroupID docs at the chmod(2) man page The docs for FilePermissions.setUserID and setGroupID referred to the setuid(2) and setgid(2) man pages. Those pages describe system calls that change a process's IDs. The permission bits are documented in chmod(2) as S_ISUID and S_ISGID. This matches how saveText already refers to S_ISVTX. --- Sources/System/FilePermissions.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/System/FilePermissions.swift b/Sources/System/FilePermissions.swift index f849a99..1157cf6 100644 --- a/Sources/System/FilePermissions.swift +++ b/Sources/System/FilePermissions.swift @@ -113,13 +113,15 @@ public struct FilePermissions: OptionSet, Sendable, Hashable, Codable { /// Indicates that the file is executed as the owner. /// - /// For more information, see the `setuid(2)` man page. + /// For more information, see the `chmod(2)` man page's + /// discussion of `S_ISUID` (the set-user-ID bit). @_alwaysEmitIntoClient public static var setUserID: FilePermissions { .init(rawValue: 0o4000) } /// Indicates that the file is executed as the group. /// - /// For more information, see the `setgid(2)` man page. + /// For more information, see the `chmod(2)` man page's + /// discussion of `S_ISGID` (the set-group-ID bit). @_alwaysEmitIntoClient public static var setGroupID: FilePermissions { .init(rawValue: 0o2000) }