v1.16.0
ADDED: * Dummy implementation for IDState on Windows
This commit is contained in:
72
funcs_idstate_windows.go
Normal file
72
funcs_idstate_windows.go
Normal file
@@ -0,0 +1,72 @@
|
||||
//go:build windows
|
||||
|
||||
package sysutils
|
||||
|
||||
// Checked consolidates all the provided checked functions. This is a NO-OP on Windows.
|
||||
func (i *IDState) Checked() (checked bool) {
|
||||
return
|
||||
}
|
||||
|
||||
/*
|
||||
IsReal consolidates all the elevation/dropped-privs checks into a single method.
|
||||
|
||||
This is a NO-OP on Windows.
|
||||
*/
|
||||
func (i *IDState) IsReal(real bool) {
|
||||
return
|
||||
}
|
||||
|
||||
/*
|
||||
IsSudoGroup is true if any of the group sudo env vars are set,
|
||||
or the parent process has a different group (and is not PID 1).
|
||||
|
||||
This is a NO-OP on Windows.
|
||||
*/
|
||||
func (i *IDState) IsSudoGroup() (sudo bool) {
|
||||
return
|
||||
}
|
||||
|
||||
/*
|
||||
IsSudoUser is true if any of the user sudo env vars are set,
|
||||
or the parent process has a different owner (and is not PID 1).
|
||||
|
||||
This is a NO-OP on Windows.
|
||||
*/
|
||||
func (i *IDState) IsSudoUser() (sudo bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// IsSuid is true if the RUID does not match EUID or SUID. This is a NO-OP on Windows.
|
||||
func (i *IDState) IsSuid() (suid bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// IsSgid is true if the RGID does not match EGID or SGID. This is a NO-OP on Windows.
|
||||
func (i *IDState) IsSgid() (sgid bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// GIDsChecked is true if the GIDs presented can be trusted. This is a NO-OP on Windows.
|
||||
func (i *IDState) GIDsChecked() (checked bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// PPIDGIDsChecked is true if PPIDGidMatch can be trusted. This is a NO-OP on Windows.
|
||||
func (i *IDState) PPIDGIDsChecked() (checked bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// PPIDUIDsChecked is true if PPIDUidMatch can be trusted. This is a NO-OP on Windows.
|
||||
func (i *IDState) PPIDUIDsChecked() (checked bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// SudoChecked is true if SudoEnvVars can be trusted. This is a NO-OP on Windows.
|
||||
func (i *IDState) SudoChecked() (checked bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// UIDsChecked is true if the UIDs presented can be trusted. This is a NO-OP on Windows.
|
||||
func (i *IDState) UIDsChecked() (checked bool) {
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user