... | ... |
@@ -365,6 +365,9 @@ |
365 | 365 |
/* Define to 1 if sysconf(_SC_PAGESIZE) is available */ |
366 | 366 |
#undef HAVE_SYSCONF_SC_PAGESIZE |
367 | 367 |
|
368 |
+/* Define to 1 if you have the `sysctlbyname' function. */ |
|
369 |
+#undef HAVE_SYSCTLBYNAME |
|
370 |
+ |
|
368 | 371 |
/* Define to 1 if you have the <sys/dl.h> header file. */ |
369 | 372 |
#undef HAVE_SYS_DL_H |
370 | 373 |
|
... | ... |
@@ -454,6 +454,8 @@ int main(int argc, char **argv) |
454 | 454 |
if (strcmp(p, "default")) { |
455 | 455 |
if (!strcmp(p, "none")) { |
456 | 456 |
cl_engine_set_clcb_stats_get_hostid(engine, NULL); |
457 |
+ } else if (!strcmp(p, "anonymous")) { |
|
458 |
+ strcpy(hostid, STATS_ANON_UUID); |
|
457 | 459 |
} else { |
458 | 460 |
if (strlen(p) > 36) { |
459 | 461 |
logg("!Invalid HostID\n"); |
... | ... |
@@ -462,7 +464,11 @@ int main(int argc, char **argv) |
462 | 462 |
ret = 1; |
463 | 463 |
break; |
464 | 464 |
} |
465 |
+ |
|
466 |
+ strcpy(hostid, p); |
|
465 | 467 |
} |
468 |
+ |
|
469 |
+ cl_engine_set_clcb_stats_get_hostid(engine, get_hostid); |
|
466 | 470 |
} |
467 | 471 |
} |
468 | 472 |
|
... | ... |
@@ -596,6 +596,8 @@ int scanmanager(const struct optstruct *opts) |
596 | 596 |
if (strcmp(p, "default")) { |
597 | 597 |
if (!strcmp(p, "none")) { |
598 | 598 |
cl_engine_set_clcb_stats_get_hostid(engine, NULL); |
599 |
+ } else if (!strcmp(p, "anonymous")) { |
|
600 |
+ strcpy(hostid, STATS_ANON_UUID); |
|
599 | 601 |
} else { |
600 | 602 |
if (strlen(p) > 36) { |
601 | 603 |
logg("!Invalid HostID\n"); |
... | ... |
@@ -606,6 +608,8 @@ int scanmanager(const struct optstruct *opts) |
606 | 606 |
|
607 | 607 |
strcpy(hostid, p); |
608 | 608 |
} |
609 |
+ |
|
610 |
+ cl_engine_set_clcb_stats_get_hostid(engine, get_hostid); |
|
609 | 611 |
} |
610 | 612 |
} |
611 | 613 |
|
... | ... |
@@ -15740,6 +15740,17 @@ _ACEOF |
15740 | 15740 |
fi |
15741 | 15741 |
done |
15742 | 15742 |
|
15743 |
+for ac_func in sysctlbyname |
|
15744 |
+do : |
|
15745 |
+ ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname" |
|
15746 |
+if test "x$ac_cv_func_sysctlbyname" = xyes; then : |
|
15747 |
+ cat >>confdefs.h <<_ACEOF |
|
15748 |
+#define HAVE_SYSCTLBYNAME 1 |
|
15749 |
+_ACEOF |
|
15750 |
+ |
|
15751 |
+fi |
|
15752 |
+done |
|
15753 |
+ |
|
15743 | 15754 |
|
15744 | 15755 |
# Check whether --enable-mempool was given. |
15745 | 15756 |
if test "${enable_mempool+set}" = set; then : |
... | ... |
@@ -350,13 +350,17 @@ main (int argc, char **argv) |
350 | 350 |
char *p = optget(opts, "stats-host-id")->strarg; |
351 | 351 |
|
352 | 352 |
if (strcmp(p, "default")) { |
353 |
- if (strlen(p) > 36) { |
|
354 |
- logg("!Invalid HostID\n"); |
|
355 |
- optfree(opts); |
|
356 |
- return FCE_INIT; |
|
357 |
- } |
|
353 |
+ if (!strcmp(p, "anonymous")) { |
|
354 |
+ strcpy(hostid, STATS_ANON_UUID); |
|
355 |
+ } else { |
|
356 |
+ if (strlen(p) > 36) { |
|
357 |
+ logg("!Invalid HostID\n"); |
|
358 |
+ optfree(opts); |
|
359 |
+ return FCE_INIT; |
|
360 |
+ } |
|
358 | 361 |
|
359 |
- strcpy(hostid, p); |
|
362 |
+ strcpy(hostid, p); |
|
363 |
+ } |
|
360 | 364 |
} else { |
361 | 365 |
strcpy(hostid, "default"); |
362 | 366 |
} |