Commit 817b7f60 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move the defaults for ${user} and ${group} over with the other

run-time determined defaults.
parent 78fd62b7
......@@ -36,6 +36,8 @@
#include <ctype.h>
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -415,6 +417,12 @@ main(int argc, char * const *argv)
MCF_CollectParams();
/* If we have nobody/nogroup, use them as defaults */
if (getpwnam("nobody") != NULL)
MCF_SetDefault("user", "nobody");
if (getgrnam("nogroup") != NULL)
MCF_SetDefault("group", "nogroup");
if (sizeof(void *) < 8) {
/*
* Adjust default parameters for 32 bit systems to conserve
......
......@@ -30,10 +30,7 @@
#include "config.h"
#include <ctype.h>
#include <grp.h>
#include <limits.h>
#include <math.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -415,12 +412,6 @@ MCF_CollectParams(void)
MCF_AddParams(mgt_parspec);
MCF_AddParams(WRK_parspec);
MCF_AddParams(VSL_parspec);
/* If we have nobody/nogroup, use them as defaults */
if (getpwnam("nobody") != NULL)
MCF_SetDefault("user", "nobody");
if (getgrnam("nogroup") != NULL)
MCF_SetDefault("group", "nogroup");
}
/*--------------------------------------------------------------------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment