cdesktopenv/cde/programs/dtpdm
Trung Lê 72d0164644 Security: replace tmpnam() with mkstemp()
tmpnam() is inherently insecure due to race conditions between
filename generation and file creation (CWE-377). Replace all
occurrences with mkstemp() which atomically creates the file.

Pattern used (portable, already used elsewhere in CDE):
  strcpy(tmpName, "/tmp/dtXXX_XXXXXX");
  { int _tf = mkstemp(tmpName); if (_tf >= 0) close(_tf); }

Files modified:
- lib/DtHelp/Access.c (2 occurrences)
- lib/DtSvc/DtUtil1/DtsMM.c (1 occurrence)
- lib/DtWidget/Editor.c (2 occurrences)
- lib/DtWidget/SearchCalls.c (1 occurrence)
- programs/dtcreate/main.c (2 occurrences)
- programs/dticon/main.c (1 occurrence)
- programs/dtlogin/policy.c (1 occurrence)
- programs/dtpad/fileIo.c (1 occurrence)
- programs/dtpdm/PdmXp.c (1 occurrence)
- programs/dtpdmd/manager.c (1 occurrence)
- programs/dtspcd/main.c (1 occurrence)
- programs/dtwm/WmResParse.c (1 occurrence)

Note: dtksh/ksh93 directory intentionally skipped (vendored code)
2026-01-29 17:10:18 +11:00
..
BuildOidHdrs.sh
JobBox.c dtpdm: fix implicit-function-declaration warnings 2021-11-16 15:24:09 -07:00
JobBox.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
Main.c dtpdm: Change to ANSI function definitions 2018-06-28 04:20:10 +01:00
MainWindow.c dtpdm: Change to ANSI function definitions 2018-06-28 04:20:10 +01:00
MainWindow.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
Makefile.am configure: detect libdl 2022-07-31 18:33:49 -06:00
PdmMsgs.c Centralize catgets() calls through MsgCat 2021-06-02 19:55:15 -06:00
PdmMsgs.h Centralize catgets() calls through MsgCat 2021-06-02 19:55:15 -06:00
PdmOid.c handle missing return values 2025-12-18 22:58:26 +01:00
PdmOid.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
PdmOidDefs.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
PdmOidDefs.in
PdmOidStrs.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
PdmXp.c Security: replace tmpnam() with mkstemp() 2026-01-29 17:10:18 +11:00
PdmXp.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
PrinterBox.c dtpdm: Change to ANSI function definitions 2018-06-28 04:20:10 +01:00
PrinterBox.h Fix typo in license headers 2018-04-28 12:30:20 -06:00
dtpdm.msg
landscap.pm
lduplex.pm
lsimplex.pm
ltumble.pm
pduplex.pm
portrait.pm
psimplex.pm
ptumble.pm
rlandsca.pm
rportrai.pm