--- PVE/API2/Storage/Config.pm | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm index fa8d4de..a321204 100755 --- a/PVE/API2/Storage/Config.pm +++ b/PVE/API2/Storage/Config.pm @@ -52,6 +52,17 @@ my $extract_cifs_credentials = sub { return "password=$password\n"; }; +my $set_cifs_credentials = sub { + my ($user_data, $storeid) = @_; + + my $cred_path = '/etc/pve/priv/'; + + my $cred_file = $cred_path.$storeid.".cred"; + PVE::Tools::file_set_contents($cred_file, $user_data); + + return $cred_file; +}; + __PACKAGE__->register_method ({ name => 'index', path => '', -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel