Commit Graph

106 Commits

Author SHA1 Message Date
Patrick Georgi de2c06c54d remove system library prototypes 2025-12-18 22:58:26 +01:00
Patrick Georgi ae767ed3dc Mark error handlers as "noreturn"
Match X headers to satisfy newer compilers.
2025-12-18 22:58:26 +01:00
Chase 62a23fc33b dtsession: split ShowWaitState into Enter and LeaveWaitState 2025-11-30 16:30:14 -07:00
hyousatsu 615d9a3907 dtsession: fix a crash. 2023-08-16 23:18:47 -04:00
hyousatsu 760d36bfe9 dtlogin: use sessreg to manage utmp/wtmp. 2023-03-27 08:48:27 +00:00
hyousatsu 28277ce88e dtsession: change the maximum size of cover dialog to fullscreen. 2023-02-26 11:59:29 +00:00
Liang Chang 1d451e0e2e dtsession: help xterm load the appropriate font. 2022-08-28 17:51:24 +00:00
Liang Chang 3449ea6767 dtsession: help applications enable "international". 2022-08-13 13:55:48 -06:00
Jon Trulson 2d0c4d6d39 Kill off OSMAJORVERSION and OSMINORVERSION defines/cpp flags
This has meant very little for a long time as configure.ac just
hardcoded these values depending on the current OS versions at the
time.

The only place where this is really 'needed' is XlationSvc.c in DtSvc
so that differences between locale specifications on various versions
of an OS can be accounted for. So for now, we just define those when
building DtSvc.

We could probably safely remove them as well with an update to the
Xlate locale DB to remove ancient cruft we don't care about anymore.

For various other modules, like dtlogin, dtsession, etc we just use
the code that was already being used due to the hardcoded values we've
had for the last 10-ish years.
2022-08-06 17:57:44 -06:00
Chase 45cee195bd Generify source code
Previously we would fail in some parts of the code if we did not have a
premade configuration, now we use any code that was marked as Linux, BSD and
Solaris as our basis in order to support building unknown Unix systems.
2022-08-06 11:31:51 -06:00
Chase 9a9d586e87 configure: detect libdl 2022-07-31 18:33:49 -06:00
Chase edf4319548 Discontinue HPUX support 2022-07-23 17:49:33 -06:00
Jon Trulson 3a0c2ae879 Move DtXinerama.h and PamSvc.h into include/Dt/ 2021-12-21 16:42:29 -07:00
Jon Trulson e10d06f210 configure/Makefiles: add checks for Xmu, Xext, and Xdmcp
We also remove sun pro specific options, and do some general cleanup
as well as remove hardcoded library refs like -lXm, -lXext, etc...
2021-12-21 16:42:22 -07:00
Jon Trulson bbba562a22 dtsession: don't change perms of dtsession if HAS_PAM_LIBRARY 2021-12-19 11:30:36 -07:00
Jon Trulson 05fa4044f4 Look over the install rules and adjust where appropriate
These are just minor tweaks to make sure the 'make install' part does
what it is supposed to do.  I also removed some commented code in the
dtmail Makefile related to SunOS, as that is not currently suppoerted
anyway.
2021-12-15 15:41:53 -07:00
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