k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/cmd/kubeadm/app/util/users/users_other.go (about) 1 //go:build !linux 2 // +build !linux 3 4 /* 5 Copyright 2021 The Kubernetes Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 */ 19 20 package users 21 22 // EntryMap is empty on non-Linux. 23 type EntryMap struct{} 24 25 // UsersAndGroups is empty on non-Linux. 26 type UsersAndGroups struct{} 27 28 // ID is a NO-OP on non-Linux. 29 func (*EntryMap) ID(string) *int64 { 30 return nil 31 } 32 33 // String is NO-OP on non-Linux. 34 func (*EntryMap) String() string { 35 return "" 36 } 37 38 // AddUsersAndGroups is a NO-OP on non-Linux. 39 func AddUsersAndGroups() (*UsersAndGroups, error) { 40 return nil, nil 41 } 42 43 // RemoveUsersAndGroups is a NO-OP on non-Linux. 44 func RemoveUsersAndGroups() error { 45 return nil 46 } 47 48 // UpdatePathOwnerAndPermissions is a NO-OP on non-Linux. 49 func UpdatePathOwnerAndPermissions(path string, uid, gid int64, perms uint32) error { 50 return nil 51 } 52 53 // UpdatePathOwner is a NO-OP on non-Linux. 54 func UpdatePathOwner(dirPath string, uid, gid int64) error { 55 return nil 56 }