Skip to content

Commit

Permalink
Add missing standard access rights
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed May 6, 2024
1 parent 7229110 commit 3ed86d5
Showing 1 changed file with 14 additions and 5 deletions.
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

0 comments on commit 3ed86d5

Please sign in to comment.