xref: /aosp_15_r20/external/libcap/goapps/web/README.md (revision 2810ac1b38eead2603277920c78344c84ddf3aff)
1# Web serving with/without privilege
2
3## Building
4
5This sample program needs to be built as follows (when built with Go
6prior to 1.15):
7```
8   export CGO_LDFLAGS_ALLOW="-Wl,-?-wrap[=,][^-.@][^,]*"
9   go mod tidy
10   go build web.go
11```
12go1.15+ does not require the `CGO_LDFLAGS_ALLOW` environment variable
13and can build this code with:
14```
15   go mod tidy
16   go build web.go
17```
18
19## Further discussion
20
21A more complete walk through of what this code does is provided on the
22[Fully Capable
23website](https://sites.google.com/site/fullycapable/getting-started-with-go/building-go-programs-that-manipulate-capabilities).
24
25## Reporting bugs
26
27Go compilers prior to go1.11.13 are not expected to work. Report more
28recent issues to the [`libcap` bug tracker](https://bugzilla.kernel.org/buglist.cgi?component=libcap&list_id=1065141&product=Tools&resolution=---).
29