[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 2/5] remove key-files writing in loader (no more needed, NM does it itself)



---
 loader/net.c |   50 --------------------------------------------------
 1 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/loader/net.c b/loader/net.c
index e011222..46476ea 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1470,14 +1470,6 @@ int writeEnabledNetInfo(iface_t *iface) {
         logMessage(INFO, "not setting default route via %s", iface->device);
     }
 
-    if (iface->ssid) {
-        fprintf(fp, "ESSID=%s\n", iface->ssid);
-    }
-
-    if (iface->wepkey) {
-        fprintf(fp, "DEFAULTKEY=1");
-    }
-
     if (fclose(fp) == EOF) {
         free(ofile);
         free(nfile);
@@ -1498,48 +1490,6 @@ int writeEnabledNetInfo(iface_t *iface) {
         free(nfile);
     }
 
-    /* wireless wepkey: keys-DEVICE file */
-    if (iface->wepkey) {
-        if (asprintf(&ofile, "%s/.keys-%s",
-                     NETWORK_SCRIPTS_PATH, iface->device) == -1) {
-            return 21;
-        }
-
-        if (asprintf(&nfile, "%s/keys-%s",
-                     NETWORK_SCRIPTS_PATH, iface->device) == -1) {
-            return 22;
-        }
-
-        if ((fp = fopen(ofile, "w")) == NULL) {
-            free(ofile);
-            return 23;
-        }
-
-        fprintf(fp, "KEY1=%s\n", iface->wepkey);
-
-
-        if (fclose(fp) == EOF) {
-            free(ofile);
-            free(nfile);
-            return 24;
-        }
-
-        if (rename(ofile, nfile) == -1) {
-            free(ofile);
-            free(nfile);
-            return 25;
-        }
-
-        if (ofile) {
-            free(ofile);
-        }
-
-        if (nfile) {
-            free(nfile);
-        }
-    }
-
-
     return 0;
 }
 
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]