summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-01-07 18:08:00 -0800
committerMarcel Holtmann <marcel@holtmann.org>2010-01-07 18:08:00 -0800
commit2271c9fed743991d83ece8a7650b547d0391d1fc (patch)
tree74b5405e2f1ca9418be6adcb9c081edd850c87b8 /src/config.c
parent4bd40079eea51f0a84a00d6330222364adf44710 (diff)
downloadconnman-2271c9fed743991d83ece8a7650b547d0391d1fc.tar.gz
connman-2271c9fed743991d83ece8a7650b547d0391d1fc.tar.bz2
connman-2271c9fed743991d83ece8a7650b547d0391d1fc.zip
Fix some WPA Enterprise privacy issues
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/config.c b/src/config.c
index 4b6e3efe..87c2bae1 100644
--- a/src/config.c
+++ b/src/config.c
@@ -120,7 +120,7 @@ static int load_service(GKeyFile *keyfile, const char *group,
str = g_key_file_get_string(keyfile, group, "Name", NULL);
if (str != NULL) {
- g_free(service->type);
+ g_free(service->name);
service->name = str;
}
@@ -395,27 +395,27 @@ static void provision_service(gpointer key, gpointer value, gpointer user_data)
__connman_service_set_immutable(service, TRUE);
__connman_service_set_favorite(service, TRUE);
- if (config->eap)
+ if (config->eap != NULL)
__connman_service_set_string(service, "EAP", config->eap);
- if (config->identity)
+ if (config->identity != NULL)
__connman_service_set_string(service, "Identity",
config->identity);
- if (config->ca_cert_file)
+ if (config->ca_cert_file != NULL)
__connman_service_set_string(service, "CACertFile",
config->ca_cert_file);
- if (config->client_cert_file)
+ if (config->client_cert_file != NULL)
__connman_service_set_string(service, "ClientCertFile",
config->client_cert_file);
- if (config->private_key_file)
+ if (config->private_key_file != NULL)
__connman_service_set_string(service, "PrivateKeyFile",
config->private_key_file);
if (g_strcmp0(config->private_key_passphrase_type, "fsid") == 0 &&
- config->private_key_file) {
+ config->private_key_file != NULL) {
char *fsid;
fsid = config_pem_fsid(config->private_key_file);
@@ -426,7 +426,7 @@ static void provision_service(gpointer key, gpointer value, gpointer user_data)
config->private_key_passphrase = fsid;
}
- if (config->private_key_passphrase) {
+ if (config->private_key_passphrase != NULL) {
__connman_service_set_string(service, "PrivateKeyPassphrase",
config->private_key_passphrase);
/*
@@ -436,11 +436,9 @@ static void provision_service(gpointer key, gpointer value, gpointer user_data)
* service passphrase in order for the UI to request for an
* additional passphrase.
*/
- __connman_service_set_string(service, "Passphrase",
- config->private_key_passphrase);
}
- if (config->phase2)
+ if (config->phase2 != NULL)
__connman_service_set_string(service, "Phase2", config->phase2);
}