Skip to content

Commit 340ee63

Browse files
committed
smb2: force dce-style for krb5
1 parent aa1ab23 commit 340ee63

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

smb2/initiator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ func SecurtiyContextInitiator(opts ...gssapi.ContextOption) *Initiator {
1717
}
1818
}
1919

20+
// allways include DCEStyle.
21+
i.opts = append(i.opts, gssapi.WithRequest(gssapi.DCEStyle))
22+
2023
return &i
2124
}
2225

ssp/krb5/gssapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (Mechanism) New(ctx context.Context) (gssapi.Mechanism, error) {
107107
}
108108

109109
if cc.Capabilities.IsSet(gssapi.DCEStyle) || c.DCEStyle {
110-
c.Flags = append(c.Flags, int(gssapi.DCEStyle))
110+
c.Flags, c.DCEStyle = append(c.Flags, int(gssapi.DCEStyle)), true
111111
}
112112

113113
// XXX: this option controls whether the key from TGT must be

0 commit comments

Comments
 (0)