Update to iceauth 1.0.7
This commit is contained in:
parent
d6201822a8
commit
e0507257d8
@ -1,3 +1,124 @@
|
||||
commit fba114e03845a4cfab966f0545e809fdba9e9365
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Jan 16 22:12:11 2015 -0800
|
||||
|
||||
iceauth 1.0.7
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 04c0fe624bf0140e0f938942e48a01ce5c01b7be
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Jun 1 23:38:45 2014 -0700
|
||||
|
||||
autogen.sh: Honor NOCONFIGURE=1
|
||||
|
||||
See http://people.gnome.org/~walters/docs/build-api.txt
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 6e38d6b6598f3beb36a5526f482a6356e85c4fd5
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Jun 1 23:38:45 2014 -0700
|
||||
|
||||
configure: Drop AM_MAINTAINER_MODE
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit b0c12dd905053b38d81d44c222dbef999e992193
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Jun 1 23:38:40 2014 -0700
|
||||
|
||||
config: Add missing AC_CONFIG_SRCDIR
|
||||
|
||||
Regroup AC statements under the Autoconf initialization section.
|
||||
Regroup AM statements under the Automake initialization section.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 2222cab2a3cc2615e7a3f2ec8665fdfcabc0436c
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sat May 31 16:15:19 2014 -0700
|
||||
|
||||
More constification cleanup
|
||||
|
||||
Started by fixing gcc warning:
|
||||
iceauth.c:47:1: warning: initialization discards ‘const’ qualifier from
|
||||
pointer target type [enabled by default]
|
||||
static char *defcmds[] = { "source", "-", NULL }; /* default command */
|
||||
^
|
||||
|
||||
and chasing down the rabbit hole of the functions the command line
|
||||
arguments can be passed through, until we came out the other side
|
||||
const clean.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 2e692217544b8712d7bb41776cfd7f1bcca1070b
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Dec 8 12:54:10 2013 -0800
|
||||
|
||||
Free old argv array if realloc fails to enlarge it
|
||||
|
||||
Found by cppcheck:
|
||||
[app/iceauth/process.c:302]: (error) Common realloc mistake:
|
||||
'argv' nulled but not freed upon failure
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit f6316d16b2239220dd9f043bcc628a503f89ab5c
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Nov 5 23:48:50 2013 -0800
|
||||
|
||||
Print which option was in error along with usage message
|
||||
|
||||
Special case -u, since it's documented as printing the usage message
|
||||
(sort of like an ancient --help), so shouldn't be called unrecognized.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit acee3b71b38ba4bcdd0b46557546e22dcdc320cb
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Nov 5 23:34:20 2013 -0800
|
||||
|
||||
Add -V flag to print version
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit ad85d2eb4e44f21e8e38aa3bdec4acb139989218
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Nov 5 23:26:24 2013 -0800
|
||||
|
||||
Fix "noexistent" typo in error message
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit e371fa337f256306fb93eaca7fbbe8ee5283dcfa
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Nov 5 23:20:34 2013 -0800
|
||||
|
||||
Actually print command list in usage message
|
||||
|
||||
The xauth routine this was based on took three arguments:
|
||||
a file pointer, a command name, and a prefix.
|
||||
|
||||
If a command name is given, prints help on that command,
|
||||
else if it's null, prints help on all commands.
|
||||
|
||||
The iceauth version has only two arguments: file pointer & command name.
|
||||
It was being called with file pointer & prefix, and since the prefix
|
||||
matched no command names, no help was printed.
|
||||
|
||||
Since the way iceauth's help list is structured doesn't make it easy
|
||||
to add a prefix to every line, skip indentation for now and just pass
|
||||
NULL for the command argument.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit c07d443d43e53cfe21b53a9a0eafcd6189432867
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Jul 23 23:15:01 2013 -0700
|
||||
|
@ -75,8 +75,8 @@ bin_PROGRAMS = iceauth$(EXEEXT)
|
||||
subdir = .
|
||||
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
|
||||
$(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS compile \
|
||||
config.guess config.sub depcomp install-sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
@ -234,7 +234,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LINT = @LINT@
|
||||
LINT_FLAGS = @LINT_FLAGS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
@ -328,7 +327,7 @@ all: config.h
|
||||
.SUFFIXES: .c .o .obj
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -355,9 +354,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
@ -368,7 +367,7 @@ config.h: stamp-h1
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
103
app/iceauth/aclocal.m4
vendored
103
app/iceauth/aclocal.m4
vendored
@ -799,44 +799,6 @@ fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
# Default is to disable them, unless 'enable' is passed literally.
|
||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
||||
# can override the default with the --enable/--disable switch.
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[m4_case(m4_default([$1], [disable]),
|
||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
||||
am_maintainer_other[ make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer])],
|
||||
[USE_MAINTAINER_MODE=$enableval],
|
||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST([MAINT])dnl
|
||||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
@ -1279,7 +1241,7 @@ dnl DEALINGS IN THE SOFTWARE.
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.16.2])
|
||||
m4_define([vers_have], [1.19.0])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
@ -1329,6 +1291,7 @@ if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
TRADITIONALCPPFLAGS="-traditional"
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
@ -1337,6 +1300,7 @@ else
|
||||
fi
|
||||
rm -f conftest.$ac_ext
|
||||
AC_SUBST(RAWCPPFLAGS)
|
||||
AC_SUBST(TRADITIONALCPPFLAGS)
|
||||
]) # XORG_PROG_RAWCPP
|
||||
|
||||
# XORG_MANPAGE_SECTIONS()
|
||||
@ -1861,9 +1825,10 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
]) # XORG_WITH_ASCIIDOC
|
||||
|
||||
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
|
||||
# --------------------------------
|
||||
# -------------------------------------------
|
||||
# Minimum version: 1.5.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
# Minimum version for optional DOT checking: 1.18.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
@ -1883,6 +1848,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
||||
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
||||
AC_ARG_VAR([DOT], [Path to the dot graphics utility])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(doxygen,
|
||||
AS_HELP_STRING([--with-doxygen],
|
||||
@ -1926,6 +1892,20 @@ m4_ifval([$1],
|
||||
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
|
||||
dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
|
||||
dnl HAVE_DOT = @HAVE_DOT@
|
||||
HAVE_DOT=no
|
||||
if test "x$have_doxygen" = "xyes"; then
|
||||
AC_PATH_PROG([DOT], [dot])
|
||||
if test "x$DOT" != "x"; then
|
||||
HAVE_DOT=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([HAVE_DOT])
|
||||
AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
]) # XORG_WITH_DOXYGEN
|
||||
|
||||
@ -2108,6 +2088,29 @@ fi])
|
||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
]) # XORG_WITH_FOP
|
||||
|
||||
# XORG_WITH_M4([MIN-VERSION])
|
||||
# ---------------------------
|
||||
# Minimum version: 1.19.0
|
||||
#
|
||||
# This macro attempts to locate an m4 macro processor which supports
|
||||
# -I option and is only useful for modules relying on M4 in order to
|
||||
# expand macros in source code files.
|
||||
#
|
||||
# Interface to module:
|
||||
# M4: returns the path of the m4 program found
|
||||
# returns the path set by the user in the environment
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_M4], [
|
||||
AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
|
||||
[AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
|
||||
[[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
|
||||
ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
|
||||
[AC_MSG_ERROR([could not find m4 that supports -I option])],
|
||||
[$PATH:/usr/gnu/bin])])
|
||||
|
||||
AC_SUBST([M4], [$ac_cv_path_M4])
|
||||
]) # XORG_WITH_M4
|
||||
|
||||
# XORG_WITH_PS2PDF([DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
@ -2562,7 +2565,8 @@ AC_ARG_ENABLE(malloc0returnsnull,
|
||||
|
||||
AC_MSG_CHECKING([whether malloc(0) returns NULL])
|
||||
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||
AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
],[
|
||||
char *m0, *r0, *c0, *p;
|
||||
@ -2572,9 +2576,9 @@ if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
c0 = calloc(0,10);
|
||||
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
|
||||
])],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes],
|
||||
[MALLOC_ZERO_RETURNS_NULL=no],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes])
|
||||
[xorg_cv_malloc0_returns_null=yes],
|
||||
[xorg_cv_malloc0_returns_null=no])])
|
||||
MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
|
||||
fi
|
||||
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
||||
|
||||
@ -2785,11 +2789,11 @@ fi
|
||||
found="no"
|
||||
m4_foreach([flag], m4_cdr($@), [
|
||||
if test $found = "no" ; then
|
||||
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
|
||||
if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||
fi
|
||||
|
||||
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
|
||||
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
||||
fi
|
||||
|
||||
@ -2863,7 +2867,7 @@ AC_LANG_CASE(
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
|
||||
]
|
||||
)
|
||||
@ -2872,16 +2876,17 @@ AC_LANG_CASE(
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
|
||||
# These are currently disabled because they are noisy. They will be enabled
|
||||
# in the future once the codebase is sufficiently modernized to silence
|
||||
# them. For now, I don't want them to drown out the other warnings.
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
|
||||
# Turn some warnings into errors, so we don't accidently get successful builds
|
||||
# when there are problems that should be fixed.
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
545
app/iceauth/configure
vendored
545
app/iceauth/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -21,14 +21,16 @@ dnl PERFORMANCE OF THIS SOFTWARE.
|
||||
dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
# Initialize Autoconf
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([iceauth], [1.0.6],
|
||||
AC_INIT([iceauth], [1.0.7],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [iceauth])
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
# Initialize Automake
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
|
||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
|
||||
|
@ -44,7 +44,7 @@ Bool break_locks = False; /* for error recovery */
|
||||
*/
|
||||
|
||||
static char *authfilename = NULL; /* filename of cookie file */
|
||||
static char *defcmds[] = { "source", "-", NULL }; /* default command */
|
||||
static const char *defcmds[] = { "source", "-", NULL }; /* default command */
|
||||
static int ndefcmds = 2;
|
||||
static const char *defsource = "(stdin)";
|
||||
|
||||
@ -53,7 +53,7 @@ static const char *defsource = "(stdin)";
|
||||
* utility routines
|
||||
*/
|
||||
static void _X_NORETURN
|
||||
usage (void)
|
||||
usage (int exitcode)
|
||||
{
|
||||
static const char prefixmsg[] =
|
||||
"\n"
|
||||
@ -63,6 +63,7 @@ usage (void)
|
||||
" -q turn off extra messages\n"
|
||||
" -i ignore locks on authority file\n"
|
||||
" -b break locks on authority file\n"
|
||||
" -V print version and exit\n"
|
||||
"\n"
|
||||
"and commands have the following syntax:\n";
|
||||
static const char suffixmsg[] =
|
||||
@ -71,10 +72,10 @@ usage (void)
|
||||
|
||||
fprintf (stderr, "usage: %s [-options ...] [command arg ...]\n",
|
||||
ProgramName);
|
||||
fprintf (stderr, "%s\n", prefixmsg);
|
||||
print_help (stderr, " "); /* match prefix indentation */
|
||||
fprintf (stderr, "%s", prefixmsg);
|
||||
print_help (stderr, NULL);
|
||||
fprintf (stderr, "\n%s\n", suffixmsg);
|
||||
exit (1);
|
||||
exit (exitcode);
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +87,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
const char *sourcename = defsource;
|
||||
char **arglist = defcmds;
|
||||
const char **arglist = defcmds;
|
||||
int nargs = ndefcmds;
|
||||
int status;
|
||||
|
||||
@ -101,9 +102,16 @@ main (int argc, char *argv[])
|
||||
for (flag = (arg + 1); *flag; flag++) {
|
||||
switch (*flag) {
|
||||
case 'f': /* -f authfilename */
|
||||
if (++i >= argc) usage ();
|
||||
if (++i >= argc) {
|
||||
fprintf(stderr, "%s: -f requires an argument\n",
|
||||
ProgramName);
|
||||
usage (1);
|
||||
}
|
||||
authfilename = argv[i];
|
||||
continue;
|
||||
case 'V': /* -V */
|
||||
printf("%s\n", PACKAGE_STRING);
|
||||
exit(0);
|
||||
case 'v': /* -v */
|
||||
verbose = 1;
|
||||
continue;
|
||||
@ -116,14 +124,18 @@ main (int argc, char *argv[])
|
||||
case 'i': /* -i */
|
||||
ignore_locks = True;
|
||||
continue;
|
||||
case 'u': /* -u */
|
||||
usage (0);
|
||||
default:
|
||||
usage ();
|
||||
fprintf(stderr, "%s: unrecognized option '%s'\n",
|
||||
ProgramName, flag);
|
||||
usage (1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sourcename = "(argv)";
|
||||
nargs = argc - i;
|
||||
arglist = argv + i;
|
||||
arglist = (const char **) argv + i;
|
||||
if (verbose == -1) verbose = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ extern const char *ProgramName;
|
||||
|
||||
extern int auth_initialize ( char *authfilename );
|
||||
extern int auth_finalize ( void );
|
||||
extern int process_command ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
extern int process_command ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
extern int print_help ( FILE *fp, const char *cmd );
|
||||
|
||||
extern int verbose;
|
||||
|
@ -157,7 +157,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LINT = @LINT@
|
||||
LINT_FLAGS = @LINT_FLAGS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
@ -242,7 +241,7 @@ all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -267,9 +266,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-appmanDATA: $(appman_DATA)
|
||||
|
@ -51,6 +51,8 @@ on the \fIiceauth\fP command line, or in scripts.
|
||||
.PP
|
||||
\fB\-u\fP Print basic usage instructions
|
||||
.PP
|
||||
\fB\-V\fP Print version and exit
|
||||
.PP
|
||||
.SH USAGE
|
||||
.PP
|
||||
When \fIiceauth\fP is run it will allow the following set of commands
|
||||
|
@ -47,7 +47,7 @@ typedef struct _AuthList { /* linked list of entries */
|
||||
|
||||
#define add_to_list(h,t,e) {if (t) (t)->next = (e); else (h) = (e); (t) = (e);}
|
||||
|
||||
typedef int (*ProcessFunc)(const char *, int, int, char **);
|
||||
typedef int (*ProcessFunc)(const char *, int, int, const char **);
|
||||
typedef int (*DoFunc)(const char *, int, IceAuthFileEntry *, void *);
|
||||
|
||||
typedef struct _CommandTable { /* commands that are understood */
|
||||
@ -88,7 +88,7 @@ static char **split_into_words ( char *src, int *argcp );
|
||||
static FILE *open_file ( const char **filenamep, const char *mode, Bool *usedstdp, const char *srcfn, int srcln, const char *cmd );
|
||||
static int read_auth_entries ( FILE *fp, AuthList **headp, AuthList **tailp );
|
||||
static int cvthexkey ( const char *hexstr, char **ptrp );
|
||||
static int dispatch_command ( const char *inputfilename, int lineno, int argc, char **argv, const CommandTable *tab, int *statusp );
|
||||
static int dispatch_command ( const char *inputfilename, int lineno, int argc, const char **argv, const CommandTable *tab, int *statusp );
|
||||
static void die ( int sig ) _X_NORETURN;
|
||||
static void catchsig ( int sig ) _X_NORETURN;
|
||||
static void register_signals ( void );
|
||||
@ -98,19 +98,19 @@ static int dump_entry ( const char *inputfilename, int lineno, IceAuthFileEntry
|
||||
static int extract_entry ( const char *inputfilename, int lineno, IceAuthFileEntry *auth, void *data );
|
||||
static int match_auth ( IceAuthFileEntry *a, IceAuthFileEntry *b, int *authDataSame );
|
||||
static int merge_entries ( AuthList **firstp, AuthList *second, int *nnewp, int *nreplp, int *ndupp );
|
||||
static int search_and_do ( const char *inputfilename, int lineno, int start, int argc, char *argv[], DoFunc do_func, void *data );
|
||||
static int search_and_do ( const char *inputfilename, int lineno, int start, int argc, const char *argv[], DoFunc do_func, void *data );
|
||||
static int remove_entry ( const char *inputfilename, int lineno, IceAuthFileEntry *auth, void *data );
|
||||
static int do_help ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_questionmark ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_list ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_merge ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_extract ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_add ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_remove ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_info ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_exit ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_quit ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_source ( const char *inputfilename, int lineno, int argc, char **argv );
|
||||
static int do_help ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_questionmark ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_list ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_merge ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_extract ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_add ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_remove ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_info ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_exit ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_quit ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
static int do_source ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
|
||||
static const CommandTable command_table[] = { /* table of known commands */
|
||||
{ "add", 2, 3, do_add,
|
||||
@ -298,9 +298,13 @@ static char **split_into_words ( /* argvify string */
|
||||
savec = *src;
|
||||
*src = '\0';
|
||||
if (cur == total) {
|
||||
char **prevargv = argv;
|
||||
total += WORDSTOALLOC;
|
||||
argv = (char **) realloc (argv, total * sizeof (char *));
|
||||
if (!argv) return NULL;
|
||||
if (!argv) {
|
||||
free (prevargv);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
argv[cur++] = jword;
|
||||
if (savec) src++; /* if not last on line advance */
|
||||
@ -439,7 +443,7 @@ static int dispatch_command (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv,
|
||||
const char **argv,
|
||||
const CommandTable *tab,
|
||||
int *statusp)
|
||||
{
|
||||
@ -710,7 +714,7 @@ int process_command (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int status;
|
||||
|
||||
@ -920,7 +924,7 @@ static int search_and_do (
|
||||
int lineno,
|
||||
int start,
|
||||
int argc,
|
||||
char *argv[],
|
||||
const char *argv[],
|
||||
DoFunc do_func,
|
||||
void *data)
|
||||
{
|
||||
@ -928,7 +932,7 @@ static int search_and_do (
|
||||
int status = 0;
|
||||
int errors = 0;
|
||||
AuthList *l, *next;
|
||||
char *protoname, *protodata, *netid, *authname;
|
||||
const char *protoname, *protodata, *netid, *authname;
|
||||
|
||||
for (l = iceauth_head; l; l = next)
|
||||
{
|
||||
@ -1040,9 +1044,9 @@ static int do_help (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
char *cmd = (argc > 1 ? argv[1] : NULL);
|
||||
const char *cmd = (argc > 1 ? argv[1] : NULL);
|
||||
int n;
|
||||
|
||||
n = print_help (stdout, cmd);
|
||||
@ -1060,7 +1064,7 @@ static int do_help (
|
||||
if (n == 0) {
|
||||
prefix (inputfilename, lineno);
|
||||
/* already know that cmd is set in this case */
|
||||
fprintf (stderr, "no help for noexistent command \"%s\"\n", cmd);
|
||||
fprintf (stderr, "no help for nonexistent command \"%s\"\n", cmd);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1074,7 +1078,7 @@ static int do_questionmark (
|
||||
const char *inputfilename _X_UNUSED,
|
||||
int lineno _X_UNUSED,
|
||||
int argc _X_UNUSED,
|
||||
char **argv _X_UNUSED)
|
||||
const char **argv _X_UNUSED)
|
||||
{
|
||||
const CommandTable *ct;
|
||||
unsigned int i;
|
||||
@ -1112,7 +1116,7 @@ static int do_list (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
struct _list_data ld;
|
||||
|
||||
@ -1142,7 +1146,7 @@ static int do_merge (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int i;
|
||||
int errors = 0;
|
||||
@ -1206,7 +1210,7 @@ static int do_extract (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int errors;
|
||||
struct _extract_data ed;
|
||||
@ -1250,15 +1254,15 @@ static int do_add (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int n, nnew, nrepl, ndup;
|
||||
char *protoname;
|
||||
char *protodata_hex;
|
||||
const char *protoname;
|
||||
const char *protodata_hex;
|
||||
char *protodata = NULL; /* not required */
|
||||
char *netid;
|
||||
char *authname;
|
||||
char *authdata_hex;
|
||||
const char *netid;
|
||||
const char *authname;
|
||||
const char *authdata_hex;
|
||||
char *authdata = NULL;
|
||||
int protodata_len, authdata_len;
|
||||
IceAuthFileEntry *auth = NULL;
|
||||
@ -1432,7 +1436,7 @@ static int do_remove (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int nremoved = 0;
|
||||
int errors;
|
||||
@ -1456,7 +1460,7 @@ static int do_info (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int n;
|
||||
AuthList *l;
|
||||
@ -1491,7 +1495,7 @@ static int do_exit (
|
||||
const char *inputfilename _X_UNUSED,
|
||||
int lineno _X_UNUSED,
|
||||
int argc _X_UNUSED,
|
||||
char **argv _X_UNUSED)
|
||||
const char **argv _X_UNUSED)
|
||||
{
|
||||
/* allow bogus stuff */
|
||||
alldone = True;
|
||||
@ -1506,7 +1510,7 @@ static int do_quit (
|
||||
const char *inputfilename _X_UNUSED,
|
||||
int lineno _X_UNUSED,
|
||||
int argc _X_UNUSED,
|
||||
char **argv _X_UNUSED)
|
||||
const char **argv _X_UNUSED)
|
||||
{
|
||||
/* allow bogus stuff */
|
||||
die (0);
|
||||
@ -1522,7 +1526,7 @@ static int do_source (
|
||||
const char *inputfilename,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
const char *script;
|
||||
char buf[BUFSIZ];
|
||||
@ -1569,7 +1573,8 @@ static int do_source (
|
||||
buf[--len] = '\0'; /* remove new line */
|
||||
subargv = split_into_words (buf, &subargc);
|
||||
if (subargv) {
|
||||
status = process_command (script, sublineno, subargc, subargv);
|
||||
status = process_command (script, sublineno, subargc,
|
||||
(const char **) subargv);
|
||||
free ((char *) subargv);
|
||||
errors += status;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user