diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-09-13 21:15:17 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-09-13 21:15:17 +0000 |
commit | e9bdc24ad7c749611474016dc7cc003c139a90ac (patch) | |
tree | e003080a47220cef8d8f3693692e88fc7c04a82b /app | |
parent | bb15588b00a2ec2ede393fc484d5b56f9ee3864b (diff) |
merge xconsole 1.0.3
Diffstat (limited to 'app')
-rw-r--r-- | app/xconsole/Makefile.am | 2 | ||||
-rw-r--r-- | app/xconsole/Makefile.in | 40 | ||||
-rw-r--r-- | app/xconsole/compile | 142 | ||||
-rw-r--r-- | app/xconsole/configure | 20 | ||||
-rw-r--r-- | app/xconsole/configure.ac | 2 | ||||
-rw-r--r-- | app/xconsole/xconsole.c | 15 |
6 files changed, 25 insertions, 196 deletions
diff --git a/app/xconsole/Makefile.am b/app/xconsole/Makefile.am index b6245d530..78817daf5 100644 --- a/app/xconsole/Makefile.am +++ b/app/xconsole/Makefile.am @@ -21,7 +21,7 @@ bin_PROGRAMS = xconsole -xconsole_CFLAGS = $(XCONSOLE_CFLAGS) +AM_CFLAGS = $(XCONSOLE_CFLAGS) xconsole_LDADD = $(XCONSOLE_LIBS) xconsole_SOURCES = \ diff --git a/app/xconsole/Makefile.in b/app/xconsole/Makefile.in index d93d774b4..b064ef046 100644 --- a/app/xconsole/Makefile.in +++ b/app/xconsole/Makefile.in @@ -65,7 +65,7 @@ bin_PROGRAMS = xconsole$(EXEEXT) DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - compile config.guess config.sub depcomp install-sh missing + config.guess config.sub depcomp install-sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -81,8 +81,8 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__xconsole_SOURCES_DIST = xconsole.c privsep.c -@USE_PRIVSEP_TRUE@am__objects_1 = xconsole-privsep.$(OBJEXT) -am_xconsole_OBJECTS = xconsole-xconsole.$(OBJEXT) $(am__objects_1) +@USE_PRIVSEP_TRUE@am__objects_1 = privsep.$(OBJEXT) +am_xconsole_OBJECTS = xconsole.$(OBJEXT) $(am__objects_1) xconsole_OBJECTS = $(am_xconsole_OBJECTS) am__DEPENDENCIES_1 = xconsole_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -227,7 +227,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -xconsole_CFLAGS = $(XCONSOLE_CFLAGS) +AM_CFLAGS = $(XCONSOLE_CFLAGS) xconsole_LDADD = $(XCONSOLE_LIBS) xconsole_SOURCES = xconsole.c $(am__append_1) appman_PRE = \ @@ -348,8 +348,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xconsole-privsep.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xconsole-xconsole.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privsep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xconsole.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @@ -364,34 +364,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -xconsole-xconsole.o: xconsole.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -MT xconsole-xconsole.o -MD -MP -MF "$(DEPDIR)/xconsole-xconsole.Tpo" -c -o xconsole-xconsole.o `test -f 'xconsole.c' || echo '$(srcdir)/'`xconsole.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xconsole-xconsole.Tpo" "$(DEPDIR)/xconsole-xconsole.Po"; else rm -f "$(DEPDIR)/xconsole-xconsole.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xconsole.c' object='xconsole-xconsole.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -c -o xconsole-xconsole.o `test -f 'xconsole.c' || echo '$(srcdir)/'`xconsole.c - -xconsole-xconsole.obj: xconsole.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -MT xconsole-xconsole.obj -MD -MP -MF "$(DEPDIR)/xconsole-xconsole.Tpo" -c -o xconsole-xconsole.obj `if test -f 'xconsole.c'; then $(CYGPATH_W) 'xconsole.c'; else $(CYGPATH_W) '$(srcdir)/xconsole.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xconsole-xconsole.Tpo" "$(DEPDIR)/xconsole-xconsole.Po"; else rm -f "$(DEPDIR)/xconsole-xconsole.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xconsole.c' object='xconsole-xconsole.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -c -o xconsole-xconsole.obj `if test -f 'xconsole.c'; then $(CYGPATH_W) 'xconsole.c'; else $(CYGPATH_W) '$(srcdir)/xconsole.c'; fi` - -xconsole-privsep.o: privsep.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -MT xconsole-privsep.o -MD -MP -MF "$(DEPDIR)/xconsole-privsep.Tpo" -c -o xconsole-privsep.o `test -f 'privsep.c' || echo '$(srcdir)/'`privsep.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xconsole-privsep.Tpo" "$(DEPDIR)/xconsole-privsep.Po"; else rm -f "$(DEPDIR)/xconsole-privsep.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='privsep.c' object='xconsole-privsep.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -c -o xconsole-privsep.o `test -f 'privsep.c' || echo '$(srcdir)/'`privsep.c - -xconsole-privsep.obj: privsep.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -MT xconsole-privsep.obj -MD -MP -MF "$(DEPDIR)/xconsole-privsep.Tpo" -c -o xconsole-privsep.obj `if test -f 'privsep.c'; then $(CYGPATH_W) 'privsep.c'; else $(CYGPATH_W) '$(srcdir)/privsep.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xconsole-privsep.Tpo" "$(DEPDIR)/xconsole-privsep.Po"; else rm -f "$(DEPDIR)/xconsole-privsep.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='privsep.c' object='xconsole-privsep.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xconsole_CFLAGS) $(CFLAGS) -c -o xconsole-privsep.obj `if test -f 'privsep.c'; then $(CYGPATH_W) 'privsep.c'; else $(CYGPATH_W) '$(srcdir)/privsep.c'; fi` uninstall-info-am: install-appdefaultDATA: $(appdefault_DATA) @$(NORMAL_INSTALL) diff --git a/app/xconsole/compile b/app/xconsole/compile deleted file mode 100644 index 1b1d23216..000000000 --- a/app/xconsole/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey <tromey@cygnus.com>. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to <bug-automake@gnu.org> or send patches to -# <automake-patches@gnu.org>. - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/app/xconsole/configure b/app/xconsole/configure index 5c9f51156..cede7bdb6 100644 --- a/app/xconsole/configure +++ b/app/xconsole/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xconsole 1.0.2. +# Generated by GNU Autoconf 2.59 for xconsole 1.0.3. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xconsole' PACKAGE_TARNAME='xconsole' -PACKAGE_VERSION='1.0.2' -PACKAGE_STRING='xconsole 1.0.2' +PACKAGE_VERSION='1.0.3' +PACKAGE_STRING='xconsole 1.0.3' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' # Factoring default headers for most tests. @@ -799,7 +799,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xconsole 1.0.2 to adapt to many kinds of systems. +\`configure' configures xconsole 1.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -865,7 +865,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xconsole 1.0.2:";; + short | recursive ) echo "Configuration of xconsole 1.0.3:";; esac cat <<\_ACEOF @@ -1004,7 +1004,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xconsole configure 1.0.2 +xconsole configure 1.0.3 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1018,7 +1018,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xconsole $as_me 1.0.2, which was +It was created by xconsole $as_me 1.0.3, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1661,7 +1661,7 @@ fi # Define the identity of the package. PACKAGE='xconsole' - VERSION='1.0.2' + VERSION='1.0.3' cat >>confdefs.h <<_ACEOF @@ -5433,7 +5433,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by xconsole $as_me 1.0.2, which was +This file was extended by xconsole $as_me 1.0.3, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5496,7 +5496,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xconsole config.status 1.0.2 +xconsole config.status 1.0.3 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/app/xconsole/configure.ac b/app/xconsole/configure.ac index 8a9c6ffd2..301e513be 100644 --- a/app/xconsole/configure.ac +++ b/app/xconsole/configure.ac @@ -22,7 +22,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(xconsole,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xconsole) +AC_INIT(xconsole,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xconsole) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE diff --git a/app/xconsole/xconsole.c b/app/xconsole/xconsole.c index e3b67cf24..095cd5cc5 100644 --- a/app/xconsole/xconsole.c +++ b/app/xconsole/xconsole.c @@ -73,13 +73,13 @@ extern char *_XawTextGetSTRING(TextWidget ctx, XawTextPosition left, # include <pty.h> # endif #endif -#ifdef USE_PRIVSEP -# include <pwd.h> -#endif +#ifdef USE_PRIVSEP +#include <pwd.h> extern int priv_init(uid_t, gid_t); extern int priv_openpty(int *, int *); extern int priv_set_console(int); +#endif /* Fix ISC brain damage. When using gcc fdopen isn't declared in <stdio.h>. */ #if defined(ISC) && __STDC__ && !defined(ISC30) @@ -294,14 +294,13 @@ OpenConsole(void) { # ifdef TIOCCONS int on = 1; -#ifdef USE_PRIVSEP +# ifdef USE_PRIVSEP if (priv_set_console(tty_fd) != -1) input = fdopen (pty_fd, "r"); -#else +# else if (ioctl (tty_fd, TIOCCONS, (char *) &on) != -1) input = fdopen (pty_fd, "r"); -#endif - +# endif # else # ifndef Lynx int consfd = open("/dev/console", O_RDONLY); @@ -670,7 +669,6 @@ main(int argc, char *argv[]) { Arg arglist[10]; Cardinal num_args; - #ifdef USE_PRIVSEP struct passwd *pw; #endif @@ -680,6 +678,7 @@ main(int argc, char *argv[]) &argc, argv); XtGetApplicationResources (top, (XtPointer)&app_resources, resources, XtNumber (resources), NULL, 0); + #ifdef USE_PRIVSEP /* Revoke privileges if any */ if (getuid() == 0) { |