Skip to content

Commit 8461698

Browse files
committed
Release 2.6.2
2 parents 1b65090 + 729e568 commit 8461698

File tree

10 files changed

+102
-445
lines changed

10 files changed

+102
-445
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
name: Run tests
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

19-
- uses: actions/setup-go@v4
19+
- uses: actions/setup-go@v5
2020
with:
21-
go-version: '1.20.11'
21+
go-version: '1.20.13'
2222

2323
- name: Ensure linux agent compiles
2424
run: |

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ func (a *Agent) ForceKillMesh() {
436436
}
437437

438438
for _, pid := range pids {
439-
a.Logger.Debugln("Killing mesh process with pid %d", pid)
439+
a.Logger.Debugln("Killing mesh process with pid:", pid)
440440
if err := KillProc(int32(pid)); err != nil {
441441
a.Logger.Debugln(err)
442442
}

agent/agent_unix.go

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,12 @@ func (a *Agent) GetWMIInfo() map[string]interface{} {
395395

396396
// disks
397397
block, err := ghw.Block(ghw.WithDisableWarnings())
398+
ignore := []string{"ram", "loop"}
398399
if err != nil {
399400
a.Logger.Errorln("ghw.Block()", err)
400401
} else {
401402
for _, disk := range block.Disks {
402-
if disk.IsRemovable || strings.Contains(disk.Name, "ram") {
403+
if disk.IsRemovable || contains(disk.Name, ignore) {
403404
continue
404405
}
405406
ret := fmt.Sprintf("%s %s %s %s %s %s", disk.Vendor, disk.Model, disk.StorageController, disk.DriveType, disk.Name, ByteCountSI(disk.SizeBytes))
@@ -472,6 +473,30 @@ func (a *Agent) GetWMIInfo() map[string]interface{} {
472473
}
473474
}
474475

476+
switch runtime.GOOS {
477+
case "linux":
478+
baseboard, err := ghw.Baseboard()
479+
if err != nil {
480+
a.Logger.Debugln("ghw.Baseboard()", err)
481+
wmiInfo["serialnumber"] = "n/a"
482+
} else {
483+
wmiInfo["serialnumber"] = baseboard.SerialNumber
484+
}
485+
case "darwin":
486+
opts := a.NewCMDOpts()
487+
serialCmd := `ioreg -l | grep IOPlatformSerialNumber | grep -o '"IOPlatformSerialNumber" = "[^"]*"' | awk -F'"' '{print $4}'`
488+
opts.Command = serialCmd
489+
out := a.CmdV2(opts)
490+
if out.Status.Error != nil {
491+
a.Logger.Debugln("ioreg get serial number: ", out.Status.Error.Error())
492+
wmiInfo["serialnumber"] = "n/a"
493+
} else {
494+
wmiInfo["serialnumber"] = removeNewlines(out.Stdout)
495+
}
496+
default:
497+
wmiInfo["serialnumber"] = "n/a"
498+
}
499+
475500
if len(cpus) == 0 {
476501
wmiInfo["cpus"] = []string{makeModel}
477502
}

agent/utils.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,19 @@ func removeWinNewLines(s string) string {
307307
return strings.ReplaceAll(s, "\r\n", "\n")
308308
}
309309

310+
func removeNewlines(s string) string {
311+
return strings.ReplaceAll(s, "\n", "")
312+
}
313+
314+
func contains(s string, substrs []string) bool {
315+
for _, substr := range substrs {
316+
if strings.Contains(s, substr) {
317+
return true
318+
}
319+
}
320+
return false
321+
}
322+
310323
func stringInSlice(a string, list []string) bool {
311324
for _, b := range list {
312325
if b == a {

build/rmm.exe.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<assemblyIdentity
44
type="win32"
55
name="TacticalRMM"
6-
version="2.6.1.0"
6+
version="2.6.2.0"
77
processorArchitecture="*"/>
88
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
99
<security>

build/setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define MyAppName "Tactical RMM Agent"
2-
#define MyAppVersion "2.6.1"
2+
#define MyAppVersion "2.6.2"
33
#define MyAppPublisher "AmidaWare Inc"
44
#define MyAppURL "https://github.com/amidaware"
55
#define MyAppExeName "tacticalrmm.exe"

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ go 1.20
44

55
require (
66
github.com/StackExchange/wmi v1.2.1
7-
github.com/elastic/go-sysinfo v1.11.1
7+
github.com/elastic/go-sysinfo v1.11.2
88
github.com/go-ole/go-ole v1.3.0
99
github.com/go-ping/ping v1.1.0
10-
github.com/go-resty/resty/v2 v2.10.0
10+
github.com/go-resty/resty/v2 v2.11.0
1111
github.com/gonutz/w32/v2 v2.11.1
1212
github.com/iamacarpet/go-win64api v0.0.0-20230324134531-ef6dbdd6db97
13-
github.com/nats-io/nats.go v1.31.0
13+
github.com/nats-io/nats.go v1.32.0
1414
github.com/rickb777/date v1.19.1
15-
github.com/shirou/gopsutil/v3 v3.23.10
15+
github.com/shirou/gopsutil/v3 v3.23.12
1616
github.com/sirupsen/logrus v1.9.3
17-
github.com/ugorji/go/codec v1.2.11
17+
github.com/ugorji/go/codec v1.2.12
1818
github.com/wh1te909/go-win64api v0.0.0-20230802051600-21b24f62e846
1919
github.com/wh1te909/trmm-shared v0.0.0-20220227075846-f9f757361139
20-
golang.org/x/net v0.17.0 // indirect
21-
golang.org/x/sys v0.14.0
20+
golang.org/x/net v0.19.0 // indirect
21+
golang.org/x/sys v0.16.0
2222
)
2323

2424
require (
@@ -30,16 +30,16 @@ require (
3030
github.com/fourcorelabs/wintoken v1.0.0
3131
github.com/jaypipes/ghw v0.12.0
3232
github.com/kardianos/service v1.2.2
33-
github.com/spf13/viper v1.17.0
33+
github.com/spf13/viper v1.18.2
3434
)
3535

3636
require (
3737
github.com/elastic/go-windows v1.0.1 // indirect
38-
github.com/fsnotify/fsnotify v1.6.0 // indirect
38+
github.com/fsnotify/fsnotify v1.7.0 // indirect
3939
github.com/ghodss/yaml v1.0.0 // indirect
4040
github.com/google/cabbie v1.0.3 // indirect
4141
github.com/google/glazier v0.0.0-20220520121753-83447cca4ea7 // indirect
42-
github.com/google/uuid v1.3.0 // indirect
42+
github.com/google/uuid v1.4.0 // indirect
4343
github.com/hashicorp/hcl v1.0.0 // indirect
4444
github.com/jaypipes/pcidb v1.0.0 // indirect
4545
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
@@ -48,31 +48,31 @@ require (
4848
github.com/magiconair/properties v1.8.7 // indirect
4949
github.com/mitchellh/go-homedir v1.1.0 // indirect
5050
github.com/mitchellh/mapstructure v1.5.0 // indirect
51-
github.com/nats-io/nkeys v0.4.6 // indirect
51+
github.com/nats-io/nkeys v0.4.7 // indirect
5252
github.com/nats-io/nuid v1.0.1 // indirect
5353
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
5454
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
5555
github.com/pkg/errors v0.9.1 // indirect
5656
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
5757
github.com/prometheus/procfs v0.8.0 // indirect
5858
github.com/rickb777/plural v1.4.1 // indirect
59-
github.com/sagikazarmark/locafero v0.3.0 // indirect
59+
github.com/sagikazarmark/locafero v0.4.0 // indirect
6060
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
6161
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e // indirect
6262
github.com/shoenig/go-m1cpu v0.1.6 // indirect
6363
github.com/sourcegraph/conc v0.3.0 // indirect
64-
github.com/spf13/afero v1.10.0 // indirect
65-
github.com/spf13/cast v1.5.1 // indirect
64+
github.com/spf13/afero v1.11.0 // indirect
65+
github.com/spf13/cast v1.6.0 // indirect
6666
github.com/spf13/pflag v1.0.5 // indirect
6767
github.com/subosito/gotenv v1.6.0 // indirect
6868
github.com/tklauser/go-sysconf v0.3.12 // indirect
6969
github.com/tklauser/numcpus v0.6.1 // indirect
7070
github.com/yusufpapurcu/wmi v1.2.3 // indirect
7171
go.uber.org/atomic v1.9.0 // indirect
7272
go.uber.org/multierr v1.9.0 // indirect
73-
golang.org/x/crypto v0.15.0 // indirect
73+
golang.org/x/crypto v0.18.0 // indirect
7474
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
75-
golang.org/x/sync v0.3.0 // indirect
75+
golang.org/x/sync v0.5.0 // indirect
7676
golang.org/x/text v0.14.0 // indirect
7777
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
7878
gopkg.in/ini.v1 v1.67.0 // indirect

0 commit comments

Comments
 (0)