summaryrefslogtreecommitdiff
path: root/go/b210613.go
blob: 2bced066cbf5dcd68e6c3083da7d748a064e2192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Program b210613 reproduces the code reported in:
//
//  https://bugzilla.kernel.org/show_bug.cgi?id=210613
//
// This file is evolved directly from the reproducer attached to that
// bug report originally authored by Lorenz Bauer.
package main

import (
	"fmt"
	"log"

	"kernel.org/pub/linux/libs/security/libcap/cap"
)

func main() {
	if err := cap.ModeNoPriv.Set(); err != nil {
		log.Fatalf("error dropping privilege: %v", err)
	}
	fmt.Println("b210613: PASSED")
}