Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57264e1765 | ||
|
|
48ff5196f4 |
2
go.mod
2
go.mod
@@ -21,7 +21,7 @@ require (
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/google/subcommands v1.2.0
|
||||
github.com/google/uuid v1.3.1
|
||||
github.com/gosnmp/gosnmp v1.35.0
|
||||
github.com/gosnmp/gosnmp v1.36.1
|
||||
github.com/gosuri/uitable v0.0.4
|
||||
github.com/hashicorp/go-uuid v1.0.3
|
||||
github.com/hashicorp/go-version v1.6.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -525,8 +525,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gosnmp/gosnmp v1.35.0 h1:EuWWNPxTCdAUx2/NbQcSa3WdNxjzpy4Phv57b4MWpJM=
|
||||
github.com/gosnmp/gosnmp v1.35.0/go.mod h1:2AvKZ3n9aEl5TJEo/fFmf/FGO4Nj4cVeEc5yuk88CYc=
|
||||
github.com/gosnmp/gosnmp v1.36.1 h1:LaTyGWIM8Z91NmCUELJi45d+BtOafI8U82nVUGI1P+w=
|
||||
github.com/gosnmp/gosnmp v1.36.1/go.mod h1:iLcZxN2MxKhH0jPQDVMZaSNypw1ykqVi27O79koQj6w=
|
||||
github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY=
|
||||
github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=
|
||||
|
||||
@@ -815,7 +815,7 @@ func (o *redhatBase) parseNeedsRestarting(stdout string) (procs []models.NeedRes
|
||||
}
|
||||
|
||||
path := ss[1]
|
||||
if !strings.HasPrefix(path, "/") {
|
||||
if path != "" && !strings.HasPrefix(path, "/") {
|
||||
path = strings.Fields(path)[0]
|
||||
// [ec2-user@ip-172-31-11-139 ~]$ sudo needs-restarting
|
||||
// 2024 : auditd
|
||||
|
||||
@@ -500,8 +500,14 @@ func TestParseNeedsRestarting(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
`1 : /usr/lib/systemd/systemd --switched-root --system --deserialize 21kk
|
||||
30170 :
|
||||
437 : /usr/sbin/NetworkManager --no-daemon`,
|
||||
[]models.NeedRestartProcess{
|
||||
{
|
||||
PID: "30170",
|
||||
Path: "",
|
||||
HasInit: true,
|
||||
},
|
||||
{
|
||||
PID: "437",
|
||||
Path: "/usr/sbin/NetworkManager --no-daemon",
|
||||
|
||||
Reference in New Issue
Block a user