mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 11:20:10 +01:00
ssh token: Fix return code when adding multiple tokens
token_add returns ID of the added token so we can't use it as a return code for the binary.
This commit is contained in:
@@ -396,12 +396,16 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
return token_add(arguments.device,
|
||||
ret = token_add(arguments.device,
|
||||
arguments.ssh_server,
|
||||
arguments.ssh_user,
|
||||
arguments.ssh_path,
|
||||
arguments.ssh_keypath,
|
||||
arguments.keyslot);
|
||||
if (ret < 0)
|
||||
return EXIT_FAILURE;
|
||||
else
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
printf("Only 'add' action is currently supported by this plugin.\n");
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user