1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00
Commit graph

2025 commits

Author SHA1 Message Date
Jon Trulson
43bda68f69 configure.ac: Add TCL detection 2020-09-07 14:31:00 -06:00
Jon Trulson
e5914dd108 dtappbuilder/src/ab: disable parallel builds
Due to the way dtcodegen works, we can't use parallel builds (-j) in
this directory without corrupting things and generating build errors.
2020-09-05 16:20:13 -06:00
Chase
65d2062518 dtappbuilder: make it build under autotools 2020-09-05 15:49:46 -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
Peter Howkins
cb3180cd2a libcsa: resolve all missing-prototypes warnings 2020-08-01 23:00:23 +01:00
Peter Howkins
f4eb62fa69 libcsa: Resolve all strict-prototype warnings 2020-08-01 22:45:55 +01:00
Peter Howkins
ce4fad4c5a libcsa: Resolve GCC 9 warnings 2020-08-01 21:38:08 +01: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
c7907f4f19 .gitignore: add dthelp parser/pass1 files 2020-05-25 12:31:20 -06:00
Jon Trulson
6da55905ec dthelp/parser/pass1: get it to build
So this is going to be tricky/painful getting this parser fully
operational.  It's pretty hairy with various interdependencies and
generated code.

It's rather complicated how each sub dir depends on the previous one.
Also, the parser subdir has dependencies on the helptag subdir, and
vice-versa, so some hackery was needed to get that to work.

Due to the wierd interdepencencies between helptag and parser,
we disable parallel builds there.

This is some really horrible code and design - not surprising since it
dates to 1989.

I think it should just be removed -- who can maintain or refactor this
code?

Also, dthelp_htag1 is now built in pass1/parser/, not in
pass1/helptag/ as it used to be.
2020-04-21 15:40:05 -06:00
Jon Trulson
349802ddd3 dthelpprint: make it build. 2020-04-13 16:21:27 -06:00
Jon Trulson
b64d91d5a9 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.
2020-03-24 18:44:40 -06:00
Jon Trulson
3d217c6ed1 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.
2020-03-24 18:43:11 -06:00
Jon Trulson
f5c3c5d7a2 .gitignore: add config numbered session files 2020-03-24 18:43:03 -06:00
Jon Trulson
255b399760 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.
2020-03-24 18:41:55 -06:00
Jon Trulson
316ab9c9db tt: fix link order for tt_type_comp and dbck
These caused link errors on Gentoo, maybe other systems.

Patch by Peter G.
2020-03-24 11:34:51 -06:00
Jon Trulson
137bbf383e 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.
2020-03-23 13:51:01 -06:00
Jon Trulson
dcda29d67a dthelpdemo: remove old Makefile.SUN, .IBM, and .HP 2020-03-23 13:44:34 -06:00
Jon Trulson
11b9c30ace 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.
2020-03-23 13:31:34 -06:00
Jon Trulson
b649ef98b1 configure: enable building of nsgmls and parts of dthelp
Patch by Peter G.
2020-03-23 13:27:06 -06:00
Jon Trulson
5852c4742f 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.
2020-03-23 13:10:07 -06: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
8f2fe85639 Merge branch 'master' into autotools-conversion 2020-03-22 19:09:58 -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
Peter Howkins
2dd656b919 Support pkg-config for detecting freetype2 includes and libs. Fixes Ubuntu 19.10 missing the freetype-config binary. 2020-02-07 02:26:02 +00: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
Chase
b46cfa7876 Remove redundant hourglass functions 2020-01-26 12:09:12 -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
1aaf63f2a0 dtterm, dtsession, dtappgather, dtmail: set correct perms on make install 2020-01-05 20:53:03 -07:00
Jon Trulson
7f4889f348 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.
2020-01-05 18:11:52 -07:00
Jon Trulson
4d12673147 configure: detect and use jpeg library 2020-01-05 16:27:17 -07:00
Jon Trulson
00dcd9c63d 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.
2020-01-04 16:26:46 -07:00
Jon Trulson
2f8a2ec066 FreeBSD 12/libDtHelp: fix link errors with missing libjpeg 2020-01-04 14:36:06 -07:00
Jon Trulson
da6f570381 configure: get the language enable options working 2020-01-02 22:14:23 -07:00
Jon Trulson
f246e25e55 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).
2020-01-02 19:20:53 -07:00
Jon Trulson
3b1a54ca81 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).
2020-01-02 18:35:36 -07:00
Jon Trulson
f634c682df configure: make sure X_EXTRA_LIBS and X_PRE_LIBS are accounted for 2020-01-02 18:35:36 -07:00
Peter Howkins
8ae6933a15 Add a few configure checks to make sure various programs and headers
needed for build are available.
2020-01-02 23:59:53 +00:00
Jon Trulson
005c72b917 Merge branch 'master' into autotools-conversion 2019-12-15 15:18:41 -07:00
Chase
008512c777 extra.h: remove unused prototypes 2019-12-15 14:07:52 -07:00