Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ jobs:
test_linux:
strategy:
matrix:
go: [1.23.3]
runs-on: ubuntu-22.04
go: [1.26.1]
runs-on: ubuntu-24.04
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -30,15 +30,13 @@ jobs:
- run: |
cp ./.github/client_conf.json ./
go test -v -race ./...
- uses: golangci/golangci-lint-action@v6
with:
version: v1.63.4
skip-cache: true
args: --timeout=8m
- run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
test_windows:
strategy:
matrix:
go: [1.23.3]
go: [1.26.1]
runs-on: windows-2022
steps:
- uses: actions/setup-go@v5
Expand All @@ -62,9 +60,7 @@ jobs:
- run: |
cp ./.github/client_conf.json ./
go test -v -race ./...
- uses: golangci/golangci-lint-action@v6
with:
version: v1.63.4
skip-cache: true
args: --timeout=8m
- run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...

2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func (conn *conn) enableSession() {
atomic.StoreInt32(&conn._useSession, 1)
}

//nolint:unused // appears to be legacy, unsure, so leaving for now
//lint:ignore U1000 appears to be legacy, unsure, so leaving for now
func (conn *conn) sendRecv(cmd uint16, req smb2.Packet, ctx context.Context) (res []byte, err error) {
rr, err := conn.send(req, ctx)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion initiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (i *NTLMInitiator) SessionKey() []byte {
return i.ntlm.Session().SessionKey()
}

//nolint:unused // appears to be legacy, unsure, so leaving for now
//lint:ignore U1000 appears to be legacy, unsure, so leaving for now
func (i *NTLMInitiator) infoMap() *ntlm.InfoMap {
return i.ntlm.Session().InfoMap()
}
3 changes: 1 addition & 2 deletions internal/ntlm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ type Client struct {
Domain string // e.g "WORKGROUP", "MicrosoftAccount"
Workstation string // e.g "localhost", "HOME-PC"

TargetSPN string // SPN ::= "service/hostname[:port]"; e.g "cifs/remotehost:1020"
channelBindings *channelBindings //nolint:unused // reserved for future implementation
TargetSPN string // SPN ::= "service/hostname[:port]"; e.g "cifs/remotehost:1020"

nmsg []byte
session *Session
Expand Down
17 changes: 1 addition & 16 deletions internal/ntlm/ntlm.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"hash"
"hash/crc32"

"golang.org/x/crypto/md4" //nolint:staticcheck // md4 may be deprecated, but SMB still uses it
"golang.org/x/crypto/md4" //lint:ignore SA1019 md4 may be deprecated, but SMB still uses it
)

var zero [16]byte
Expand Down Expand Up @@ -78,21 +78,6 @@ const (
MsvAvChannelBindings
)

//nolint:unused
type addr struct {
typ uint32
val []byte
}

// channelBindings represents gss_channel_bindings_struct
//
//nolint:unused
type channelBindings struct {
InitiatorAddress addr
AcceptorAddress addr
AppData []byte
}

var signature = []byte("NTLMSSP\x00")

// Version
Expand Down
4 changes: 2 additions & 2 deletions krb5.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func (ki *Krb5Initiator) OID() asn1.ObjectIdentifier {
// InitSecContext initiates the security context.
func (ki *Krb5Initiator) InitSecContext() ([]byte, error) {
if ki.Client == nil {
return nil, errors.New("Kerberos client is not set")
return nil, errors.New("Kerberos client is not set") //lint:ignore ST1005 Kerberos is a proper noun
}

if ki.TargetSPN == "" {
return nil, errors.New("Kerberos target SPN is not set")
return nil, errors.New("Kerberos target SPN is not set") //lint:ignore ST1005 Kerberos is a proper noun
}

tkt, key, err := ki.Client.GetServiceTicket(ki.TargetSPN)
Expand Down
Loading