48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
-
-
|
dataval = data;
*dataval = strdup(value);
return(0);
}
static int lc_process_var_cidr(void *data, const char *value) {
return(0);
}
static int lc_process_var_ip(void *data, const char *value) {
uint32_t *dataval = NULL, retval = 0;
const char *dotptr = NULL;
int tmpval = -1;
|
278
279
280
281
282
283
284
285
286
287
288
289
290
291
|
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
|
+
+
+
|
break;
case LC_VAR_SIZE_SIZE_T:
return(lc_process_var_sizesizet(data, value));
break;
case LC_VAR_IP:
return(lc_process_var_ip(data, value));
break;
case LC_VAR_CIDR:
return(lc_process_var_cidr(data, value));
break;
case LC_VAR_TIME:
case LC_VAR_DATE:
case LC_VAR_FILENAME:
case LC_VAR_DIRECTORY:
#ifdef DEBUG
fprintf(stderr, "Not implemented yet!\n");
#endif
|
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
|
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
|
+
+
|
break;
}
return(chkretval);
}
static int lc_process_files(const char *appname, lc_conf_type_t type, const char *extraconfig) {
#ifdef HAVE_GETPWUID
struct passwd *pwinfo = NULL;
#endif
char configfiles[3][13][512] = {{{0}}};
char *configfile = NULL;
char *homedir = NULL;
int configsetidx = 0, configidx = 0;
int chkretval = 0, retval = 0;
if (extraconfig != NULL) {
|