-
Notifications
You must be signed in to change notification settings - Fork 85
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
Implement new Service method to retrieve its SID type info #112
Conversation
Signed-off-by: Paul Mabileau <[email protected]>
Signed-off-by: Paul Mabileau <[email protected]>
Signed-off-by: Paul Mabileau <[email protected]>
Signed-off-by: Paul Mabileau <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PaulDance)
src/service.rs
line 1652 at r1 (raw file):
/// access permission prior to calling this method. pub fn get_config_service_sid_info(&self) -> crate::Result<ServiceSidType> { let mut data = vec![0u8; u32::BITS as usize / 8];
Nit: This could probably be replaced with let mut data = 0u32;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PaulDance)
src/service.rs
line 1652 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
Nit: This could probably be replaced with
let mut data = 0u32;
Or even better: ServiceSidType::None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PaulDance)
src/service.rs
line 1652 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
Or even better:
ServiceSidType::None
My bad, I see now that it must be a mutable slice. I must have been looking at change_config2
.
Yes, indeed! Thanks a bunch! |
Dear maintainers,
The
Service
struct supports modifying the underlying system resource's SID type information through theService::set_config_service_sid_info
method. However, there is currently no way to easily retrieve the value from the service manager, for example to check if a call toset_config_service_sid_info
actually worked.This PR therefore adds a new small
Service::get_config_service_sid_info
method that does just that. Also, some other minor bonus changes are included.Cheers,
Paul.
This change is