summaryrefslogtreecommitdiff
path: root/app/xenodm
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-03-16 15:45:06 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-03-16 15:45:06 +0000
commit1f33e788036d2571873a0f3dc146d5aba7549095 (patch)
tree3b08ff4009e0a8760e16de5d42a6a593b544a3fc /app/xenodm
parentf7a144bf6a9b50ce0aa45d04ddda47a640ad6efe (diff)
Fix confusion in boolean resources parsing.
This caused wrong resources values on big endian machines.
Diffstat (limited to 'app/xenodm')
-rw-r--r--app/xenodm/include/dm.h14
-rw-r--r--app/xenodm/xenodm/resource.c12
2 files changed, 13 insertions, 13 deletions
diff --git a/app/xenodm/include/dm.h b/app/xenodm/include/dm.h
index a7ba732f5..4c58deb2b 100644
--- a/app/xenodm/include/dm.h
+++ b/app/xenodm/include/dm.h
@@ -98,11 +98,11 @@ struct display {
int startAttempts; /* number of attempts at starting */
int reservAttempts; /* allowed start-IO error sequences */
bool terminateServer;/* restart for each session */
- int grabServer; /* keep server grabbed for Login */
+ bool grabServer; /* keep server grabbed for Login */
int grabTimeout; /* time to wait for grab */
int resetSignal; /* signal to reset server */
int termSignal; /* signal to terminate server */
- int resetForAuth; /* server reads auth file at reset */
+ bool resetForAuth; /* server reads auth file at reset */
char *keymaps; /* binary compat with DEC */
/* session resources */
@@ -122,8 +122,8 @@ struct display {
char **authNames; /* authorization protocol names */
unsigned short *authNameLens; /* authorization protocol name lens */
char *clientAuthFile;/* client specified auth file */
- int authComplain; /* complain when no auth for XDMCP */
- int listenTcp; /* assume server is listening on TCP */
+ bool authComplain; /* complain when no auth for XDMCP */
+ bool listenTcp; /* assume server is listening on TCP */
/* information potentially derived from resources */
int authNameNum; /* number of protocol names */
@@ -179,10 +179,10 @@ extern char *servers;
extern int request_port;
extern int debugLevel;
extern char *errorLogFile;
-extern int daemonMode;
+extern bool daemonMode;
extern char *authDir;
-extern int autoRescan;
-extern int removeDomainname;
+extern bool autoRescan;
+extern bool removeDomainname;
extern char **exportList;
extern struct display *FindDisplayByName (char *name),
diff --git a/app/xenodm/xenodm/resource.c b/app/xenodm/xenodm/resource.c
index f1b220b69..a079bb95f 100644
--- a/app/xenodm/xenodm/resource.c
+++ b/app/xenodm/xenodm/resource.c
@@ -45,11 +45,11 @@ char *servers;
int request_port;
int debugLevel;
char *errorLogFile;
-int daemonMode;
-int sourceAddress;
+bool daemonMode;
+bool sourceAddress;
char *authDir;
-int autoRescan;
-int removeDomainname;
+bool autoRescan;
+bool removeDomainname;
char **exportList;
#define DM_STRING 0
@@ -267,11 +267,11 @@ GetResource (
if (!strcmp (str_buf, "true") ||
!strcmp (str_buf, "on") ||
!strcmp (str_buf, "yes"))
- *((int *) valuep) = 1;
+ *((bool *) valuep) = true;
else if (!strcmp (str_buf, "false") ||
!strcmp (str_buf, "off") ||
!strcmp (str_buf, "no"))
- *((int *) valuep) = 0;
+ *((bool *) valuep) = false;
break;
case DM_ARGV:
freeArgs (*(char ***) valuep);