diff --git a/configure.ac b/configure.ac index 2ac59784..55c29d7d 100644 --- a/configure.ac +++ b/configure.ac @@ -110,10 +110,6 @@ AC_ARG_WITH(console, AS_HELP_STRING([--with-console=DEV], [Console to use, default: /dev/console]), [console=$withval], [console=/dev/console]) -AC_ARG_WITH(username, - AS_HELP_STRING([--with-username=USER], [User for 'startx' .conf option, default: root]), - [username=$withval], [username=root]) - AC_ARG_WITH(hostname, AS_HELP_STRING([--with-hostname=NAME], [If /etc/hostname is missing, default: noname]), [hostname=$withval], [hostname=noname]) @@ -190,11 +186,6 @@ AS_IF([test "x$with_console" != "xno"], [ console=/dev/console])]) AC_DEFINE_UNQUOTED(CONSOLE, "$console", [Default console to use]) -AS_IF([test "x$with_username" != "xno"], [ - AS_IF([test "x$username" = "xyes"], [ - username=root])]) -AC_DEFINE_UNQUOTED(DEFUSER, "$username", [Used for startx .conf option]) - AS_IF([test "x$with_hostname" != "xno"], [ AS_IF([test "x$hostname" = "xyes"], [ hostname=noname])]) @@ -247,7 +238,6 @@ Optional features: Remount / RW at boot..: $enable_rw_rootfs Traditional progress..: $enable_progress Default console dev...: $console - Default user..........: $username Default hostname......: $hostname Default runlevel......: $runlevel diff --git a/plugins/x11-common.c b/plugins/x11-common.c index 6d009f3f..de67721a 100644 --- a/plugins/x11-common.c +++ b/plugins/x11-common.c @@ -36,6 +36,7 @@ static void setup(void *arg) int fd; #endif char line[LINE_SIZE]; + const char *username = "nobody"; umask(0); diff --git a/src/conf.c b/src/conf.c index 37049c68..ceae6064 100644 --- a/src/conf.c +++ b/src/conf.c @@ -226,12 +226,6 @@ static void parse_static(char *line) char *x; char cmd[CMD_SIZE]; - if (MATCH_CMD(line, "user ", x)) { - if (username) free(username); - username = strdup(strip_line(x)); - return; - } - if (MATCH_CMD(line, "host ", x)) { if (hostname) free(hostname); hostname = strdup(strip_line(x)); @@ -283,11 +277,6 @@ static void parse_static(char *line) return; } - if (MATCH_CMD(line, "startx ", x)) { - service_register(SVC_TYPE_SERVICE, strip_line(x), NULL, username); - return; - } - if (MATCH_CMD(line, "shutdown ", x)) { if (sdown) free(sdown); sdown = strdup(strip_line(x)); @@ -529,7 +518,6 @@ void conf_reload_dynamic(void) int conf_parse_config(void) { - username = strdup(DEFUSER); hostname = strdup(DEFHOST); return parse_conf(FINIT_CONF); diff --git a/src/finit.c b/src/finit.c index a0a49cc4..63c018d8 100644 --- a/src/finit.c +++ b/src/finit.c @@ -54,7 +54,6 @@ int cfglevel = RUNLEVEL; /* Fallback if no configured runlevel */ int prevlevel = -1; char *sdown = NULL; char *network = NULL; -char *username = NULL; char *hostname = NULL; char *rcsd = FINIT_RCSD; char *runparts = NULL; diff --git a/src/finit.h b/src/finit.h index f8fe51a3..fcd93c3d 100644 --- a/src/finit.h +++ b/src/finit.h @@ -97,7 +97,6 @@ extern char *rcsd; extern char *sdown; extern char *network; extern char *hostname; -extern char *username; extern char *runparts; extern char *console; extern uev_ctx_t *ctx;