Fix #77: Remove deprecated startx and user .conf settings

It is strongly recommended to instead use the service stanza to start
XDM/GDM, or use startx after a regular login.

Note: the `user NAME` setting was always reserved for use with startx

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-08-30 15:01:05 +02:00
parent 1de540dd67
commit a2f4b35e4e
5 changed files with 1 additions and 24 deletions
-10
View File
@@ -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
+1
View File
@@ -36,6 +36,7 @@ static void setup(void *arg)
int fd;
#endif
char line[LINE_SIZE];
const char *username = "nobody";
umask(0);
-12
View File
@@ -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);
-1
View File
@@ -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;
-1
View File
@@ -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;