From c1a0f72fa1db9afac9b1d0c02b071498d088d2ad Mon Sep 17 00:00:00 2001 From: Lars Scheibling Date: Fri, 12 Jan 2024 09:20:18 +0000 Subject: [PATCH] Updated path --- .../workflows/lint.yaml-disabled | 0 .../workflows/test.yaml-disabled | 0 README.md | 5 +++++ cmd/pam-moduler/moduler.go | 6 +++--- cmd/pam-moduler/tests/debug-module/debug-module.go | 5 ++--- cmd/pam-moduler/tests/debug-module/debug-module_test.go | 3 +-- cmd/pam-moduler/tests/debug-module/pam_module.go | 2 +- .../tests/integration-tester-module/communication_test.go | 2 +- .../integration-tester-module/integration-tester-module.go | 5 ++--- .../integration-tester-module_test.go | 3 +-- .../tests/integration-tester-module/pam_module.go | 2 +- .../tests/integration-tester-module/serialization.go | 3 +-- cmd/pam-moduler/tests/internal/utils/base-module.go | 2 -- cmd/pam-moduler/tests/internal/utils/test-setup.go | 2 -- cmd/pam-moduler/tests/internal/utils/test-utils.go | 2 -- example-module/module.go | 4 +--- example-module/pam_module.go | 2 +- example_test.go | 1 - go.mod | 2 +- 19 files changed, 21 insertions(+), 30 deletions(-) rename .github/workflows/lint.yaml => .github-disabled/workflows/lint.yaml-disabled (100%) rename .github/workflows/test.yaml => .github-disabled/workflows/test.yaml-disabled (100%) diff --git a/.github/workflows/lint.yaml b/.github-disabled/workflows/lint.yaml-disabled similarity index 100% rename from .github/workflows/lint.yaml rename to .github-disabled/workflows/lint.yaml-disabled diff --git a/.github/workflows/test.yaml b/.github-disabled/workflows/test.yaml-disabled similarity index 100% rename from .github/workflows/test.yaml rename to .github-disabled/workflows/test.yaml-disabled diff --git a/README.md b/README.md index 60f1c0c..5564970 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ This is a Go wrapper for the PAM application API. +Package path changed for ease of use, and to avoid conflicts with the original + +Originally created by [Mike Steinert](https://github.com/msteinert/pam) +Updated and modified by [Marco Trevisan](https://github.com/3v1n0/go-pam/tree/pam-moduler) + ## Module support Go PAM can also used to create PAM modules in a simple way, using the go. diff --git a/cmd/pam-moduler/moduler.go b/cmd/pam-moduler/moduler.go index 0a74125..7c72b29 100644 --- a/cmd/pam-moduler/moduler.go +++ b/cmd/pam-moduler/moduler.go @@ -11,11 +11,11 @@ // // For example: // -// //go:generate go run github.com/msteinert/pam/v2/pam-moduler +// //go:generate go run git.cloudyne.io/go/msteinert-go-pam/v2/pam-moduler // //go:generate go generate --skip="pam_module" // package main // -// import "github.com/msteinert/pam/v2" +// import "git.cloudyne.io/go/msteinert-go-pam/v2" // // type ExampleHandler struct{} // var pamModuleHandler pam.ModuleHandler = &ExampleHandler{} @@ -229,7 +229,7 @@ import ( "fmt" "os" "unsafe" - "github.com/msteinert/pam/v2" + "git.cloudyne.io/go/msteinert-go-pam/v2" ) `) diff --git a/cmd/pam-moduler/tests/debug-module/debug-module.go b/cmd/pam-moduler/tests/debug-module/debug-module.go index 843b329..5cba026 100644 --- a/cmd/pam-moduler/tests/debug-module/debug-module.go +++ b/cmd/pam-moduler/tests/debug-module/debug-module.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/msteinert/pam/v2/cmd/pam-moduler -libname "pam_godebug.so" +//go:generate go run git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler -libname "pam_godebug.so" //go:generate go generate --skip="pam_module.go" // This is a similar implementation of pam_debug.so @@ -10,8 +10,7 @@ import ( "fmt" "strings" - "github.com/msteinert/pam/v2" - "github.com/msteinert/pam/v2/cmd/pam-moduler/tests/internal/utils" + "git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler/tests/internal/utils" ) var pamModuleHandler pam.ModuleHandler = &DebugModule{} diff --git a/cmd/pam-moduler/tests/debug-module/debug-module_test.go b/cmd/pam-moduler/tests/debug-module/debug-module_test.go index 8a5d58d..ffb6a34 100644 --- a/cmd/pam-moduler/tests/debug-module/debug-module_test.go +++ b/cmd/pam-moduler/tests/debug-module/debug-module_test.go @@ -5,8 +5,7 @@ import ( "fmt" "testing" - "github.com/msteinert/pam/v2" - "github.com/msteinert/pam/v2/cmd/pam-moduler/tests/internal/utils" + "git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler/tests/internal/utils" ) func Test_DebugModule_ActionStatus(t *testing.T) { diff --git a/cmd/pam-moduler/tests/debug-module/pam_module.go b/cmd/pam-moduler/tests/debug-module/pam_module.go index 837842e..c1d1db9 100644 --- a/cmd/pam-moduler/tests/debug-module/pam_module.go +++ b/cmd/pam-moduler/tests/debug-module/pam_module.go @@ -16,7 +16,7 @@ import "C" import ( "errors" "fmt" - "github.com/msteinert/pam/v2" + "git.cloudyne.io/go/msteinert-go-pam/v2" "os" "unsafe" ) diff --git a/cmd/pam-moduler/tests/integration-tester-module/communication_test.go b/cmd/pam-moduler/tests/integration-tester-module/communication_test.go index 7ef01f7..dcf11ba 100644 --- a/cmd/pam-moduler/tests/integration-tester-module/communication_test.go +++ b/cmd/pam-moduler/tests/integration-tester-module/communication_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - "github.com/msteinert/pam/v2/cmd/pam-moduler/tests/internal/utils" + "git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler/tests/internal/utils" ) func ensureNoError(t *testing.T, err error) { diff --git a/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module.go b/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module.go index fcdeaa9..d544a01 100644 --- a/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module.go +++ b/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/msteinert/pam/v2/cmd/pam-moduler -type integrationTesterModule -parallel-conv +//go:generate go run git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler -type integrationTesterModule -parallel-conv //go:generate go generate --skip="pam_module.go" // Package main is the package for the integration tester module PAM shared library. @@ -10,8 +10,7 @@ import ( "reflect" "strings" - "github.com/msteinert/pam/v2" - "github.com/msteinert/pam/v2/cmd/pam-moduler/tests/internal/utils" + "git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler/tests/internal/utils" ) type integrationTesterModule struct { diff --git a/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module_test.go b/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module_test.go index 45acc70..05a0759 100644 --- a/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module_test.go +++ b/cmd/pam-moduler/tests/integration-tester-module/integration-tester-module_test.go @@ -10,8 +10,7 @@ import ( "testing" "time" - "github.com/msteinert/pam/v2" - "github.com/msteinert/pam/v2/cmd/pam-moduler/tests/internal/utils" + "git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler/tests/internal/utils" ) func (r *Request) check(res *Result, expectedResults []interface{}) error { diff --git a/cmd/pam-moduler/tests/integration-tester-module/pam_module.go b/cmd/pam-moduler/tests/integration-tester-module/pam_module.go index e64a4f9..dfa98eb 100644 --- a/cmd/pam-moduler/tests/integration-tester-module/pam_module.go +++ b/cmd/pam-moduler/tests/integration-tester-module/pam_module.go @@ -16,7 +16,7 @@ import "C" import ( "errors" "fmt" - "github.com/msteinert/pam/v2" + "git.cloudyne.io/go/msteinert-go-pam/v2" "os" "unsafe" ) diff --git a/cmd/pam-moduler/tests/integration-tester-module/serialization.go b/cmd/pam-moduler/tests/integration-tester-module/serialization.go index 7a549c2..09f5d7d 100644 --- a/cmd/pam-moduler/tests/integration-tester-module/serialization.go +++ b/cmd/pam-moduler/tests/integration-tester-module/serialization.go @@ -3,8 +3,7 @@ package main import ( "encoding/gob" - "github.com/msteinert/pam/v2" - "github.com/msteinert/pam/v2/cmd/pam-moduler/tests/internal/utils" + "git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler/tests/internal/utils" ) // SerializablePamError represents a [pam.Error] in a diff --git a/cmd/pam-moduler/tests/internal/utils/base-module.go b/cmd/pam-moduler/tests/internal/utils/base-module.go index 494b077..bab3643 100644 --- a/cmd/pam-moduler/tests/internal/utils/base-module.go +++ b/cmd/pam-moduler/tests/internal/utils/base-module.go @@ -1,7 +1,5 @@ package utils -import "github.com/msteinert/pam/v2" - // BaseModule is the type for a base PAM module. type BaseModule struct{} diff --git a/cmd/pam-moduler/tests/internal/utils/test-setup.go b/cmd/pam-moduler/tests/internal/utils/test-setup.go index 77fc71d..3685d95 100644 --- a/cmd/pam-moduler/tests/internal/utils/test-setup.go +++ b/cmd/pam-moduler/tests/internal/utils/test-setup.go @@ -8,8 +8,6 @@ import ( "runtime" "strings" "testing" - - "github.com/msteinert/pam/v2" ) // TestSetup is an utility type for having a playground for test PAM modules. diff --git a/cmd/pam-moduler/tests/internal/utils/test-utils.go b/cmd/pam-moduler/tests/internal/utils/test-utils.go index fd6f11b..b254084 100644 --- a/cmd/pam-moduler/tests/internal/utils/test-utils.go +++ b/cmd/pam-moduler/tests/internal/utils/test-utils.go @@ -11,8 +11,6 @@ import ( "fmt" "reflect" "unsafe" - - "github.com/msteinert/pam/v2" ) // Action represents a PAM action to perform. diff --git a/example-module/module.go b/example-module/module.go index 634e3ac..e8eb1f5 100644 --- a/example-module/module.go +++ b/example-module/module.go @@ -2,7 +2,7 @@ // `go generate` once in the module directory. // This is not strictly needed -//go:generate go run github.com/msteinert/pam/v2/cmd/pam-moduler +//go:generate go run git.cloudyne.io/go/msteinert-go-pam/v2/cmd/pam-moduler //go:generate go generate --skip="pam_module.go" // Package main provides the module shared library. @@ -10,8 +10,6 @@ package main import ( "fmt" - - "github.com/msteinert/pam/v2" ) type exampleHandler struct{} diff --git a/example-module/pam_module.go b/example-module/pam_module.go index 080e97c..bb850c0 100644 --- a/example-module/pam_module.go +++ b/example-module/pam_module.go @@ -16,7 +16,7 @@ import "C" import ( "errors" "fmt" - "github.com/msteinert/pam/v2" + "git.cloudyne.io/go/msteinert-go-pam/v2" "os" "unsafe" ) diff --git a/example_test.go b/example_test.go index 6782bdf..4368a3e 100644 --- a/example_test.go +++ b/example_test.go @@ -6,7 +6,6 @@ import ( "fmt" "os" - "github.com/msteinert/pam/v2" "golang.org/x/term" ) diff --git a/go.mod b/go.mod index b30e2a4..790d311 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/msteinert/pam/v2 +module git.cloudyne.io/go/msteinert-go-pam/v2 go 1.20