806 PwdStore* get_pwdstore(void) { |
806 PwdStore* get_pwdstore(void) { |
807 return pstore; |
807 return pstore; |
808 } |
808 } |
809 |
809 |
810 int pwdstore_save(PwdStore *pwdstore) { |
810 int pwdstore_save(PwdStore *pwdstore) { |
|
811 if(check_config_dir()) { |
|
812 return 1; |
|
813 } |
|
814 |
811 char *pwfile = util_concat_path(ENV_HOME, ".dav/secrets.crypt"); |
815 char *pwfile = util_concat_path(ENV_HOME, ".dav/secrets.crypt"); |
812 int ret = pwdstore_store(pwdstore, pwfile); |
816 int ret = pwdstore_store(pwdstore, pwfile); |
813 free(pwfile); |
817 free(pwfile); |
814 return ret; |
818 return ret; |
815 } |
819 } |