Disable the print-immediate and print-on-error functions in xterm.

They a causing a pledge violation when called, and we can live without
them. ok millert, also discussed with deraadt@
This commit is contained in:
matthieu 2020-01-20 21:03:35 +00:00
parent 2961de70eb
commit 553b461bdc
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.33 2019/03/09 20:10:19 matthieu Exp $ # $OpenBSD: Makefile,v 1.34 2020/01/20 21:03:35 matthieu Exp $
.include <bsd.xconf.mk> .include <bsd.xconf.mk>
SUBDIR= icons resize SUBDIR= icons resize
@ -14,7 +14,7 @@ CPPFLAGS+= -I. -I${.CURDIR} -I${X11BASE}/include \
-DHAVE_CONFIG_H -DCSRG_BASED \ -DHAVE_CONFIG_H -DCSRG_BASED \
-DFUNCPROTO=15 -DNARROWPROTO -DXFREE86_FT2 -DUTMP \ -DFUNCPROTO=15 -DNARROWPROTO -DXFREE86_FT2 -DUTMP \
-DDEF_ALLOW_FONT=False -DDEF_ALLOW_TCAP=False \ -DDEF_ALLOW_FONT=False -DDEF_ALLOW_TCAP=False \
-DDEF_ALLOW_WINDOW=False -DDEF_ALLOW_WINDOW=False -DOPT_PRINT_ON_EXIT=0
LDADD+= -L${X11BASE}/lib -lXaw -lXpm -lXt -lSM -lICE -lXmu \ LDADD+= -L${X11BASE}/lib -lXaw -lXpm -lXt -lSM -lICE -lXmu \
-lXft -lXrender -lXinerama -lX11 -lxcb -lXext -lXau -lXdmcp \ -lXft -lXrender -lXinerama -lX11 -lxcb -lXext -lXau -lXdmcp \
-lfontconfig -lexpat -lfreetype -lutil -ltermcap -lz -lfontconfig -lexpat -lfreetype -lutil -ltermcap -lz

View File

@ -364,7 +364,7 @@ static XtActionsRec actionsList[] = {
{ "meta-sends-escape", HandleMetaEsc }, { "meta-sends-escape", HandleMetaEsc },
{ "set-num-lock", HandleNumLock }, { "set-num-lock", HandleNumLock },
#endif #endif
#ifdef OPT_PRINT_ON_EXIT #if OPT_PRINT_ON_EXIT
{ "print-immediate", HandlePrintImmediate }, { "print-immediate", HandlePrintImmediate },
{ "print-on-error", HandlePrintOnError }, { "print-on-error", HandlePrintOnError },
#endif #endif

View File

@ -313,7 +313,7 @@ MenuEntry mainMenuEntries[] = {
#ifdef ALLOWLOGGING #ifdef ALLOWLOGGING
{ "logging", do_logging, NULL }, { "logging", do_logging, NULL },
#endif #endif
#ifdef OPT_PRINT_ON_EXIT #if OPT_PRINT_ON_EXIT
{ "print-immediate", do_write_now, NULL }, { "print-immediate", do_write_now, NULL },
{ "print-on-error", do_write_error, NULL }, { "print-on-error", do_write_error, NULL },
#endif #endif
@ -825,7 +825,7 @@ domenu(Widget w,
update_meta_esc(); update_meta_esc();
update_delete_del(); update_delete_del();
update_keyboard_type(); update_keyboard_type();
#ifdef OPT_PRINT_ON_EXIT #if OPT_PRINT_ON_EXIT
screen->write_error = !IsEmpty(resource.printFileOnXError); screen->write_error = !IsEmpty(resource.printFileOnXError);
SetItemSensitivity(mainMenuEntries[mainMenu_write_now].widget, True); SetItemSensitivity(mainMenuEntries[mainMenu_write_now].widget, True);
SetItemSensitivity(mainMenuEntries[mainMenu_write_error].widget, screen->write_error); SetItemSensitivity(mainMenuEntries[mainMenu_write_error].widget, screen->write_error);
@ -1158,7 +1158,7 @@ do_logging(Widget gw GCC_UNUSED,
} }
#endif #endif
#ifdef OPT_PRINT_ON_EXIT #if OPT_PRINT_ON_EXIT
static void static void
do_write_now(Widget gw GCC_UNUSED, do_write_now(Widget gw GCC_UNUSED,
XtPointer closure GCC_UNUSED, XtPointer closure GCC_UNUSED,