Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing standard access rights for ServiceAccess #129

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ bitflags::bitflags! {
/// Flags describing the access permissions when working with services
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
pub struct ServiceAccess: u32 {
/// Full access to the service object
const ALL_ACCESS = Services::SERVICE_ALL_ACCESS;

/// Can query the service status
const QUERY_STATUS = Services::SERVICE_QUERY_STATUS;

Expand All @@ -69,9 +72,6 @@ bitflags::bitflags! {
/// Can ask the service to report its status
const INTERROGATE = Services::SERVICE_INTERROGATE;

/// Can delete the service
const DELETE = FileSystem::DELETE;

/// Can query the services configuration
const QUERY_CONFIG = Services::SERVICE_QUERY_CONFIG;

Expand All @@ -81,8 +81,17 @@ bitflags::bitflags! {
/// Can use user-defined control codes
const USER_DEFINED_CONTROL = Services::SERVICE_USER_DEFINED_CONTROL;

/// Full access to the service object
const ALL_ACCESS = Services::SERVICE_ALL_ACCESS;
/// Can delete the service
const DELETE = FileSystem::DELETE;

/// Required to call the `QueryServiceObjectSecurity` function to query the security descriptor of the service object
const READ_CONTROL = FileSystem::READ_CONTROL;

/// Required to call the `SetServiceObjectSecurity` function to modify the Dacl member of the service object's security descriptor
const WRITE_DAC = FileSystem::WRITE_DAC;

/// Required to call the `SetServiceObjectSecurity` function to modify the Owner and Group members of the service object's security descriptor
const WRITE_OWNER = FileSystem::WRITE_OWNER;
}
}

Expand Down
Loading