logging.C
authorroot <root>
Tue, 17 Jan 2006 15:17:39 +0000 (15:17 +0000)
committerroot <root>
Tue, 17 Jan 2006 15:17:39 +0000 (15:17 +0000)
12 files changed:
src/Makefile.in
src/fdpass.C
src/fdpass.h
src/feature.h
src/init.C
src/logging.C
src/main.C
src/ptytty.C
src/ptytty.h
src/rxvt.h
src/rxvtc.C
src/rxvtd.C

index f42779f93f16877f30710d2ed652fe925a35b6f3..bce760c2452628eba78e8c5623d786c8d9c6ed25 100644 (file)
@@ -66,9 +66,9 @@ COMMON = \
         command.o rxvtfont.o init.o logging.o main.o misc.o netdisp.o      \
        ptytty.o screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o    \
        scrollbar-xterm.o scrollbar-plain.o xdefaults.o xpm.o encoding.o   \
-       rxvttoolkit.o rxvtutil.o iom.o keyboard.o @PERL_O@
+       rxvttoolkit.o rxvtutil.o iom.o keyboard.o fdpass.o @PERL_O@
 
-COMMON_DAEMON = rxvtdaemon.o fdpass.o
+COMMON_DAEMON = rxvtdaemon.o
 
 RXVT_BASENAME=`$(ECHO) $(RXVTNAME)|$(SED) 's/$(EXEEXT)$$//'|$(SED) '$(transform)'`
 RXVT_BINNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)$(EXEEXT)
@@ -107,7 +107,7 @@ rxvtd: rxvtd.o $(COMMON) $(COMMON_DAEMON)
        $(LINK) -o $@ $^ $(LIBS) $(XLIB) $(DLIB) @PERLLIB@
 #      $(LIBTOOL) --mode=link $(LINK) rxvtd.o rxvtdaemon.o librxvt.la $(LIBS) $(XLIB) $(DLIB) -o $@
 
-rxvtc: rxvtc.o $(COMMON_DAEMON)
+rxvtc: rxvtc.o $(COMMON_DAEMON) fdpass.o
        $(LINK) -o $@ $^ $(LIBS) $(DLIB)
 #      $(LIBTOOL) --mode=link $(LINK) rxvtc.o rxvtdaemon.o $(LIBS) $(DLIB) -o $@
 
@@ -163,10 +163,10 @@ depend:
 
 # DO NOT DELETE: nice dependency list follows
 
-command.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-command.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-command.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
-command.o: command.h keyboard.h
+command.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+command.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+command.o: salloc.h rxvtperl.h hookinc.h rsinc.h version.h command.h
+command.o: keyboard.h
 encoding.o: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
 encoding.o: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
 encoding.o: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
@@ -182,86 +182,81 @@ encoding.o: table/cns11643_1992_f.h table/big5_ext.h table/big5_plus.h
 encoding.o: table/viscii.h table/jis0201_1976_0.h table/jis0208_1990_0.h
 encoding.o: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.o: table/compose.h table/category.h
-fdpass.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+fdpass.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 fdpass.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 fdpass.o: salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h
-init.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
-init.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-init.o: salloc.h rxvtperl.h hookinc.h rsinc.h init.h
+init.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
+init.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+init.o: rxvtperl.h hookinc.h rsinc.h init.h
 iom.o: iom.h iom_conf.h rxvtutil.h callback.h
-keyboard.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-keyboard.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-keyboard.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-keyboard.o: command.h
-logging.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-logging.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-logging.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-main.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
-main.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-main.o: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-misc.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
-misc.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-misc.o: salloc.h rxvtperl.h hookinc.h rsinc.h
-netdisp.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-netdisp.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-netdisp.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-ptytty.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+keyboard.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+keyboard.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+keyboard.o: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h command.h
+logging.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+logging.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+logging.o: salloc.h rxvtperl.h hookinc.h rsinc.h ptytty.h
+main.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
+main.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+main.o: rxvtperl.h hookinc.h rsinc.h keyboard.h
+misc.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
+misc.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+misc.o: rxvtperl.h hookinc.h rsinc.h
+netdisp.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+netdisp.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+netdisp.o: salloc.h rxvtperl.h hookinc.h rsinc.h
+ptytty.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 ptytty.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-ptytty.o: salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvt.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
-rxvt.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvt.o: salloc.h rxvtperl.h hookinc.h rsinc.h
+ptytty.o: salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h ptytty.h
+rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
+rxvt.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+rxvt.o: rxvtperl.h hookinc.h rsinc.h
 rxvtc.o: ../config.h rxvtdaemon.h rxvtutil.h fdpass.h rxvt.h rxvtlib.h
-rxvtc.o: ptytty.h feature.h optinc.h encoding.h rxvtfont.h rxvttoolkit.h
-rxvtc.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvtd.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+rxvtc.o: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
+rxvtc.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+rxvtd.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 rxvtd.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvtd.o: salloc.h rxvtperl.h hookinc.h rsinc.h rxvtdaemon.h fdpass.h
 rxvtdaemon.o: rxvtdaemon.h rxvtutil.h
-rxvtfont.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-rxvtfont.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-rxvtfont.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h table/linedraw.h
+rxvtfont.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+rxvtfont.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvtfont.o: salloc.h rxvtperl.h hookinc.h rsinc.h table/linedraw.h
 rxvtperl.o: ../config.h iom.h iom_conf.h rxvtutil.h callback.h rxvt.h
-rxvtperl.o: rxvtlib.h ptytty.h feature.h optinc.h encoding.h rxvtfont.h
-rxvtperl.o: rxvttoolkit.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-rxvtperl.o: perlxsi.c
-rxvttoolkit.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-rxvttoolkit.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-rxvttoolkit.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+rxvtperl.o: rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h
+rxvtperl.o: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h perlxsi.c
+rxvttoolkit.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+rxvttoolkit.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+rxvttoolkit.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtutil.o: rxvtutil.h
 salloc.o: salloc.h
-screen.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+screen.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 screen.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 screen.o: salloc.h rxvtperl.h hookinc.h rsinc.h salloc.C
-scrollbar-next.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar-next.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-next.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-scrollbar-plain.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar-plain.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-plain.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-plain.o: rsinc.h
-scrollbar-rxvt.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar-rxvt.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-rxvt.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-scrollbar-xterm.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar-xterm.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-xterm.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-xterm.o: rsinc.h
-scrollbar.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-xdefaults.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-xdefaults.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-xdefaults.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
-xdefaults.o: keyboard.h
-xpm.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
-xpm.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-xpm.o: salloc.h rxvtperl.h hookinc.h rsinc.h
-
-command.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-command.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-command.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
-command.lo: command.h keyboard.h
+scrollbar-next.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar-next.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-next.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar-plain.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar-plain.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-plain.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar-rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar-rxvt.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-rxvt.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar-xterm.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar-xterm.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-xterm.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+scrollbar.o: salloc.h rxvtperl.h hookinc.h rsinc.h
+xdefaults.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+xdefaults.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+xdefaults.o: salloc.h rxvtperl.h hookinc.h rsinc.h version.h keyboard.h
+xpm.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
+xpm.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+xpm.o: rxvtperl.h hookinc.h rsinc.h
+
+command.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+command.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+command.lo: salloc.h rxvtperl.h hookinc.h rsinc.h version.h command.h
+command.lo: keyboard.h
 encoding.lo: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
 encoding.lo: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
 encoding.lo: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
@@ -277,81 +272,75 @@ encoding.lo: table/cns11643_1992_f.h table/big5_ext.h table/big5_plus.h
 encoding.lo: table/viscii.h table/jis0201_1976_0.h table/jis0208_1990_0.h
 encoding.lo: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.lo: table/compose.h table/category.h
-fdpass.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-fdpass.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-fdpass.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h
-init.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+fdpass.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+fdpass.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+fdpass.lo: salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h
+init.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 init.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 init.lo: salloc.h rxvtperl.h hookinc.h rsinc.h init.h
 iom.lo: iom.h iom_conf.h rxvtutil.h callback.h
-keyboard.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-keyboard.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-keyboard.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-keyboard.lo: command.h
-logging.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-logging.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-logging.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-main.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+keyboard.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+keyboard.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+keyboard.lo: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h command.h
+logging.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+logging.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+logging.lo: salloc.h rxvtperl.h hookinc.h rsinc.h ptytty.h
+main.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 main.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 main.lo: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-misc.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+misc.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 misc.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 misc.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
-netdisp.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-netdisp.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-netdisp.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-ptytty.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-ptytty.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-ptytty.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvt.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+netdisp.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+netdisp.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+netdisp.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
+ptytty.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+ptytty.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+ptytty.lo: salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h ptytty.h
+rxvt.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvt.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtc.lo: ../config.h rxvtdaemon.h rxvtutil.h fdpass.h rxvt.h rxvtlib.h
-rxvtc.lo: ptytty.h feature.h optinc.h encoding.h rxvtfont.h rxvttoolkit.h
-rxvtc.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvtd.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
+rxvtc.lo: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
+rxvtc.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+rxvtd.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
 rxvtd.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvtd.lo: salloc.h rxvtperl.h hookinc.h rsinc.h rxvtdaemon.h fdpass.h
 rxvtdaemon.lo: rxvtdaemon.h rxvtutil.h
-rxvtfont.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-rxvtfont.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-rxvtfont.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvtfont.lo: table/linedraw.h
+rxvtfont.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+rxvtfont.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvtfont.lo: salloc.h rxvtperl.h hookinc.h rsinc.h table/linedraw.h
 rxvtperl.lo: ../config.h iom.h iom_conf.h rxvtutil.h callback.h rxvt.h
-rxvtperl.lo: rxvtlib.h ptytty.h feature.h optinc.h encoding.h rxvtfont.h
-rxvtperl.lo: rxvttoolkit.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-rxvtperl.lo: perlxsi.c
-rxvttoolkit.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-rxvttoolkit.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-rxvttoolkit.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+rxvtperl.lo: rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h
+rxvtperl.lo: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h perlxsi.c
+rxvttoolkit.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+rxvttoolkit.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+rxvttoolkit.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtutil.lo: rxvtutil.h
 salloc.lo: salloc.h
-screen.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-screen.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-screen.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h salloc.C
-scrollbar-next.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar-next.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-next.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-next.lo: rsinc.h
-scrollbar-plain.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
+screen.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+screen.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+screen.lo: salloc.h rxvtperl.h hookinc.h rsinc.h salloc.C
+scrollbar-next.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar-next.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-next.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar-plain.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h
 scrollbar-plain.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-plain.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
 scrollbar-plain.lo: rsinc.h
-scrollbar-rxvt.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar-rxvt.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-rxvt.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-rxvt.lo: rsinc.h
-scrollbar-xterm.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
+scrollbar-rxvt.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar-rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-rxvt.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar-xterm.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h
 scrollbar-xterm.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-xterm.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
 scrollbar-xterm.lo: rsinc.h
-scrollbar.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-scrollbar.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-xdefaults.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-xdefaults.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-xdefaults.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
-xdefaults.lo: keyboard.h
-xpm.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
-xpm.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-xpm.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
+scrollbar.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+scrollbar.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+scrollbar.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
+xdefaults.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+xdefaults.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+xdefaults.lo: salloc.h rxvtperl.h hookinc.h rsinc.h version.h keyboard.h
+xpm.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
+xpm.lo: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+xpm.lo: rxvtperl.h hookinc.h rsinc.h
index 69cb0ad0f36670c5a15caf9518621e131438cb37..51bfd8faefabda1bc88f2c807019224de2ce99e1 100644 (file)
@@ -23,8 +23,6 @@
 #include "../config.h"
 #include "rxvt.h"
 
-#if ENABLE_FRILLS && HAVE_UNIX_FDPASS
-
 #include <sys/types.h>
 #include <sys/socket.h>
 
@@ -102,5 +100,3 @@ rxvt_recv_fd (int socket)
   return *(int *)CMSG_DATA (cmsg);
 }
 
-#endif
-
index 2c3c3905c2b2dedc5c12b1496db605f7ba508363..b8a576d2404cb0b65c49993fbe16804a4d0a2e71 100644 (file)
 #include "../config.h"
 #include "rxvt.h"
 
-#if ENABLE_FRILLS && HAVE_UNIX_FDPASS
-
 int rxvt_send_fd (int socket, int fd);
 int rxvt_recv_fd (int socket);
 
-#endif
 
index 07acf73f4066fe8ac18e6aad4111bfd339e1c290..c082588170071b794150c61b008b615da0470750 100644 (file)
 # define XAPPLOADDIRLOCALE     X11LIBDIR "/%s/app-defaults"
 #endif
 
+/*-------------------------------SECURITY-------------------------------*/
+
+/*
+ * define if you want to use a separate process for pty/tty handling
+ * when running setuid/setgid. You need this when making it setuid/setgid.
+ */
+#define PTYTTY_HELPER 1
+
 /*-----------------------SCREEN OPTIONS AND COLOURS---------------------*/
 
 /*
index adbc9805526ee21166f2e529f447cbf71dc3ccae..bfee0820439fbc3ea812ecf93ff11c85c796bc35 100644 (file)
@@ -1445,24 +1445,8 @@ rxvt_term::run_command (const char *const *argv)
         _exit (EXIT_FAILURE);
 
       default:
-        {
-#if defined(HAVE_STRUCT_UTMP) && defined(HAVE_TTYSLOT)
-          int fdstdin;
-
-          fdstdin = dup (STDIN_FILENO);
-          dup2 (pty->tty, STDIN_FILENO);
-#endif
-
-#ifdef UTMP_SUPPORT
-          privileged_utmp (SAVE);
-#endif
-
-#if defined(HAVE_STRUCT_UTMP) && defined(HAVE_TTYSLOT)
-
-          dup2 (fdstdin, STDIN_FILENO);
-          close (fdstdin);
-#endif
-        }
+        if (!OPTION (Opt_utmpInhibit))
+          pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
 
         pty->close_tty ();
         break;
index 86d3bdf12b4ffd7ebaec4bd4634d4d6968008e4e..464244817f287a17ecb40971c92325b925c0bd4f 100644 (file)
@@ -165,14 +165,19 @@ rxvt_ptytty_unix::login (int cmd_pid, bool login_shell, const char *hostname)
 #endif
 
 #if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID)
-
   {
 # ifdef HAVE_TTYSLOT
+    int fdstdin = dup (STDIN_FILENO);
+    dup2 (pty->tty, STDIN_FILENO);
+
     i = ttyslot ();
     if (rxvt_write_bsd_utmp (i, ut))
       utmp_pos = i;
+
+    dup2 (fdstdin, STDIN_FILENO);
+    close (fdstdin);
 # else
-    FILE           *fd0;
+    FILE *fd0;
 
     if ((fd0 = fopen (TTYTAB_FILENAME, "r")) != NULL)
       {
index 0bfadb688858d8d0494e33a406c7940665444aca..e65fd2334018eff4dd4d3a502afae98c16ca591a 100644 (file)
@@ -717,24 +717,6 @@ rxvt_privileges (rxvt_privaction action)
 #endif
 }
 
-#ifdef UTMP_SUPPORT
-void
-rxvt_term::privileged_utmp (rxvt_privaction action)
-{
-  if (OPTION (Opt_utmpInhibit))
-    return;
-
-  rxvt_privileges (RESTORE);
-
-  if (action == SAVE)
-    pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
-  else
-    pty->logout ();
-
-  rxvt_privileges (IGNORE);
-}
-#endif
-
 /*----------------------------------------------------------------------*/
 /*
  * window size/position calculcations for XSizeHint and other storage.
index bab59bde1ef5ed2ef307a3ed69887335f8ab6b8e..9f4740d6bb5c462b12df4b7971c217911baa7ec7 100644 (file)
 #include "../config.h"         /* NECESSARY */
 #include "rxvt.h"
 
-# include <cstdlib>
-# include <cstring>
+#include <cstdlib>
+#include <cstring>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <unistd.h>
+#include <fcntl.h>
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 # include <sys/ioctl.h>
 #endif
@@ -56,6 +52,8 @@
 #include <cstdio>
 #include <grp.h>
 
+#include "rxvtutil.h"
+#include "fdpass.h"
 #include "ptytty.h"
 
 /////////////////////////////////////////////////////////////////////////////
@@ -445,10 +443,184 @@ rxvt_ptytty_unix::get ()
   return true;
 }
 
+#if PTYTTY_HELPER
+
+static int sock_fd;
+static int pid;
+
+struct command
+{
+  enum { get, login, destroy } type;
+
+  rxvt_ptytty *id;
+
+  bool login_shell;
+  int cmd_pid;
+  char hostname[512]; // arbitrary, but should be plenty
+};
+
+struct rxvt_ptytty_proxy : zero_initialized, rxvt_ptytty
+{
+  rxvt_ptytty *id;
+
+  rxvt_ptytty_proxy ();
+  ~rxvt_ptytty_proxy ();
+
+  bool get ();
+  void login (int cmd_pid, bool login_shell, const char *hostname);
+};
+
+bool
+rxvt_ptytty_proxy::get ()
+{
+  command cmd;
+
+  cmd.type = command::get;
+
+  write (sock_fd, &cmd, sizeof (cmd));
+
+  if (read (sock_fd, &id, sizeof (id)) != sizeof (id))
+    rxvt_fatal ("protocol error while creating pty using helper process, aborting.\n");
+
+  if (!id)
+    return false;
+
+  if ((pty = rxvt_recv_fd (sock_fd)) < 0
+      || (tty = rxvt_recv_fd (sock_fd)) < 0)
+    rxvt_fatal ("protocol error while reading pty/tty fds from helper process, aborting.\n");
+
+  return true;
+}
+
+void
+rxvt_ptytty_proxy::login (int cmd_pid, bool login_shell, const char *hostname)
+{
+  command cmd;
+
+  cmd.type = command::login;
+  cmd.id = id;
+  cmd.cmd_pid = cmd_pid;
+  cmd.login_shell = login_shell;
+  strncpy (cmd.hostname, hostname, sizeof (cmd.hostname));
+
+  write (sock_fd, &cmd, sizeof (cmd));
+}
+
+rxvt_ptytty_proxy::~rxvt_ptytty_proxy ()
+{
+  command cmd;
+
+  cmd.type = command::destroy;
+  cmd.id = id;
+
+  write (sock_fd, &cmd, sizeof (cmd));
+}
+
+static
+void serve ()
+{
+  command cmd;
+  vector<rxvt_ptytty *> ptys;
+
+  while (read (sock_fd, &cmd, sizeof (command)) == sizeof (command))
+    {
+      if (cmd.type == command::get)
+        {
+          // -> id ptyfd ttyfd
+          cmd.id = new rxvt_ptytty_unix;
+
+          if (cmd.id->get ())
+            {
+              write (sock_fd, &cmd.id, sizeof (cmd.id));
+              ptys.push_back (cmd.id);
+
+              rxvt_send_fd (sock_fd, cmd.id->pty);
+              rxvt_send_fd (sock_fd, cmd.id->tty);
+            }
+          else
+            {
+              delete cmd.id;
+              cmd.id = 0;
+              write (sock_fd, &cmd.id, sizeof (cmd.id));
+            }
+        }
+      else if (cmd.type == command::login)
+        {
+          if (find (ptys.begin (), ptys.end (), cmd.id))
+            {
+              cmd.hostname[sizeof (cmd.hostname) - 1] = 0;
+              cmd.id->login (cmd.cmd_pid, cmd.login_shell, cmd.hostname);
+            }
+          else printf ("xxx hiya login no match %p\n", cmd.id);
+        }
+      else if (cmd.type == command::destroy)
+        {
+          rxvt_ptytty **pty = find (ptys.begin (), ptys.end (), cmd.id);
+
+          if (*pty)
+            {
+              ptys.erase (pty);
+              delete *pty;
+            }
+          else printf ("xxx hiya destroy no match %p\n", cmd.id);
+        }
+      else
+        break;
+    }
+
+  // destroy all ptys
+  for (rxvt_ptytty **i = ptys.end (); i-- > ptys.begin (); )
+    delete *i;
+}
+
+void rxvt_ptytty_server ()
+{
+  int sv[2];
+
+  if (socketpair (AF_UNIX, SOCK_STREAM, 0, sv))
+    rxvt_fatal ("could not create socket to communicate with pty/sessiondb helper, aborting.\n");
+
+  pid = fork ();
+
+  if (pid < 0)
+    rxvt_fatal ("could not create pty/sessiondb helper process, aborting.\n");
+
+  if (pid)
+    {
+      // client, urxvt
+      sock_fd = sv[0];
+      close (sv[1]);
+      fcntl (sock_fd, F_SETFD, FD_CLOEXEC);
+    }
+  else
+    {
+      // server, pty-helper
+      sock_fd = sv[1];
+
+      close (sv[0]);//D
+//      for (int fd = 0; fd < 1023; fd++)
+//        if (fd != sock_fd)
+//          close (fd);
+
+      serve ();
+      _exit (EXIT_SUCCESS);
+    }
+}
+#endif
+
 // a "factory" *g*
-rxvt_ptytty *rxvt_new_ptytty ()
+rxvt_ptytty *
+rxvt_new_ptytty ()
 {
-   return new rxvt_ptytty_unix;
+#if PTYTTY_HELPER
+  if (pid > 0)
+    {
+      // use helper process
+      return new rxvt_ptytty_proxy;
+    }
+  else
+#endif
+    return new rxvt_ptytty_unix;
 }
 
 /*----------------------- end-of-file (C source) -----------------------*/
index 8fcef8577ad2b3f13fdcf31aebb413acd7ea3e24..5b380c67f21883ee28eb92aff8db08640552aa7e 100644 (file)
 
 #endif
 
-struct rxvt_ptytty_base : rxvt_ptytty
-{
-  virtual void put () = 0;
-};
-
-struct rxvt_ptytty_unix : rxvt_ptytty_base
+struct rxvt_ptytty_unix : rxvt_ptytty
 {
   char *name;
 
index 66d781dc8a65b1c44bb837f6c110ad2e6f996428..312d728f28251275c67e6b5a28d7fb90a5a59ee8 100644 (file)
@@ -186,18 +186,15 @@ struct rxvt_ptytty {
   }
 
   virtual bool get () = 0;
-
   virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0;
-  virtual void logout () = 0;
 
   void close_tty ();
-
   bool make_controlling_tty ();
   void set_utf8_mode (bool on);
 };
 
-// a "factory" *g*
-rxvt_ptytty *rxvt_new_ptytty ();
+rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object
+void rxvt_ptytty_server (); // start the ptytty server process
 
 /*
  * the 'essential' information for reporting Mouse Events
index e49bb20378d69999d3172cc7cc4c88248522d7cb..31a7ff4c0a1b6ba9c8d15ad8f759f33739557871 100644 (file)
@@ -41,7 +41,7 @@ struct client : rxvt_connection {
 
 client::client ()
 {
-  if ((fd = socket (PF_UNIX, SOCK_STREAM, 0)) < 0)
+  if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
     {
       perror ("unable to create communications socket");
       exit (EXIT_FAILURE);
@@ -110,7 +110,6 @@ main (int argc, const char *const *argv)
       }
     else if (!strcmp (tok, "MSG") && c.recv (tok))
       fprintf (stderr, "%s", (const char *)tok);
-#if ENABLE_FRILLS && HAVE_UNIX_FDPASS
     else if (!strcmp (tok, "GETFD") && c.recv (cint))
       {
         if (rxvt_send_fd (c.fd, cint) < 0)
@@ -119,7 +118,6 @@ main (int argc, const char *const *argv)
             exit (EXIT_FAILURE);
           }
       }
-#endif
     else if (!strcmp (tok, "END"))
       {
         int success;
index ddc7b76ff4b1a20f6964baf04ec4c792a240ef4c..b79c70f83165cf88d105d2127859659dde699605 100644 (file)
@@ -73,7 +73,7 @@ struct unix_listener {
 unix_listener::unix_listener (const char *sockname)
 : accept_ev (this, &unix_listener::accept_cb)
 {
-  if ((fd = socket (PF_UNIX, SOCK_STREAM, 0)) < 0)
+  if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
     {
       perror ("unable to create listening socket");
       exit (EXIT_FAILURE);
@@ -120,13 +120,9 @@ void unix_listener::accept_cb (io_watcher &w, short revents)
 
 int server::getfd (int remote_fd)
 {
-#if ENABLE_FRILLS && HAVE_UNIX_FDPASS
   send ("GETFD");
   send (remote_fd);
   return rxvt_recv_fd (fd);
-#else
-  return -1;
-#endif
 }
 
 void server::log_msg (const char *msg)