Jon Trulson [Tue, 24 Mar 2020 23:54:47 +0000 (17:54 -0600)]
app-defaults, config, types: re-enable parallel builds
With a fixed merge utility, we can run these builds in parallel now
without random corruption of the message files.
Jon Trulson [Tue, 24 Mar 2020 23:51:24 +0000 (17:51 -0600)]
merge: fix to use per-proc filenames rather than hardcoding them
The localized/utils/merge utility used hardcoded temporary filenames
to do its thing. This prevented any Makefiles that called merge from
enabling parallel builds in order avoid the file collisions that would
result.
Now we:
- use filenames that embed the PID in them, making them unique
per-process
- place them in /tmp, rather than the current directory
As a result, we can now re-enable parallel builds for localized
app-defaults, config, and types.
Jon Trulson [Tue, 24 Mar 2020 23:45:36 +0000 (17:45 -0600)]
.gitignore: add config numbered session files
Jon Trulson [Tue, 24 Mar 2020 20:53:07 +0000 (14:53 -0600)]
appmanager action files: create and populate them
The appmanager action files (/usr/dt/appconfig/appmanager/*) are now
created properly for the main 4 languages supported. As usual, the
en_US.UTF-8 locale is a symlink to C.
These files were previously created via the UDB database files via
imake. Obviously we aren't going to be using those in autotools.
So, each language now has an appmanager/ dir in
programs/localized/$LANG/ that will create them properly on a make and
make install. It uses a new appmgr.am template in localized/templates
to do this.
This also means all of these languages now can use the new actions
added by Antonis, even though they are not translated, they are at
least usable in those languages now.
Jon Trulson [Tue, 24 Mar 2020 17:34:51 +0000 (11:34 -0600)]
tt: fix link order for tt_type_comp and dbck
These caused link errors on Gentoo, maybe other systems.
Patch by Peter G.
Jon Trulson [Mon, 23 Mar 2020 19:51:01 +0000 (13:51 -0600)]
dthelp: get parts of it building.
This was a patch from Peter G, though modified a bit regarding the
LDADDs the way we do them now.
Jon Trulson [Mon, 23 Mar 2020 19:44:34 +0000 (13:44 -0600)]
dthelpdemo: remove old Makefile.SUN, .IBM, and .HP
Jon Trulson [Mon, 23 Mar 2020 19:31:34 +0000 (13:31 -0600)]
Build nsgmls
Patch from Peter G.
Note, this is temporary - eventually we will want to use the system
nsgmls/onsgmls to handle this and remove our ancient copy of nsgmls.
Jon Trulson [Mon, 23 Mar 2020 19:27:06 +0000 (13:27 -0600)]
configure: enable building of nsgmls and parts of dthelp
Patch by Peter G.
Jon Trulson [Mon, 23 Mar 2020 19:10:07 +0000 (13:10 -0600)]
Fix erroneous uses of ${prefix} rather than $(CDE_INSTALLATION_TOP)
Some Makefiles use prefix when they should be using
CDE_INSTALLATION_TOP.
Patch by Peter G.
Jon Trulson [Mon, 23 Mar 2020 19:00:54 +0000 (13:00 -0600)]
Use bindir in install hooks rather than CDE_INSTALLATION_TOP
Patch supplied by Peter G.
Jon Trulson [Mon, 23 Mar 2020 18:55:32 +0000 (12:55 -0600)]
Merge branch 'master' into autotools-conversion
Jon Trulson [Mon, 23 Mar 2020 18:51:18 +0000 (12:51 -0600)]
Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
patch supplied from Peter G.
Jon Trulson [Mon, 23 Mar 2020 01:09:58 +0000 (19:09 -0600)]
Merge branch 'master' into autotools-conversion
Jon Trulson [Sun, 8 Mar 2020 21:05:48 +0000 (15:05 -0600)]
dtksh: fix 32b/64b issues with XmTextGetString and XmTextFieldGetString
Some of these functions were returning pointers cast as integers,
which of course is bad on a 64b LP64 systems.
This code should probably just be refactored at some point. There may
be other hidden issues, and all the casting just sucks.
Jon Trulson [Sat, 8 Feb 2020 23:16:13 +0000 (16:16 -0700)]
desktopentry/README: Clarify that the login manager is responsible for setting language
Jon Trulson [Sat, 8 Feb 2020 23:12:31 +0000 (16:12 -0700)]
Revert "Add a new contrib/desktopentry-setlang/ mechanism"
This reverts commit
08b6281f60ab543510d9b4c74c81d1d8c9391906.
The Login manager is reponsible for setting the correct language
(LANG, etc) information before starting a CDE session.
Peter Howkins [Fri, 7 Feb 2020 02:26:02 +0000 (02:26 +0000)]
Support pkg-config for detecting freetype2 includes and libs. Fixes Ubuntu 19.10 missing the freetype-config binary.
Jon Trulson [Sun, 26 Jan 2020 19:22:09 +0000 (12:22 -0700)]
SrvPalette.c: missed a merge conflict in SrvPalette.c
Jon Trulson [Sun, 26 Jan 2020 19:17:44 +0000 (12:17 -0700)]
Merge branch 'master' into autotools-conversion
Chase [Tue, 21 Jan 2020 23:11:19 +0000 (17:11 -0600)]
Remove redundant hourglass functions
Jon Trulson [Sun, 26 Jan 2020 18:54:38 +0000 (11:54 -0700)]
Add a new contrib/desktopentry-setlang/ mechanism
This was supplied by Antonis Tsolomitis
<antonis.tsolomitis@gmail.com>, and allows you to hardcode a LANG
setting before starting up CDE, if your login manager does not do that
for you.
Jon Trulson [Sun, 12 Jan 2020 02:30:51 +0000 (19:30 -0700)]
dtsession, DtSvc: fix CVE-2020-2696/VU#308289
Marco Ivaldi <marco.ivaldi@mediaservice.net> has identified 3
vulnerabilities in CDE.
Two of them could affect our CDE (open-source version), while the 3rd
(sdtcm_convert) is Solaris specific.
The two vulnerabilities, both of which affect dtsession could allow a
local privilege escalation to root. A POC exists for Solaris. The
POC will not function on our CDE for two main reasons:
- the POC is Solaris specific
- The overflowed variables in question are allocated on the heap,
whereas in Solaris these variables are located on the stack.
The first vulnerability allows an extra long palette name to be used
to cause a crash via insufficient validation in
SrvPalette.c:CheckMonitor().
The second, which has not yet been assigned a CERT CVE resides in
SmCreateDirs.c:_DtCreateDtDirs() in libDtSvc. Due to insufficient
bounds checking, a crash or corruption can be achieved by using a very
long DISPLAY name.
This one is considered difficult to exploit, and no POC code is
available at this time. CDE 2.x code-bases are also listed as not
vulnerable, however some work has been done anyway to do some proper
bounds checking in this function.
The following text portions are copied from the relevant advisories,
which have not been released as of this writing.
NOTE: Oracle CDE does NOT use CDE 2.3.0a or earlier as mentioned
below. They are completely different code-bases):
Regarding CVE-2020-2692:
A buffer overflow in the CheckMonitor() function in the Common
Desktop Environment 2.3.0a and earlier, as distributed with Oracle
Solaris 10 1/13 (Update 11) and earlier, allows local users to gain
root privileges via a long palette name passed to dtsession in a
malicious .Xdefaults file.
Note that Oracle Solaris CDE is based on the original CDE 1.x train,
which is different from the CDE 2.x codebase that was later open
sourced. Most notably, the vulnerable buffer in the Oracle Solaris
CDE is stack-based, while in the open source version it is
heap-based.
Regarding the DtSvc bug, which does not currently have a CERT CVE:
A difficult to exploit stack-based buffer overflow in the
_DtCreateDtDirs() function in the Common Desktop Environment version
distributed with Oracle Solaris 10 1/13 (Update 11) and earlier may
allow local users to corrupt memory and potentially execute
arbitrary code in order to escalate privileges via a long X11
display name. The vulnerable function is located in the libDtSvc
library and can be reached by executing the setuid program
dtsession.
The open source version of CDE (based on the CDE 2.x codebase) is
not affected.
Jon Trulson [Sun, 12 Jan 2020 01:21:37 +0000 (18:21 -0700)]
DtSvc: always use vsnprintf
There was code (_DtSimpleError() and _DtSimpleErrornoError()) that
only used snprintf when USE_SNPRINTF was defined, which it never was
of course. We just remove the 2 checks and always use [v]snprintf.
Jon Trulson [Mon, 6 Jan 2020 03:53:03 +0000 (20:53 -0700)]
dtterm, dtsession, dtappgather, dtmail: set correct perms on make install
Jon Trulson [Mon, 6 Jan 2020 00:49:02 +0000 (17:49 -0700)]
freetype: redo the way we detect and use
We (configure) relies on freetype-config existing and telling us what
the proper includes and libs are.
Jon Trulson [Sun, 5 Jan 2020 23:20:35 +0000 (16:20 -0700)]
configure: detect and use jpeg library
Jon Trulson [Sat, 4 Jan 2020 16:23:40 +0000 (09:23 -0700)]
FreeBSD 12: get CDE to build and run
With this patch, CDE (autotools) builds and runs on fbsd 12 now.
fbsd11 should work too, but not yet tested.
You must use gmake - ie:
./configure MAKE=gmake
gmake
Seems all of the BSD's will need to use gmake for now.
Jon Trulson [Sat, 4 Jan 2020 21:36:06 +0000 (14:36 -0700)]
FreeBSD 12/libDtHelp: fix link errors with missing libjpeg
Jon Trulson [Fri, 3 Jan 2020 05:14:23 +0000 (22:14 -0700)]
configure: get the language enable options working
Jon Trulson [Fri, 3 Jan 2020 02:14:16 +0000 (19:14 -0700)]
configure: fix some bsd issues
1. On OpenBSD, and check is made for only bison or byacc. yacc is
present, but not usable apparently. So - need to install bison on the
BSD's.
2. the libjpeg.h check fails as it is located in a non-standard
location (/usr/local) on BSD systems. Just remove the check for now
until we have a better way to check that stuff (like X11 and Xm
headers too).
Jon Trulson [Fri, 3 Jan 2020 01:28:02 +0000 (18:28 -0700)]
configure: add some more error checking/reporting for required programs
A list of major things like ksh, cpp, etc are saved in a list if they
are not found. If this list is non-empty when configure is nearly
done, an error message is displayed listing the missing programs.
This is less annoying than stopping after every missing programs.
Also, removed the X11/Xm header checks for now. Those need to take
into account X_CFLAGS in some way since these files are located in
dirfferent areas on different OS's (obsd puts them in
/usr/X11R6/include for example).
Jon Trulson [Mon, 16 Dec 2019 00:36:19 +0000 (17:36 -0700)]
configure: make sure X_EXTRA_LIBS and X_PRE_LIBS are accounted for
Peter Howkins [Thu, 2 Jan 2020 23:59:53 +0000 (23:59 +0000)]
Add a few configure checks to make sure various programs and headers
needed for build are available.
Jon Trulson [Sun, 15 Dec 2019 22:18:41 +0000 (15:18 -0700)]
Merge branch 'master' into autotools-conversion
Chase [Sun, 15 Dec 2019 21:02:21 +0000 (15:02 -0600)]
extra.h: remove unused prototypes
Chase [Sun, 15 Dec 2019 16:28:22 +0000 (10:28 -0600)]
dtksh: remove needless OS defines
Chase [Sun, 15 Dec 2019 16:22:54 +0000 (10:22 -0600)]
dtkcmds.c: avoid c99 collision
Chase [Sun, 15 Dec 2019 16:19:37 +0000 (10:19 -0600)]
dtksh: remove unused files and functions
Jon Trulson [Sun, 15 Dec 2019 19:47:57 +0000 (12:47 -0700)]
configure: set a compiler search option
... and move the PROG_CC and PROG_CXX checks toward the beginning.
Without the move the compiler search arguments are ignored. We search
for 'cc gcc clang' and 'c++ g++ clang++', in that order for CC and CXX
respectively.
This means there should be no need to override the CC
and CXX variables on the configure command line for BSD systems.
On OpenBSD for example, cc links to clang. On Linux, cc links to
gcc. You can still override these if you like with CC=... and
CXX=... on the configure command line.
gmake (MAKE=gmake) still needs to be used on the BSD's though.
With these and previous changes, CDE builds, installs, and runs
correctly on OpenBSD 6.5 now.
Jon Trulson [Sun, 15 Dec 2019 19:34:00 +0000 (12:34 -0700)]
_common.dt.tmsg: remove unportable quote hackery
Jon Trulson [Sun, 15 Dec 2019 02:58:34 +0000 (19:58 -0700)]
localized: use proper mkcatdefs for the Motif catalogs
Jon Trulson [Sun, 15 Dec 2019 02:14:52 +0000 (19:14 -0700)]
dtsession: do not hardcode -lcrypt on link
Jon Trulson [Sun, 15 Dec 2019 02:05:35 +0000 (19:05 -0700)]
gencat: get rid of -o option, not needed and not supported on some systems
Jon Trulson [Sun, 15 Dec 2019 02:04:22 +0000 (19:04 -0700)]
configure: fix another bsd related typo
Jon Trulson [Sun, 15 Dec 2019 01:22:49 +0000 (18:22 -0700)]
dtlogin: build on openbsd
Jon Trulson [Sat, 14 Dec 2019 21:21:41 +0000 (14:21 -0700)]
dtopen/Makefile.am: fix typo in link for pdf handler
Jon Trulson [Sat, 14 Dec 2019 02:01:21 +0000 (19:01 -0700)]
configure: first stab at a BSD (openbsd 6.5) build
Jon Trulson [Thu, 5 Dec 2019 01:24:04 +0000 (18:24 -0700)]
dtopen: install symlinked helpers
With this commit, CDE can install and run now. There are still some
programs/ that are not yet built:
dthelp dtksh dtappbuilder dtdocbook dtinfo nsgmls ttsnoop
and of course documentation (doc/). But this is a great start. For
the first time, things build, install, AND run correctly :)
Jon Trulson [Thu, 5 Dec 2019 01:09:22 +0000 (18:09 -0700)]
library versioning: use proper format and specify for ALL libraries
Jon Trulson [Wed, 4 Dec 2019 23:36:09 +0000 (16:36 -0700)]
programs/Makefile.am: add missing palettes/ dir
Jon Trulson [Wed, 4 Dec 2019 22:47:28 +0000 (15:47 -0700)]
fontaliases: redo the way these are built, and actually install them
Use a common make include file to do most of the work and set the
appropriate LANG from localized/templates/ . This should simplify it
quite a bit and reduce duplication.
Also we were not even installing them, so now we are.
Jon Trulson [Wed, 4 Dec 2019 21:28:44 +0000 (14:28 -0700)]
cpp revisited: look for a cpp binary in various locations for use at runtime
Certain programs like dtlogin and tt_type_comp need access to the
system's cpp command to process certain files at runtime. tradcpp is
not installed on most systems, and is intended for use as a imake-cpp
replacement which is all we are using it for. We still need an
honest cpp for the CDE components to use.
Now, we look in various places for a 'cpp' command and set CPP_COMMAND
to it's value. This way tt_type_comp and other CDE programs can do
required processing at runtime.
Jon Trulson [Wed, 4 Dec 2019 20:43:18 +0000 (13:43 -0700)]
dtwm: don't install Dtwm.defs - that is processed/handled by localization
Jon Trulson [Wed, 4 Dec 2019 20:22:11 +0000 (13:22 -0700)]
icons: install in proper C/ subdir
Jon Trulson [Wed, 4 Dec 2019 20:21:31 +0000 (13:21 -0700)]
Fix palette and backdrops installation in dt/shared with proper symlinks
Jon Trulson [Wed, 4 Dec 2019 01:12:22 +0000 (18:12 -0700)]
tradcpp: upgrade to 0.5.3
Jon Trulson [Wed, 4 Dec 2019 00:14:32 +0000 (17:14 -0700)]
dtsession/SrvPalette.c: delete trailing whitespace
Jon Trulson [Wed, 4 Dec 2019 00:10:35 +0000 (17:10 -0700)]
dtsession/SrvPalette.c: fix bogus error handling when selection is lost
Jon Trulson [Tue, 3 Dec 2019 21:06:18 +0000 (14:06 -0700)]
dtlogin/dtsession: fix up some script perms, add proper OS defines
Jon Trulson [Tue, 3 Dec 2019 20:07:19 +0000 (13:07 -0700)]
dtlogin: set correct OS defines for Xsession, fix linux maildir
Jon Trulson [Tue, 3 Dec 2019 20:06:21 +0000 (13:06 -0700)]
videoTypes.dt: remove duplicate LABEL in Print action
Jon Trulson [Tue, 3 Dec 2019 06:01:28 +0000 (23:01 -0700)]
dtsession: add missing dtsession_res script
Jon Trulson [Tue, 3 Dec 2019 06:01:08 +0000 (23:01 -0700)]
dtwm: fix installation
Jon Trulson [Tue, 3 Dec 2019 06:00:16 +0000 (23:00 -0700)]
dtlogin: fixup some of the options
Jon Trulson [Tue, 3 Dec 2019 05:13:39 +0000 (22:13 -0700)]
dtlogin: install Xsession properly
Jon Trulson [Tue, 3 Dec 2019 02:59:44 +0000 (19:59 -0700)]
Get tttypes installed correctly.
There is a problem with CPP_PROGRAM - using $CPP or $GENCPP (tradcpp)
always fails in tt_type_comp with the error:
"nclude ", line 8: syntax error
If I define it to /lib/cpp (previous hardcoded value) then it seems to
work fine. Only the dtinfo and dtinfo_start ptypes use #include, and
therefore show this error. Needs investigation.
Jon Trulson [Tue, 3 Dec 2019 02:31:02 +0000 (19:31 -0700)]
Get the dt types installed properly on make install
Jon Trulson [Tue, 3 Dec 2019 02:20:36 +0000 (19:20 -0700)]
Get the palettes installed properly on make install
Jon Trulson [Tue, 3 Dec 2019 02:06:31 +0000 (19:06 -0700)]
Get the message catalogs installed properly on make install
Jon Trulson [Mon, 2 Dec 2019 21:33:05 +0000 (14:33 -0700)]
Get /usr/dt/config populated correctly on make install
Jon Trulson [Mon, 2 Dec 2019 20:08:52 +0000 (13:08 -0700)]
Install backdrops in proper location, install localization for them
Jon Trulson [Mon, 2 Dec 2019 20:08:06 +0000 (13:08 -0700)]
app-defaults.am: tweak installation
Jon Trulson [Mon, 2 Dec 2019 05:26:47 +0000 (22:26 -0700)]
Get app-defaults installing correctly
Jon Trulson [Mon, 2 Dec 2019 01:57:07 +0000 (18:57 -0700)]
linux.cf: always use bison
For some reason, whenever OSMajorVersion was >= 2 (this equates to a
2.x kernel or above), yacc would be used instead of bison.
On Ubuntu, and probably other linux systems, yacc is just a shell
wrapper around bison, so let's just use that directly.
Jon Trulson [Sun, 1 Dec 2019 20:44:02 +0000 (13:44 -0700)]
tt_type_comp: incorporate master CPP_PROGRAM fix into Makefile.am
Jon Trulson [Sun, 1 Dec 2019 20:31:21 +0000 (13:31 -0700)]
Merge branch 'master' into autotools-conversion
Jon Trulson [Sun, 1 Dec 2019 05:21:48 +0000 (22:21 -0700)]
programs/dtimsstart/Makefile.am: fix typo
Jon Trulson [Sun, 1 Dec 2019 03:45:50 +0000 (20:45 -0700)]
localization: disable parallel builds for app-defaults, types, and config
These use the 'merge' utility which hardcodes temp files and the like
- it cannot be run with other instances without generating bogus
errors and occasionally coredumping. :(
Jon Trulson [Sun, 1 Dec 2019 03:08:11 +0000 (20:08 -0700)]
localization: finish up with getting message catalogs building
There are still some issues here - specifically with the C
dtbuilder/dtcodegen catalogs. They may be broken due to dtbuilder not
being built yet.
Also, once dtinfo can be built, the msgs and app-defaults for it
should be re-enabled.
I also see gencat coredumping in localization/ while doing a multicore
(-jX) make. Regular single core builds seem to work fine.
Jon Trulson [Sun, 1 Dec 2019 03:06:58 +0000 (20:06 -0700)]
root Makefile.am: disable doc/ for now
Jon Trulson [Sun, 1 Dec 2019 03:04:06 +0000 (20:04 -0700)]
localized: temporarily disable dtinfo appdefaults
Jon Trulson [Sun, 1 Dec 2019 00:12:15 +0000 (17:12 -0700)]
localized: make palettes build
Jon Trulson [Sun, 1 Dec 2019 00:00:34 +0000 (17:00 -0700)]
localized: make types build
Jon Trulson [Sun, 1 Dec 2019 00:00:00 +0000 (17:00 -0700)]
localized: make backdrops build
Jon Trulson [Sat, 30 Nov 2019 23:18:45 +0000 (16:18 -0700)]
localized: make configs build
Marcin Cieślak [Sat, 30 Nov 2019 03:51:40 +0000 (03:51 +0000)]
dtdocbook/instant: fix buffer overlow on German umlaut in latin-1
One-off error:
Old buffer length was 6 for one character (3 * 1 + 3)
We need one more byte par character in the buffer for
the hex representation of it.
+0 '"'
+1 '\\'
+2 'x'
+3 'f'
+4 'c'
+5 '"'
+6 0x0 << overflow
tcl combined with RCHECK will abort because memory blocks
are allocated contiguously and we overwrite the magic marker
of the next block.
Nina Didenko [Sun, 24 Nov 2019 07:42:05 +0000 (10:42 +0300)]
tt_type_comp: use CppCmd definition
Hi.
This patch makes tt_type_comp respect CppCmd
Thanks!
Jon Trulson [Mon, 25 Nov 2019 01:53:41 +0000 (18:53 -0700)]
localization: make FR, DE, IT, and ES app-defaults/ build
Jon Trulson [Mon, 25 Nov 2019 00:52:29 +0000 (17:52 -0700)]
localized/C/app-defaults: make it build
Jon Trulson [Mon, 25 Nov 2019 00:43:50 +0000 (17:43 -0700)]
merge, mkcatdefs: add missing includes, clean up trailing whitespace
Jon Trulson [Mon, 25 Nov 2019 00:01:57 +0000 (17:01 -0700)]
dthello: build the resource file Dthello
Jon Trulson [Sat, 23 Nov 2019 00:35:21 +0000 (17:35 -0700)]
dtprintinfo: fix a mulit-core build race, for realz this time
Jon Trulson [Sat, 23 Nov 2019 00:14:27 +0000 (17:14 -0700)]
dtopen: make it build
Also, move localized subdir to last in current list of programs/ SUBDIRS
Jon Trulson [Sat, 23 Nov 2019 00:07:34 +0000 (17:07 -0700)]
dttypes: make it build
Jon Trulson [Fri, 22 Nov 2019 23:58:58 +0000 (16:58 -0700)]
tttypes: make it build
Jon Trulson [Fri, 22 Nov 2019 21:33:34 +0000 (14:33 -0700)]
types: make it build
Jon Trulson [Fri, 22 Nov 2019 20:42:02 +0000 (13:42 -0700)]
Fix up a couple issues with multi-core builds and 2 race conditions
Jon Trulson [Fri, 22 Nov 2019 20:13:41 +0000 (13:13 -0700)]
dtpdmd: make it build
Jon Trulson [Fri, 22 Nov 2019 20:01:36 +0000 (13:01 -0700)]
dtsr: make it build; configure: fix cpu detection