Commit Graph

1053 Commits

Author SHA1 Message Date
Liang Chang 12f2fb1f10 dtdocbook: fix a segmentation fault. 2021-01-01 03:07:37 +08:00
Liang Chang bc39b47162 dtopen: fix the syntax errors of comment. 2020-12-29 00:20:37 +08:00
Peter Howkins d98b2c4c34 dtcm: Always use ANSI function prototypes 2020-11-29 01:55:09 +00:00
Peter Howkins aef196c6ca dtcalc: remove some pointless macroing of function names to uppercase versionss 2020-11-26 23:00:18 +00:00
Peter Howkins e4024b0bf9 dtcalc: Remove support for optional K&R prototypes to simplify code 2020-11-26 22:24:51 +00:00
Peter Howkins 25d34e6398 dtcreate: remove hacky solution to declaring and defining variables in .h files
Split them into .c and .h like usual.y
2020-11-26 03:16:16 +00:00
Peter Howkins dc45d133c9 dthelp: Resolve GCC 10 errors about multiple definitions of global variables 2020-11-24 05:42:59 +00:00
Peter Howkins 9ff00704b3 dtudcfonted: Resolve GCC 10 errors about multiple definitions of global variables 2020-11-24 03:16:50 +00:00
Peter Howkins ee04641879 dticon: Resolve GCC 10 errors about multiple definitions of global variables 2020-11-24 02:25:30 +00:00
Peter Howkins 30f2d925ef dtcreate: Resolve GCC 10 errors about multiple definitions of global variables 2020-11-24 02:19:05 +00:00
Peter Howkins 361b8f1456 dtappbbuilder: Resolve GCC 10 errors about multiple definitions of global variables 2020-11-24 02:19:05 +00:00
Peter Howkins e1196cdfec dtcalc: Resolve gcc 10 errors about multiple definitions of global variables 2020-11-24 02:19:05 +00:00
Peter Howkins 4fd18c3c16 dtstyle: Remove duplicate definition of NumOfPalettes that was a) wrong b) causing issues on recent compilers 2020-11-23 18:28:01 +00:00
Peter Howkins 67f62e5a8a all: remove deprecated sys_errlist[] and replace with ANSI C strerror() 2020-11-02 05:30:08 +00:00
Chase 0f3bcae232 dtksh: Turn dtksh aliases into builtins and discard BLT_SPC flag
Upstream ksh has removed it's builtin aliases, favoring instead to make them
all builtin commands, this would also allow us to skip having to manually
merge another file, it was explained best in this email:

"Default aliases are an ugly hack that you are better off without.
Disadvantages include:
- 'unalias -a' becomes basically unusable as it gets rid of commands you
probably want;
- shell functions by those names are ignored (unless you quote their
names upon invocation);
- something like 'cmdname=foo; "$cmdname" bar baz' doesn't work if
$cmdname is an alias.

I strongly recommend removing the BLT_SPC flag from all of
your extra dtksh builtins. Making builtins "special builtins" is of no
real benefit at all, while introducing a pointless restriction: shell
functions by those names cannot be defined, which causes a risk of
incompatibility with scripts written for other shells. The BLT_SPC flag
is for a very few historic builtins that must have certain weird
corner-case behaviour of "special" builtins for POSIX compliance and
Bourne shell compatibility reasons."
2020-07-19 19:15:57 -06:00
Jon Trulson 15a2032626 Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
patch supplied from Peter G.
2020-03-23 12:51:18 -06:00
Jon Trulson 6f1a110e1d 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.
2020-03-09 15:37:59 -06:00
Jon Trulson 6b32246d06 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.
2020-01-13 19:13:23 -07:00
Chase 008512c777 extra.h: remove unused prototypes 2019-12-15 14:07:52 -07:00
Chase f28abfe8dd dtksh: remove needless OS defines 2019-12-15 14:07:52 -07:00
Chase cc73d03e49 dtkcmds.c: avoid c99 collision 2019-12-15 14:07:52 -07:00
Chase 3152b0bc4e dtksh: remove unused files and functions 2019-12-15 14:07:52 -07:00
Marcin Cieślak 5cebd7c4da 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.
2019-11-30 10:13:43 -07:00
Jon Trulson de9d913b77 dtinfo: link proper localized (utf8) dirs 2019-11-17 15:07:14 -07:00
Jon Trulson ba68ff0a17 Merge branch 'master' into utf8-conversion after 2.3.1 release 2019-11-16 16:34:48 -07:00
Nina Didenko f75ee32e72 sym2num: don't hardcode path to cpp 2019-11-05 18:49:17 -07:00
Nina Didenko de7fe55d6a merge: don't hardcode path to gencat 2019-11-05 18:49:10 -07:00
Nina Didenko b3f3997bd1 dtinfogen: don't override PATH 2019-11-05 18:48:00 -07:00
wmoxam 14e385d175 Remove all optional compile flags from dtwm that are not referenced anywhere, and are unlikely to ever be used 2019-10-17 20:34:14 -06:00
Jon Trulson ab863f212d dtmail: fix extra format args warnings 2019-10-15 21:22:11 -06:00
Jon Trulson a38f72c0c8 dtmail: fix NULL char embedded in format string 2019-10-15 21:12:17 -06:00
wmoxam ab741a1241 'notdef' means it's not used, so we remove it 2019-10-15 20:32:13 -06:00
wmoxam de81a5b518 Remove ancient HP VUE compatibility support 2019-10-15 20:32:05 -06:00
wmoxam ca9cdf6cfc Remove 'oldcode' 2019-10-14 15:54:43 -06:00
wmoxam d380b0fac6 Remove legacysun code blocks 2019-10-14 15:54:33 -06:00
wmoxam e1e2004696 Remove unused HP_EXTENSIONS code blocks 2019-10-14 15:54:25 -06:00
Jon Trulson 7f414f5d35 dtpad: emit error on catopen() failure
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:42:21 -06:00
Jon Trulson 1972d3e378 dtfile: Add scroll wheel support
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:34:56 -06:00
Jon Trulson fd3cffcb37 dtcalc: increase highlight thickness to match Solaris CDE
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:30:58 -06:00
wmoxam 923951b414 Remove NOTDONE code 2019-10-14 11:57:41 -06:00
Jon Trulson 511c2bb427 Merge /u/jrubio/cdesktopenv/ branch discarded-qualifiers into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/17/
2019-10-13 17:09:04 +00:00
Jon Trulson 08a49581b7 Merge /u/jrubio/cdesktopenv/ branch delete-incomplete into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/18/
2019-10-13 17:06:14 +00:00
Jose Rubio 08cea15be5 get rid of the 'extern sys_errlist' and 'sys_nerr' in SysErrorMsg. 2019-10-13 10:23:49 +02:00
Jon Trulson 2e4deb41c0 Merge branch 'master' into utf8-conversion, after 2.3.0a release 2019-10-12 19:17:42 -06:00
Jon Trulson 34b5ee08c8 Merge /u/jrubio/cdesktopenv/ branch incompatible-pointer-types into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/16/
2019-10-12 21:43:45 +00:00
Jose Rubio 5c56c32d17 Fixes for a few -Wincompatible-pointer-types 2019-10-12 22:29:44 +02:00
Jon Trulson e05d138c4c Merge /u/jrubio/cdesktopenv/ branch int-conversion into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/14/
2019-10-11 23:58:44 +00:00
Jose Rubio c900cedbc9 Fix to delete-incomplete warnings. 2019-10-11 13:43:08 +02:00
Jose Rubio 0086a7067e Fix to compile warnings.
* discarded-qualifiers warnings.
* Function definitions, the .h doesn't match the .c.
* Added some include to ensure the .c has function definition.
2019-10-11 10:49:48 +02:00
Jose Rubio f9790767f3 Fix to different compile warnings.
Fix to multiple int-conversion
Removal of duplicated function definition in dtudcfonted/util.h
Added XtEventHandler prototypes to mtfgui
2019-10-10 19:59:40 +02:00