コード例 #1
0
ファイル: gkcli.c プロジェクト: luksen/gkcli
static GnomeKeyringResult del(char *name) {
	return gnome_keyring_delete_password_sync(
			&schema,
			"name", name,
			"application", application,
			NULL);
}
コード例 #2
0
ファイル: keyring.c プロジェクト: rtrox/keys
GnomeKeyringResult
gnome_keyring_del(const char *service,
                  const char *username) {
    return gnome_keyring_delete_password_sync(
               &GNOME_KEYRING_DEFAULT_SCHEMA,
               "service",  service,
               "username", username,
               NULL);
}
static void
erase_password(git_credential_t *cred)
{
    GnomeKeyringResult keyres;

    keyres = gnome_keyring_delete_password_sync(&git_schema,
						"protocol", cred->protocol,
						"host", cred->host,
						"path", cred->path,
						"username", cred->username,
						NULL);
    if (keyres != GNOME_KEYRING_RESULT_OK) {
	error("failed to delete password");
	return;
    }
}
コード例 #4
0
static int
erase_password(jaro_credential_t *cred)
{
    GnomeKeyringResult keyres;

    keyres = gnome_keyring_delete_password_sync(&jaro_schema,
						"protocol", cred->protocol,
						"host", cred->host,
						"path", cred->path,
						"username", cred->username,
						NULL);
    if (keyres != GNOME_KEYRING_RESULT_OK) {
	error("failed to erase password: %s", gnome_keyring_result_to_message(keyres));
	return 1;
    }
    return 0;
}
コード例 #5
0
ファイル: OTKeyring.cpp プロジェクト: Kodachi75/opentxs
// static
bool OTKeyring::Gnome_DeleteSecret(const OTString& strUser,
                                   const std::string& str_display)
{
    OT_ASSERT(strUser.Exists());

    GnomeKeyringResult theResult = gnome_keyring_delete_password_sync(
        GNOME_KEYRING_NETWORK_PASSWORD, "user", strUser.Get(), "protocol",
        "opentxs", // todo: hardcoding.
        nullptr);  // Always end with nullptr

    if (theResult == GNOME_KEYRING_RESULT_OK) {
        return true;
    }
    else {
        otErr << "OTKeyring::Gnome_DeleteSecret: "
              << "Failure in gnome_keyring_delete_password_sync: "
              << gnome_keyring_result_to_message(theResult) << '\n';
    }

    return false;
}