Deleted Added
full compact
config.c (156119) config.c (156123)
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
7 * $FreeBSD: head/usr.sbin/sysinstall/config.c 156119 2006-02-28 20:34:50Z jhb $
7 * $FreeBSD: head/usr.sbin/sysinstall/config.c 156123 2006-02-28 21:49:33Z jhb $
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 247 unchanged lines hidden (view full) ---

263}
264
265/* Do the work of sucking in a config file.
266 * config is the filename to read in.
267 * lines is a fixed (max) sized array of char*
268 * returns number of lines read. line contents
269 * are malloc'd and must be freed by the caller.
270 */
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 247 unchanged lines hidden (view full) ---

263}
264
265/* Do the work of sucking in a config file.
266 * config is the filename to read in.
267 * lines is a fixed (max) sized array of char*
268 * returns number of lines read. line contents
269 * are malloc'd and must be freed by the caller.
270 */
271int
271static int
272readConfig(char *config, char **lines, int max)
273{
274 FILE *fp;
275 char line[256];
276 int i, nlines;
277
278 fp = fopen(config, "r");
279 if (!fp)

--- 321 unchanged lines hidden (view full) ---

601{
602
603 variable_set2("kern_securelevel_enable", "YES", 1);
604 variable_set2("kern_securelevel", "3", 1);
605 return DITEM_SUCCESS;
606}
607
608int
272readConfig(char *config, char **lines, int max)
273{
274 FILE *fp;
275 char line[256];
276 int i, nlines;
277
278 fp = fopen(config, "r");
279 if (!fp)

--- 321 unchanged lines hidden (view full) ---

601{
602
603 variable_set2("kern_securelevel_enable", "YES", 1);
604 variable_set2("kern_securelevel", "3", 1);
605 return DITEM_SUCCESS;
606}
607
608int
609configSecurity(dialogMenuItem *self)
610{
611 WINDOW *w = savescr();
612
613 dialog_clear_norefresh();
614 dmenuOpenSimple(&MenuSecurity, FALSE);
615 restorescr(w);
616 return DITEM_SUCCESS;
617}
618
619int
620configResolv(dialogMenuItem *ditem)
621{
622 FILE *fp;
623 char *cp, *c6p, *dp, *hp;
624
625 cp = variable_get(VAR_NAMESERVER);
626 if (!cp || !*cp)
627 goto skip;

--- 470 unchanged lines hidden ---
609configResolv(dialogMenuItem *ditem)
610{
611 FILE *fp;
612 char *cp, *c6p, *dp, *hp;
613
614 cp = variable_get(VAR_NAMESERVER);
615 if (!cp || !*cp)
616 goto skip;

--- 470 unchanged lines hidden ---