File tree 5 files changed +12
-8
lines changed
key_info_managers/on_disk_manager
5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,8 @@ if [ "$PROVIDER_NAME" = "all" ]; then
393
393
# Needed because parsec-client-1 and 2 write to those locations owned by root
394
394
chmod 777 /tmp/parsec/e2e_tests
395
395
chmod 777 /tmp/
396
- chmod -R 777 /opt/rust/registry
396
+ chmod -R 775 /opt/rust/registry
397
+ chgrp -R parsec-clients /opt/rust/registry
397
398
398
399
# PATH is defined before each command for user to use their own version of the Rust toolchain
399
400
su -c " PATH=\" /home/parsec-client-1/.cargo/bin:${PATH} \" ;RUST_BACKTRACE=1 cargo test $TEST_FEATURES --manifest-path ./e2e_tests/Cargo.toml --target-dir /home/parsec-client-1 all_providers::multitenancy::client1_before" parsec-client-1
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ RUN apt install -y --fix-missing wget python3 cmake clang
16
16
RUN apt install -y libini-config-dev libcurl4-openssl-dev curl libgcc1
17
17
RUN apt install -y python3-distutils libclang-6.0-dev protobuf-compiler python3-pip
18
18
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
19
-
20
19
WORKDIR /tmp
21
20
22
21
# Download and install TSS 2.0
@@ -107,8 +106,13 @@ COPY _exec_wrapper /usr/local/bin/
107
106
RUN ls /opt/rust/bin | xargs -n1 -I% ln -s /usr/local/bin/_exec_wrapper /usr/local/bin/$(basename %)
108
107
109
108
# Add users for multitenancy tests
110
- RUN useradd -m parsec-client-1
111
- RUN useradd -m parsec-client-2
109
+ RUN useradd -m parsec-client-1 \
110
+ && useradd -m parsec-client-2 \
111
+ && groupadd parsec-clients \
112
+ && usermod -g parsec-clients parsec-client-1 \
113
+ && usermod -g parsec-clients parsec-client-2 \
114
+ && sed -i '/^UMASK/s/022/002/' /etc/login.defs
115
+
112
116
113
117
# Add `/usr/local/lib` to library path for Trusted service provider
114
118
ENV LD_LIBRARY_PATH="/usr/local/lib"
Original file line number Diff line number Diff line change @@ -97,8 +97,7 @@ impl BackEndHandler {
97
97
}
98
98
99
99
if opcode. is_admin ( ) {
100
- let app =
101
- unwrap_or_else_return ! ( ( & app) . as_ref( ) . ok_or( ResponseStatus :: NotAuthenticated ) ) ;
100
+ let app = unwrap_or_else_return ! ( app. as_ref( ) . ok_or( ResponseStatus :: NotAuthenticated ) ) ;
102
101
103
102
if !app. is_admin ( ) {
104
103
warn ! (
Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ impl OnDiskKeyInfoManager {
395
395
for provider_dir_path in list_dirs ( app_name_dir_path) ?. iter ( ) {
396
396
for key_name_file_path in list_files ( provider_dir_path) ?. iter ( ) {
397
397
let mut key_info = Vec :: new ( ) ;
398
- let mut key_info_file = File :: open ( & key_name_file_path) . with_context ( || {
398
+ let mut key_info_file = File :: open ( key_name_file_path) . with_context ( || {
399
399
format ! (
400
400
"Failed to open Key Info Mappings file at {:?}" ,
401
401
key_name_file_path
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ impl Provider {
191
191
}
192
192
}
193
193
194
- if None == cryptoauthlib_provider. set_opcodes ( ) {
194
+ if cryptoauthlib_provider. set_opcodes ( ) . is_none ( ) {
195
195
warn ! ( "Failed to setup opcodes for cryptoauthlib_provider" ) ;
196
196
}
197
197
You can’t perform that action at this time.
0 commit comments