detached 4b5fcbc

docs(server): clarify peer credential namespace semantics

commit
4b5fcbc21f9147537793b57d6cd374fda948d4e2
author
brice · · 2026-09-30 09:07 UTC
committer
brice · · 2026-09-30 14:46 UTC
parent
ef8c520
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +6 -3
M server/display.go +6 -3
@@ -236,7 +236,9 @@ func (d *Display) Stopped() <-chan struct{} { return d.stopped }
236236 func LiveResources() int { return len(live.resources) }
237237
238238 // Credentials are the peer credentials of a client, read from the socket
239-// (SO_PEERCRED) when it connected.
239+// (SO_PEERCRED) when it connected. UID/GID are effective IDs in the server's
240+// namespaces; an unmappable ID is the namespace overflow ID. PID may be zero
241+// even for a valid client when its PID namespace is not visible to the server.
240242 type Credentials struct {
241243 PID int
242244 UID uint32
@@ -258,8 +260,9 @@ func (c Client) Credentials() (Credentials, error) {
258260 return Credentials{PID: int(credScratch[0]), UID: uint32(credScratch[1]), GID: uint32(credScratch[2])}, nil
259261 }
260262
261-// PID is the process ID of the client, from Credentials. Zero for an invalid
262-// client. Display goroutine only.
263+// PID is the process ID of the client, from Credentials. It is zero for an
264+// invalid client or a peer outside the server's visible PID namespaces.
265+// Display goroutine only.
263266 func (c Client) PID() int {
264267 cr, err := c.Credentials()
265268 if err != nil {
@@ -236,7 +236,9 @@ func (d *Display) Stopped() <-chan struct{} { return d.stopped }
236 func LiveResources() int { return len(live.resources) }236 func LiveResources() int { return len(live.resources) }
237 237
238 // Credentials are the peer credentials of a client, read from the socket238 // Credentials are the peer credentials of a client, read from the socket
239-// (SO_PEERCRED) when it connected.239+// (SO_PEERCRED) when it connected. UID/GID are effective IDs in the server's
240+// namespaces; an unmappable ID is the namespace overflow ID. PID may be zero
241+// even for a valid client when its PID namespace is not visible to the server.
240 type Credentials struct {242 type Credentials struct {
241 PID int243 PID int
242 UID uint32244 UID uint32
@@ -258,8 +260,9 @@ func (c Client) Credentials() (Credentials, error) {
258 return Credentials{PID: int(credScratch[0]), UID: uint32(credScratch[1]), GID: uint32(credScratch[2])}, nil260 return Credentials{PID: int(credScratch[0]), UID: uint32(credScratch[1]), GID: uint32(credScratch[2])}, nil
259 }261 }
260 262
261-// PID is the process ID of the client, from Credentials. Zero for an invalid263+// PID is the process ID of the client, from Credentials. It is zero for an
262-// client. Display goroutine only.264+// invalid client or a peer outside the server's visible PID namespaces.
265+// Display goroutine only.
263 func (c Client) PID() int {266 func (c Client) PID() int {
264 cr, err := c.Credentials()267 cr, err := c.Credentials()
265 if err != nil {268 if err != nil {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 14

↑↓ moveenter openesc close