- dbprintf(("%s: version %s\n", debug_prefix_time(NULL), version()));
-
- malloc_size_1 = malloc_inuse(&malloc_hist_1);
-
-#if 0
- erroutput_type = (ERR_INTERACTIVE|ERR_SYSLOG);
+ config_init(CONFIG_INIT_CLIENT, NULL);
+ dbprintf(_("version %s\n"), VERSION);
+
+ /* drop root privileges; we'll regain them for the required operations */
+#ifdef WANT_SETUID_CLIENT
+ check_running_as(RUNNING_AS_CLIENT_LOGIN | RUNNING_AS_UID_ONLY);
+ if (!set_root_privs(0)) {
+ error(_("calcsize must be run setuid root"));
+ }
+#else
+ check_running_as(RUNNING_AS_CLIENT_LOGIN);