Apply the SSH root-login setting to uid 0, not only to the account named root (#8390)

This commit is contained in:
Viktor Liu
2026-10-29 00:21:01 +09:00
committed by GitHub
parent 1acdebf395
commit e2ee1dd002
3 changed files with 55 additions and 16 deletions
+1 -1
View File
@@ -483,7 +483,7 @@ func TestServer_IsPrivilegedUser(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
result := isPrivilegedOrUnknown(tt.username)
result := isPrivilegedOrUnknown(&user.User{Username: tt.username, Uid: "1000"})
assert.Equal(t, tt.expected, result, tt.description)
})
}