diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-18 10:23:44 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-18 10:23:44 +0800 |
commit | dd95e2dbfad7f39060dc70f145d0e1478770e454 (patch) | |
tree | 863f9c3a941f21a66fe0af1cbe9a09ae444c8a46 /git_hooks_handle.go | |
parent | README.md: Mention that anonymous pushes to contrib/ are possible now (diff) | |
download | forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.tar.gz forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.tar.zst forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.zip |
*.go: Add some comments for docs
Diffstat (limited to 'git_hooks_handle.go')
-rw-r--r-- | git_hooks_handle.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/git_hooks_handle.go b/git_hooks_handle.go index f8fb5bd..841c8d7 100644 --- a/git_hooks_handle.go +++ b/git_hooks_handle.go @@ -18,9 +18,13 @@ var ( err_get_ucred = errors.New("Failed getsockopt") ) +// hooks_handle_connection handles a connection from git_hooks_client via the +// unix socket. func hooks_handle_connection(conn net.Conn) { defer conn.Close() + // There aren't reasonable cases where someone would run this as + // another user. ucred, err := get_ucred(conn) if err != nil { conn.Write([]byte{1}) |