mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-07 21:42:59 +00:00
pbs-client: make get_secret_from_env private
Since we are exposing functions now to get the password and encryption password this should be private. Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
b510184e72
commit
27ba2c0318
@ -85,7 +85,7 @@ fn get_credential(cred_name: &str) -> std::io::Result<Option<Vec<u8>>> {
|
|||||||
/// BASE_NAME_CMD => read the secret from specified command first line of output on stdout
|
/// BASE_NAME_CMD => read the secret from specified command first line of output on stdout
|
||||||
///
|
///
|
||||||
/// Only return the first line of data (without CRLF).
|
/// Only return the first line of data (without CRLF).
|
||||||
pub fn get_secret_from_env(base_name: &str) -> Result<Option<String>, Error> {
|
fn get_secret_from_env(base_name: &str) -> Result<Option<String>, Error> {
|
||||||
let firstline = |data: String| -> String {
|
let firstline = |data: String| -> String {
|
||||||
match data.lines().next() {
|
match data.lines().next() {
|
||||||
Some(line) => line.to_string(),
|
Some(line) => line.to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user