diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-05-31 17:42:12 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-31 19:45:05 -0700 |
commit | a6b667478034cee6efde4b0828ad4a263345355f (patch) | |
tree | f9695816f6bdc075e878849a388ac816a124eb7d /git-access.c | |
parent | 97ef9d0ee81f9037e7d71041bfb326c304888283 (diff) | |
download | subsurface-a6b667478034cee6efde4b0828ad4a263345355f.tar.gz |
Cloud storage: rethink the terminology used
Cloud storage makes more sense that remote storage - at least I assume
that more people are used to thinking about "storing things in the cloud".
Don't use PIN or passphrase, call it a password everywhere.
Don't use copy_string() to copy the password - the git credentials routine
asserts that password is not NULL, so make sure we at least have a pointer
to an empty string here.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'git-access.c')
-rw-r--r-- | git-access.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-access.c b/git-access.c index c0e1a7710..9189ae08d 100644 --- a/git-access.c +++ b/git-access.c @@ -77,7 +77,7 @@ int credential_ssh_cb(git_cred **out, void *payload) { const char *priv_key = format_string("%s/%s", system_default_directory(), "ssrf_remote.key"); - const char *passphrase = copy_string(prefs.passphrase); + const char *passphrase = prefs.cloud_storage_password ? strdup(prefs.cloud_storage_password) : strdup(""); return git_cred_ssh_key_new(out, username_from_url, NULL, priv_key, passphrase); } @@ -88,7 +88,7 @@ int credential_https_cb(git_cred **out, void *payload) { const char *username = "ssrftest"; - const char *password = copy_string(prefs.passphrase); + const char *password = prefs.cloud_storage_password ? strdup(prefs.cloud_storage_password) : strdup(""); return git_cred_userpass_plaintext_new(out, username, password); } #endif |