Commit Graph

90 Commits

Author SHA1 Message Date
Jon Trulson
18e25ce273 dtsession/SmUI.c: fix a build issue on OpenBSD 7 2021-12-10 17:24:40 -07:00
Jon Trulson
41dbfddc10 dtsession/Makefile.am: add config to SUBDIR so PAM config is built/installed
Also, update .gitignore due to some renaming of the PAM config files.
2021-11-22 13:18:17 -07:00
Liang Chang
c8762bcb01 autotools: install PAM configuration files directly instead of by
using the setup script.
2021-11-22 06:30:41 +08:00
Jon Trulson
3fe7bbeca5 dtsession/SmSave: fix format pointer confusion warnings 2021-11-16 09:57:20 -07:00
Jon Trulson
bbabcfd5f0 dtsession: fix implicit-function-declaration warnings 2021-11-15 16:07:28 -07:00
Jon Trulson
ac8bd41373 Revert "Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym"
This reverts commit 15a2032626.

This is wrong - it is missing the proper include file, and the
new function takes 4 arguments not 3.
2021-07-04 13:00:51 -06:00
Jon Trulson
51646fb06a programs/: remove Imakefiles for completed modules 2021-07-03 19:12:43 -06:00
Jon Trulson
2a3e91383b autotools: get the PAM support from master working on linux and freebsd 2021-06-02 19:57:23 -06:00
Liang Chang
e68846d543 dtsession: revise localAuthenticate. 2021-06-02 19:56:29 -06:00
Liang Chang
b46b77e0aa dtsession: add rules for config dir into Imakefile. 2021-06-02 19:56:29 -06:00
Liang Chang
678c85021a dtsession: rename PAM config file. 2021-06-02 19:56:29 -06:00
Liang Chang
b5416991b1 Add PAM support to dtsession. 2021-06-02 19:56:29 -06:00
Jon Trulson
ece5c0ea14 Merge branch 'master' into autotools-conversion
Lost the ksh93 submodule so will re-add in a later commit.
2021-01-30 19:04:10 -07:00
Lev Kujawski
0e282a0ad7 On Linux, use the SVR4 (now POSIX) signal and locking interfaces instead of the non-standard BSD equivalents. 2021-01-10 18:08:00 -07:00
Jon Trulson
a6e78364d0 Use bindir in install hooks rather than CDE_INSTALLATION_TOP
Patch supplied by Peter G.
2020-03-23 13:00:54 -06:00
Jon Trulson
11af2add7e Merge branch 'master' into autotools-conversion 2020-03-23 12:55:32 -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
04b2d175aa SrvPalette.c: missed a merge conflict in SrvPalette.c 2020-01-26 12:22:09 -07:00
Jon Trulson
313b4a8e0b Merge branch 'master' into autotools-conversion 2020-01-26 12:17:44 -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
1aaf63f2a0 dtterm, dtsession, dtappgather, dtmail: set correct perms on make install 2020-01-05 20:53:03 -07:00
Jon Trulson
9b2534efab dtsession: do not hardcode -lcrypt on link 2019-12-14 19:14:52 -07:00
Jon Trulson
15dfdf231a dtsession/SrvPalette.c: delete trailing whitespace 2019-12-03 17:14:32 -07:00
Jon Trulson
eb986d8018 dtsession/SrvPalette.c: fix bogus error handling when selection is lost 2019-12-03 17:10:35 -07:00
Jon Trulson
48dd0a54f3 dtlogin/dtsession: fix up some script perms, add proper OS defines 2019-12-03 14:06:18 -07:00
Jon Trulson
8c19b67032 dtsession: add missing dtsession_res script 2019-12-02 23:02:08 -07:00
Jon Trulson
c329d5cfd7 Remove $(TIRPCINC) from all Makefile.am files - it no longer exists
Also, restructure some of the dependencies in the lib/tt binaries.  We
will link with libtt (which will include libtirpc as a dependency),
and XTOOLLIB - all the right X11 stuff without needing to add it to
every OS.  Removed several uneeded OS specializations ("if LINUX",
etc) as a result.
2019-11-20 18:52:29 -07:00
Jon Trulson
11eafe767b dtsession: make it build, add check for the full path to xrdb 2019-11-19 17:19:14 -07:00
chase
dd68514e4f Remove hpversion.h from repository
This patch removes hpversion.h from the repository, this also untangles a
lot of ifdef mess. This closes bug CDExc19524.
2018-10-06 17:00:38 -06:00
chase
90a2b2848a remove ultrix support 2018-09-30 17:27:04 -06:00
Peter Howkins
94f78da5df dtsession: Change to ANSI function definitions 2018-06-28 04:18:25 +01:00
chase
6bf175ef2d Remove apollo support 2018-06-24 16:22:37 -06:00
Jon Trulson
20cad57cd4 dtsession: fix screen saver/locking on linux
The POSIX __linux__ commit broke the special detection on linux used
to determine whether a secure system was in use or not.

This commit reworks the logic a little bit to avoid special casing
linux in main().

It also reworks the logic in CanReAuthenticate() to fix up some issues
"fixed" to correct converity warnings.  The logic in this case was
mostly ok, but still didn't account for the proper usage of this
function.  Error detection improved somewhat as a result.
2018-05-31 22:23:19 -06:00
chase
809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
Ulrich Wilkens
885b65a09a Fixes for OpenBSD 2018-05-31 21:48:07 -06:00
chase
4f5e7fe5e3 Use POSIX macros for linux 2018-05-24 18:22:55 -06:00
chase
164e695cd0 remove OSF1 support 2018-05-24 14:25:26 -06:00
chase
07900bd93b Remove Unixware and openserver support 2018-05-20 12:13:07 -06:00
chase
8a4f389634 Remove UXPDS support 2018-05-15 20:27:22 -06:00
Peter Howkins
f2c6a48d72 dtsession: A few extra snprintf's for buffer safety 2018-04-29 02:11:23 +01:00
chase
33d2749ea3 Last of the spelling fixed 2018-04-28 12:36:44 -06:00
chase
6d3a19d8f9 Even more spelling fixed 2018-04-28 12:36:33 -06:00
chase
1fe5a550b2 Fix typo in license headers 2018-04-28 12:30:20 -06:00
Jon Trulson
17101b6f4c Enable TIRPC support for Linux
This is enabled by default.  To disable, add:

in the config/cf/site.def or host.def file.

You will need to have the libtirpc-dev package installed.

The benefit is that you will no longer need to run rpcbind in insecure
mode (the -i option).  There are other benefits we may be able to take
advantage of in the future, like supporting IPV6 for ToolTalk.
2018-04-12 21:00:34 -06:00
Peter Howkins
637abd5d5c Resolve some coverity warnings 2018-03-08 23:03:21 +00:00
Peter Howkins
2ea057d511 Disable all code related to libXp
deprecated and mostly no longer included on current OSes
2016-04-20 20:17:22 +01:00
alx
ed2c149bfc dtsession: Enable X11 screensaver extension on FreeBSD 2016-04-18 19:16:47 -06:00
alx
cbd5abb33a dtsession: fixed errorlog rotation 2015-07-02 17:50:16 -06:00
Jon Trulson
4dae64c891 dtsession/SrvPalette: fix CID 89227 2014-12-27 20:09:09 -07:00
Jon Trulson
722cfc70eb dtsession/SrvFile_io: fix CID's 88299 and 89441 2014-12-27 20:06:53 -07:00