summaryrefslogtreecommitdiff
path: root/internal/sshd/gssapi_unsupported.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/sshd/gssapi_unsupported.go')
-rw-r--r--internal/sshd/gssapi_unsupported.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/internal/sshd/gssapi_unsupported.go b/internal/sshd/gssapi_unsupported.go
new file mode 100644
index 0000000..27660af
--- /dev/null
+++ b/internal/sshd/gssapi_unsupported.go
@@ -0,0 +1,34 @@
+//go:build !cgo
+
+package sshd
+
+import (
+ "errors"
+
+ "gitlab.com/gitlab-org/gitlab-shell/v14/internal/config"
+
+ "gitlab.com/gitlab-org/labkit/log"
+)
+
+func LoadGSSAPILib(c *config.GSSAPIConfig) error {
+ if c.Enabled {
+ log.New().Error("gssapi-with-mic disabled, built without CGO")
+ c.Enabled = false
+ }
+ return nil
+}
+
+type OSGSSAPIServer struct {
+ ServicePrincipalName string
+}
+
+func (*OSGSSAPIServer) AcceptSecContext([]byte) ([]byte, string, bool, error) {
+ return []byte{}, "", false, errors.New("gssapi is unsupported")
+}
+
+func (*OSGSSAPIServer) VerifyMIC([]byte, []byte) error {
+ return errors.New("gssapi is unsupported")
+}
+func (*OSGSSAPIServer) DeleteSecContext() error {
+ return errors.New("gssapi is unsupported")
+}