--- PVE/API2/Storage/Config.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm index aa8c931..2d76e59 100755 --- a/PVE/API2/Storage/Config.pm +++ b/PVE/API2/Storage/Config.pm @@ -36,6 +36,18 @@ my $api_storage_config = sub { return $scfg; }; +my $set_cifs_credentials = sub { + my ($password, $storeid) = @_; + + my $cred_path = '/etc/pve/priv/'; + + my $cred_file = $cred_path.$storeid.".cred"; + + PVE::Tools::file_set_contents($cred_file, "password=$password\n"); + + 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