Skip to content

Commit aebc65e

Browse files
authored
Remove old pre-module code (#542)
* Remove old pre-module code older versions still accessible via tags * Update workflows to only use v3 directory Also, disable fuzzing until configured correctly in upstream repo
1 parent dc5f57d commit aebc65e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+89
-9965
lines changed

.github/workflows/cifuzz.yml

+32-31
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,35 @@ name: CIFuzz
22
on: [pull_request]
33
permissions: {}
44
jobs:
5-
Fuzzing:
6-
runs-on: ubuntu-latest
7-
permissions:
8-
security-events: write
9-
steps:
10-
- name: Build Fuzzers
11-
id: build
12-
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
13-
with:
14-
oss-fuzz-project-name: 'go-ldap'
15-
language: go
16-
- name: Run Fuzzers
17-
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
18-
with:
19-
oss-fuzz-project-name: 'go-ldap'
20-
language: go
21-
fuzz-seconds: 300
22-
output-sarif: true
23-
- name: Upload Crash
24-
uses: actions/upload-artifact@v3
25-
if: failure() && steps.build.outcome == 'success'
26-
with:
27-
name: artifacts
28-
path: ./out/artifacts
29-
- name: Upload Sarif
30-
if: always() && steps.build.outcome == 'success'
31-
uses: github/codeql-action/upload-sarif@v2
32-
with:
33-
# Path to SARIF file relative to the root of the repository
34-
sarif_file: cifuzz-sarif/results.sarif
35-
checkout_path: cifuzz-sarif
5+
Fuzzing:
6+
if: false # Until go-fuzz project is updated to use v3 directory
7+
runs-on: ubuntu-latest
8+
permissions:
9+
security-events: write
10+
steps:
11+
- name: Build Fuzzers
12+
id: build
13+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
14+
with:
15+
oss-fuzz-project-name: "go-ldap"
16+
language: go
17+
- name: Run Fuzzers
18+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
19+
with:
20+
oss-fuzz-project-name: "go-ldap"
21+
language: go
22+
fuzz-seconds: 300
23+
output-sarif: true
24+
- name: Upload Crash
25+
uses: actions/upload-artifact@v3
26+
if: failure() && steps.build.outcome == 'success'
27+
with:
28+
name: artifacts
29+
path: ./out/artifacts
30+
- name: Upload Sarif
31+
if: always() && steps.build.outcome == 'success'
32+
uses: github/codeql-action/upload-sarif@v2
33+
with:
34+
# Path to SARIF file relative to the root of the repository
35+
sarif_file: cifuzz-sarif/results.sarif
36+
checkout_path: cifuzz-sarif

.github/workflows/lint.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: golangci-lint
22
on:
33
pull_request:
4-
branches: [ master ]
4+
branches: [master]
55

66
permissions:
77
contents: read
@@ -13,11 +13,12 @@ jobs:
1313
steps:
1414
- uses: actions/setup-go@v5
1515
with:
16-
go-version: '1.23'
16+
go-version: "1.23"
1717
cache: false
1818
- uses: actions/checkout@v4
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v6
2121
with:
2222
version: latest
2323
only-new-issues: true
24+
working-directory: v3

.github/workflows/pr.yml

+32-42
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,44 @@ name: PR
22

33
on:
44
pull_request:
5-
branches: [ master ]
5+
branches: [master]
66

77
jobs:
8-
build:
8+
build-and-test:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
go: [
13-
'1.23',
14-
'1.22',
15-
'1.21',
16-
'1.20',
17-
'1.19',
18-
'1.18',
19-
'1.17',
20-
'1.16',
21-
'1.15',
22-
'1.14',
23-
]
24-
branch: [ '.', './v3' ]
25-
name: Go ${{ matrix.go }}.x PR Validate ${{ matrix.branch }} (Modules)
12+
go:
13+
[
14+
"1.23",
15+
"1.22",
16+
"1.21",
17+
"1.20",
18+
"1.19",
19+
"1.18",
20+
"1.17",
21+
"1.16",
22+
"1.15",
23+
"1.14",
24+
]
25+
directory: ["./v3"]
26+
name: Go ${{ matrix.go }}.x PR Validate ${{ matrix.directory }} (Modules)
2627
steps:
27-
- name: Checkout code
28-
uses: actions/checkout@v4
28+
- name: Checkout code
29+
uses: actions/checkout@v4
2930

30-
- name: Set up Go
31-
uses: actions/setup-go@v5
32-
with:
33-
go-version: ${{ matrix.go }}
34-
35-
- name: Version
36-
run: go version
31+
- name: Set up Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: ${{ matrix.go }}
3735

38-
- name: Build and Validate
39-
run: |
40-
cd ${{ matrix.branch }}
41-
go vet .
42-
go test .
43-
go test -cover -race -cpu 1,2,4 .
44-
go build .
36+
- name: Version
37+
run: go version
4538

46-
lint:
47-
name: Lint
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v4
51-
- name: golangci-lint
52-
uses: golangci/golangci-lint-action@v6
53-
with:
54-
version: latest
55-
only-new-issues: true
39+
- name: Build, Validate, and Test
40+
run: |
41+
cd ${{ matrix.directory }}
42+
go vet .
43+
go test .
44+
go test -cover -race -cpu 1,2,4 .
45+
go build .

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2011-2015 Michael Mitton (mmitton@gmail.com)
4-
Portions copyright (c) 2015-2016 go-ldap Authors
4+
Portions copyright (c) 2015-2024 go-ldap Authors
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

+21-34
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,50 @@
33
# Basic LDAP v3 functionality for the GO programming language.
44

55
The library implements the following specifications:
6-
- https://datatracker.ietf.org/doc/html/rfc4511 for basic operations
7-
- https://datatracker.ietf.org/doc/html/rfc3062 for password modify operation
8-
- https://datatracker.ietf.org/doc/html/rfc4514 for distinguished names parsing
9-
- https://datatracker.ietf.org/doc/html/rfc4533 for Content Synchronization Operation
10-
- https://datatracker.ietf.org/doc/html/draft-armijo-ldap-treedelete-02 for Tree Delete Control
11-
- https://datatracker.ietf.org/doc/html/rfc2891 for Server Side Sorting of Search Results
12-
- https://datatracker.ietf.org/doc/html/rfc4532 for WhoAmI requests
6+
7+
- https://datatracker.ietf.org/doc/html/rfc4511 for basic operations
8+
- https://datatracker.ietf.org/doc/html/rfc3062 for password modify operation
9+
- https://datatracker.ietf.org/doc/html/rfc4514 for distinguished names parsing
10+
- https://datatracker.ietf.org/doc/html/rfc4533 for Content Synchronization Operation
11+
- https://datatracker.ietf.org/doc/html/draft-armijo-ldap-treedelete-02 for Tree Delete Control
12+
- https://datatracker.ietf.org/doc/html/rfc2891 for Server Side Sorting of Search Results
13+
- https://datatracker.ietf.org/doc/html/rfc4532 for WhoAmI requests
1314

1415
## Features:
1516

16-
- Connecting to LDAP server (non-TLS, TLS, STARTTLS, through a custom dialer)
17-
- Binding to LDAP server (Simple Bind, GSSAPI, SASL)
18-
- "Who Am I" Requests / Responses
19-
- Searching for entries (normal and asynchronous)
20-
- Filter Compile / Decompile
21-
- Paging Search Results
22-
- Modify Requests / Responses
23-
- Add Requests / Responses
24-
- Delete Requests / Responses
25-
- Modify DN Requests / Responses
17+
- Connecting to LDAP server (non-TLS, TLS, STARTTLS, through a custom dialer)
18+
- Binding to LDAP server (Simple Bind, GSSAPI, SASL)
19+
- "Who Am I" Requests / Responses
20+
- Searching for entries (normal and asynchronous)
21+
- Filter Compile / Decompile
22+
- Paging Search Results
23+
- Modify Requests / Responses
24+
- Add Requests / Responses
25+
- Delete Requests / Responses
26+
- Modify DN Requests / Responses
2627

2728
## Go Modules:
2829

2930
`go get github.com/go-ldap/ldap/v3`
3031

31-
As go-ldap was v2+ when Go Modules came out, updating to Go Modules would be considered a breaking change.
32-
33-
To maintain backwards compatability, we ultimately decided to use subfolders (as v3 was already a branch).
34-
Whilst this duplicates the code, we can move toward implementing a backwards-compatible versioning system that allows for code reuse.
35-
The alternative would be to increment the version number, however we believe that this would confuse users as v3 is in line with LDAPv3 (RFC-4511)
36-
https://tools.ietf.org/html/rfc4511
37-
38-
39-
For more info, please visit the pull request that updated to modules.
40-
https://github.com/go-ldap/ldap/pull/247
41-
42-
To install with `GOMODULE111=off`, use `go get github.com/go-ldap/ldap`
43-
https://golang.org/cmd/go/#hdr-Legacy_GOPATH_go_get
44-
45-
As always, we are looking for contributors with great ideas on how to best move forward.
46-
47-
4832
## Contributing:
4933

5034
Bug reports and pull requests are welcome!
5135

5236
Before submitting a pull request, please make sure tests and verification scripts pass:
37+
5338
```
5439
make all
5540
```
5641

5742
To set up a pre-push hook to run the tests and verify scripts before pushing:
43+
5844
```
5945
ln -s ../../.githooks/pre-push .git/hooks/pre-push
6046
```
6147

6248
---
49+
6350
The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
6451
The design is licensed under the Creative Commons 3.0 Attributions license.
6552
Read this article for more details: http://blog.golang.org/gopher

add.go

-89
This file was deleted.

0 commit comments

Comments
 (0)