A root in the group with setgid was kept without a warrant even when the data beneath it was not in the group, which §7 says the operator is asked about. A root is now kept without asking only when it is empty, or it and a bounded sample beneath it are all in the group with group write (and setgid on folders). On busybox, an account the mesh made is given its added groups with addgroup and delgroup; a change of its primary group is refused, saying why.
40 lines
1.3 KiB
Go
40 lines
1.3 KiB
Go
//go:build !linux
|
|
|
|
package apply
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/novox/mesh-host/internal/declaration"
|
|
)
|
|
|
|
// The node-engine runs on Linux: a library is kept only by descriptor, which this system cannot. Everything refuses,
|
|
// saying so, and changes nothing.
|
|
|
|
var errNoKeeping = errors.New("a library is kept only by descriptor, which this system cannot; nothing was changed")
|
|
|
|
// FolderFacts is what the engine reads of a library's root before keeping it.
|
|
type FolderFacts struct {
|
|
UID, GID uint32
|
|
Mode uint32
|
|
Empty bool
|
|
}
|
|
|
|
func readFolder(string) (FolderFacts, error) { return FolderFacts{}, errNoKeeping }
|
|
func keepFolders(string, []string, int) (int, int, error) { return 0, 0, errNoKeeping }
|
|
func ReconcileLibraries(context.Context, *declaration.Declaration) []string { return nil }
|
|
|
|
func TakeLibrary(context.Context, *declaration.Declaration, string, string, string, string) (<-chan struct{},
|
|
string, error) {
|
|
return nil, "", errNoKeeping
|
|
}
|
|
|
|
// MountFsid reads no filesystem id where a library is not kept.
|
|
var MountFsid = func(string) string { return "" }
|
|
|
|
// MountUUID reads no UUID where a library is not kept.
|
|
var MountUUID = func(string) string { return "" }
|
|
|
|
func sampleInShape(string, int) bool { return false }
|