~ubuntu-branches/ubuntu/lucid/wpasupplicant/lucid-updates

« back to all changes in this revision

Viewing changes to config_file.c

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2006-10-05 08:04:01 UTC
  • mfrom: (1.1.5 upstream) (3 etch)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061005080401-r8lqlix4390yos7b
Tags: 0.5.5-2
* Update madwifi headers to latest SVN. (Closes: #388316)
* Remove failed attempt at action locking. [debian/functions.sh,
  debian/wpa_action.sh]
* Add hysteresis checking functions, to avoid "event loops" while
  using wpa-roam. [debian/functions.sh, debian/wpa_action.sh]
* Change of co-maintainer email address.
* Add ishex() function to functions.sh to determine wpa-psk value type in
  plaintext or hex. This effectively eliminates the need for the bogus and
  somewhat confusing wpa-passphrase contruct specific to our scripts and
  allows wpa-psk to work with either a 8 to 63 character long plaintext
  string or 64 character long hex string.
* Adjust README.modes to not refer to the redundant wpa-passphrase stuff.
* Add big fat NOTE about acceptable wpa-psk's to top of example gallery.
* Strip surrounding quotes from wpa-ssid if present, instead of just whining
  about them.
* Update email address in copyright blurb of functions.sh, ifupdown.sh and
  wpa_action.sh.  

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
                        config->ctrl_interface = strdup(pos + 15);
281
281
                        wpa_printf(MSG_DEBUG, "ctrl_interface='%s'",
282
282
                                   config->ctrl_interface);
283
 
#ifndef CONFIG_CTRL_IFACE_UDP
284
283
                } else if (strncmp(pos, "ctrl_interface_group=", 21) == 0) {
285
 
                        struct group *grp;
286
 
                        char *endp;
287
 
                        const char *group = pos + 21;
288
 
 
289
 
                        grp = getgrnam(group);
290
 
                        if (grp) {
291
 
                                config->ctrl_interface_gid = grp->gr_gid;
292
 
                                config->ctrl_interface_gid_set = 1;
293
 
                                wpa_printf(MSG_DEBUG, "ctrl_interface_group=%d"
294
 
                                           " (from group name '%s')",
295
 
                                           (int) config->ctrl_interface_gid,
296
 
                                           group);
297
 
                                continue;
298
 
                        }
299
 
 
300
 
                        /* Group name not found - try to parse this as gid */
301
 
                        config->ctrl_interface_gid = strtol(group, &endp, 10);
302
 
                        if (*group == '\0' || *endp != '\0') {
303
 
                                wpa_printf(MSG_DEBUG, "Line %d: Invalid group "
304
 
                                           "'%s'", line, group);
305
 
                                errors++;
306
 
                                continue;
307
 
                        }
308
 
                        config->ctrl_interface_gid_set = 1;
309
 
                        wpa_printf(MSG_DEBUG, "ctrl_interface_group=%d",
310
 
                                   (int) config->ctrl_interface_gid);
311
 
#endif /* CONFIG_CTRL_IFACE_UDP */
 
284
                        free(config->ctrl_interface_group);
 
285
                        config->ctrl_interface_group = strdup(pos + 21);
 
286
                        wpa_printf(MSG_DEBUG, "ctrl_interface_group='%s' "
 
287
                                   "(DEPRECATED)",
 
288
                                   config->ctrl_interface_group);
312
289
#endif /* CONFIG_CTRL_IFACE */
313
290
                } else if (strncmp(pos, "eapol_version=", 14) == 0) {
314
291
                        config->eapol_version = atoi(pos + 14);
623
600
        INT(mode);
624
601
        INT(proactive_key_caching);
625
602
        INT(disabled);
 
603
        INT(stakey);
 
604
        INT(peerkey);
 
605
        STR(id_str);
626
606
 
627
607
#undef STR
628
608
#undef INT
663
643
#ifdef CONFIG_CTRL_IFACE
664
644
        if (config->ctrl_interface)
665
645
                fprintf(f, "ctrl_interface=%s\n", config->ctrl_interface);
666
 
#ifndef CONFIG_CTRL_IFACE_UDP
667
 
        if (config->ctrl_interface_gid_set) {
668
 
                fprintf(f, "ctrl_interface_group=%d\n",
669
 
                        (int) config->ctrl_interface_gid);
670
 
        }
671
 
#endif /* CONFIG_CTRL_IFACE_UDP */
 
646
        if (config->ctrl_interface_group)
 
647
                fprintf(f, "ctrl_interface_group=%s\n",
 
648
                        config->ctrl_interface_group);
672
649
#endif /* CONFIG_CTRL_IFACE */
673
650
        if (config->eapol_version != DEFAULT_EAPOL_VERSION)
674
651
                fprintf(f, "eapol_version=%d\n", config->eapol_version);