1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00
Commit graph

1610 commits

Author SHA1 Message Date
Chase
47dfe49a72 dtksh: make it build under openindiana 2021-01-18 18:00:41 -07:00
Chase
e75a8162ad dtksh/Imakefile: make patch obey POSIX 2021-01-18 18:00:41 -07:00
Chase
10f2382561 dtksh/findsym.c: fix compiler warnings 2021-01-01 18:41:26 -07:00
Chase
428223ee80 use a patchfile to augment init.c instead of copying it entirely 2021-01-01 18:41:26 -07:00
Chase
90fff44682 dtksh: use bin/package flat make instead of shell
Shell isn't portable, so upstream ksh93 has a "flat" function that we can use
to put binaries in a static place that doesn't require a shell command. We still
do need an intermediate setup.sh shell script due to a bug in ksh that object
files aren't being put in lib, and FEATURE not in include. We also cut out some
 unused symbols, and a hpux specific implementation of dynlib (new hpux should
 conform to the posix implementation anyhow.)
2021-01-01 18:41:26 -07:00
Chase
f884dce398 dtkcmds.c: use Empty macro instead of empty string 2020-12-13 17:45:39 -07:00
Chase
5cec09b9f2 dtksh: use sh_addbuiltin instead of manually editing builtins.c 2020-12-06 18:24:33 -07:00
Chase
80825d1651 dtksh: update to commit 67880e3 2020-12-06 18:24:33 -07:00
Chase
fc700e296b Dtksh: fix callback segfault 2020-10-19 18:36:29 -06:00
Chase
9f290039eb ksh93: update to commit dd9bc2 2020-10-19 18:36:29 -06:00
Chase
461d326bbe dtksh: Use ksh93 translate over augmented version
We can reduce our differences from upstream ksh by simply using their
ERROR_translate() function instead of our janky and obsolete msg_translate,
we also move DtGetMessage() to msgs.c and lockedfiledescriptors and,
unlockfiledescriptors to extra.c to lessen modifications to init.c, which
all changes will hopefully be moved elsewhere in the future
2020-10-19 18:36:29 -06:00
Chase
3443543744 dtkcmds.c: add extra field to discipline functions 2020-10-12 05:32:57 -06:00
Chase
96c4a3ea52 ksh: update to commit 092b90 2020-09-20 11:29:00 -06:00
Chase
9d798ad6d0 dtksh: make new ksh submodule build 2020-08-23 20:13:30 -06:00
Chase
994772518a dtksh/examples: clean up scripts
This commit does three thing:
1. Sets appropriate bits on source files
2. Tells imake to build them as script files, not data files
3. Remove broken examples based on unused code
2020-08-23 20:13:24 -06:00
Chase
5d0125b393 dtksh: add new ksh93 submodule 2020-08-23 20:13:18 -06:00
Chase
0069a6e084 dtksh: remove old ksh from repo 2020-08-23 20:13:14 -06: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
83ef13af18 desktopentry/README: Clarify that the login manager is responsible for setting language 2020-02-08 16:16:13 -07:00
Jon Trulson
2a2c412e2e Revert "Add a new contrib/desktopentry-setlang/ mechanism"
This reverts commit 08b6281f60.

The Login manager is reponsible for setting the correct language
(LANG, etc) information before starting a CDE session.
2020-02-08 16:12:31 -07:00
Jon Trulson
08b6281f60 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.
2020-01-26 11:54:38 -07: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
Jon Trulson
ab023dfaed 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.
2020-01-12 17:25:56 -07:00
Jon Trulson
2f8a2ec066 FreeBSD 12/libDtHelp: fix link errors with missing libjpeg 2020-01-04 14:36:06 -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
Jon Trulson
6c07a2ae69 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.
2019-12-01 19:18:00 -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
Nina Didenko
9221c55a5f tt_type_comp: use CppCmd definition
Hi.

This patch makes tt_type_comp respect CppCmd

Thanks!
2019-11-29 18:12:20 -07:00
Nina Didenko
8db8a22906 installCDE: don't hardcode path to whoami
Hi.

Patch removes hardcoded paths to echo and whoami in installation scripts.

Thanks.
2019-11-20 19:08:22 -07:00
Jon Trulson
0d70d8b120 Set version to 2.3.1a (devel) for current master 2019-11-18 13:03:52 -07:00
Jon Trulson
372e74a524 gitignore: add infolib/etc UTF-8 locales 2019-11-18 12:52:17 -07:00
Jon Trulson
a719c004b2 site.def: add define guards around DtLocalesToBuild 2019-11-17 15:08:20 -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
Jon Trulson
9753b63dab HISTORY: update for 2.3.1 release 2019-11-15 19:06:11 -07:00
Jon Trulson
5fe7ee5b67 Change CDE version info for 2.3.1 release 2019-11-15 18:04:01 -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
52caa8b8e6 udbToAny.ksh: don't hardcode path to awk 2019-11-05 18:49:02 -07:00
Nina Didenko
b3f3997bd1 dtinfogen: don't override PATH 2019-11-05 18:48:00 -07:00
Chase
88b46c6a28 il: remove various deprecated files 2019-11-01 17:23:48 -06:00
Chase
0f36a57eff remove more internal jpeg headers 2019-11-01 17:23:24 -06:00
Jon Trulson
d7e5206d6b DtSvc/DtUtil2: fix implicit function declarations 2019-10-28 14:30:43 -06:00
Jon Trulson
dbce2e4337 DtSvc/DtUtil1: fix implicit function declarations 2019-10-28 14:30:36 -06:00
Jon Trulson
5e05b59025 ttserver: fixup forward (vexing) fucntion decl's in main, get rid of **environ 2019-10-19 18:36:54 -06:00