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

Fixed building errors introduced with merge of #280 #287

Closed
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ impl Context {
/// # let parent_name = object_name.clone();
/// #
/// context
/// .policy_duplication_select(policy_session, object_name, parent_name, false)
/// .policy_duplication_select(policy_session, &object_name, &parent_name, false)
/// .expect("Policy command code");
/// #
/// # /// Digest of the policy that allows duplication
Expand All @@ -418,8 +418,8 @@ impl Context {
pub fn policy_duplication_select(
&mut self,
policy_session: PolicySession,
object_name: Name,
new_parent_name: Name,
object_name: &Name,
new_parent_name: &Name,
include_object: bool,
) -> Result<()> {
let ret = unsafe {
Expand All @@ -429,8 +429,8 @@ impl Context {
self.optional_session_1(),
self.optional_session_2(),
self.optional_session_3(),
&object_name.try_into()?,
&new_parent_name.try_into()?,
object_name.as_ref(),
new_parent_name.as_ref(),
if include_object { 1 } else { 0 },
)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ mod test_duplicate {
context
.policy_duplication_select(
policy_session,
Vec::<u8>::new().try_into().unwrap(),
parent_name.clone(),
&Vec::<u8>::new().try_into().unwrap(),
&parent_name,
false,
)
.expect("Policy duplication select");
Expand Down Expand Up @@ -227,7 +227,7 @@ mod test_duplicate {
// Even if object name is not included in the policy digest ("false" as 3rd paremeter)
// Correct name needs to be set or the policy will fail.
context
.policy_duplication_select(policy_session, object_name, parent_name, false)
.policy_duplication_select(policy_session, &object_name, &parent_name, false)
.unwrap();
context.set_sessions((Some(policy_auth_session), None, None));

Expand Down