Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
koko
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
koko
Commits
24dd3c40
Commit
24dd3c40
authored
Jul 10, 2019
by
Eric
Committed by
Eric_Lee
Jul 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug: systemuser
parent
4ba06008
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
connmanager.go
pkg/srvconn/connmanager.go
+3
-1
sshconn.go
pkg/srvconn/sshconn.go
+1
-3
No files found.
pkg/srvconn/connmanager.go
View file @
24dd3c40
...
@@ -201,7 +201,9 @@ func GetClientFromCache(user *model.User, asset *model.Asset, systemUser *model.
...
@@ -201,7 +201,9 @@ func GetClientFromCache(user *model.User, asset *model.Asset, systemUser *model.
if
!
ok
{
if
!
ok
{
return
return
}
}
if
systemUser
.
Username
==
""
{
systemUser
.
Username
=
client
.
Username
}
var
u
=
user
.
Username
var
u
=
user
.
Username
var
ip
=
asset
.
IP
var
ip
=
asset
.
IP
clientsRefCounter
[
client
]
++
clientsRefCounter
[
client
]
++
...
...
pkg/srvconn/sshconn.go
View file @
24dd3c40
...
@@ -78,9 +78,7 @@ func (sc *ServerSSHConnection) TryConnectFromCache(h, w int, term string) (err e
...
@@ -78,9 +78,7 @@ func (sc *ServerSSHConnection) TryConnectFromCache(h, w int, term string) (err e
if
sc
.
client
==
nil
{
if
sc
.
client
==
nil
{
return
errors
.
New
(
"no client in cache"
)
return
errors
.
New
(
"no client in cache"
)
}
}
if
sc
.
SystemUser
.
Username
==
""
{
sc
.
SystemUser
.
Username
=
sc
.
client
.
Username
}
err
=
sc
.
invokeShell
(
h
,
w
,
term
)
err
=
sc
.
invokeShell
(
h
,
w
,
term
)
if
err
!=
nil
{
if
err
!=
nil
{
RecycleClient
(
sc
.
client
)
RecycleClient
(
sc
.
client
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment