good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pggat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gfx
pggat
Commits
4aa6a5dc
Commit
4aa6a5dc
authored
1 year ago
by
Garet Halliday
Browse files
Options
Downloads
Patches
Plain Diff
thinking
parent
e2499aa5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/backend/backends/v0/server.go
+35
-2
35 additions, 2 deletions
lib/backend/backends/v0/server.go
with
35 additions
and
2 deletions
lib/backend/backends/v0/server.go
+
35
−
2
View file @
4aa6a5dc
package
backends
import
(
"
log
"
"
errors
"
"net"
"pggat2/lib/backend"
...
...
@@ -47,7 +47,40 @@ func (T *Server) accept() error {
return
err
}
log
.
Printf
(
"%#v"
,
auth
)
reader
:=
packet
.
MakeReader
(
auth
)
switch
reader
.
Type
()
{
case
packet
.
Authentication
:
method
,
ok
:=
reader
.
Int32
()
if
!
ok
{
return
errors
.
New
(
"expected authentication method"
)
}
// they have more authentication methods than there are pokemon
switch
method
{
case
0
:
// we're good to go, that was easy
case
2
:
return
errors
.
New
(
"kerberos v5 is not supported"
)
case
3
:
return
errors
.
New
(
"cleartext is not supported"
)
case
5
:
return
errors
.
New
(
"md5 password is not supported"
)
case
6
:
return
errors
.
New
(
"scm credential is not supported"
)
case
7
:
return
errors
.
New
(
"gss is not supported"
)
case
9
:
return
errors
.
New
(
"sspi is not supported"
)
case
10
:
return
errors
.
New
(
"sasl is not supported"
)
default
:
return
errors
.
New
(
"unknown authentication method"
)
}
case
packet
.
ErrorResponse
:
return
errors
.
New
(
"backend errored"
)
case
packet
.
NegotiateProtocolVersion
:
// we only support 3.0 as of now
return
errors
.
New
(
"unsupported protocol version"
)
}
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment