summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-10iceauth 1.0.10HEADiceauth-1.0.10masterAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-17unifdef __UNIXOS2__Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-03Variable scope reductions, as suggested by cppcheckAlan Coopersmith2-48/+42
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-03Silence -Wanalyzer-out-of-bounds warnings from gcc 13Alan Coopersmith1-1/+1
Analyzer seems not to realize that the last allocated argv entry should always be set to NULL, causing the || to stop checking argv entries before getting to any that are not allocated. Raising our minimum allocation from 4 pointers to 6 soothes it, and costs us basically nothing. process.c:1285:26: warning: heap-based buffer over-read [CWE-126] [-Wanalyzer-out-of-bounds] 1285 | !argv[3] || !argv[4] || !argv[5]) | ~~~~^~~ [...] process.c:1285:26: note: read of 8 bytes from after the end of the region 1285 | !argv[3] || !argv[4] || !argv[5]) | ~~~~^~~ process.c:1285:38: warning: heap-based buffer over-read [CWE-126] [-Wanalyzer-out-of-bounds] 1285 | !argv[3] || !argv[4] || !argv[5]) | ~~~~^~~ [...] process.c:1285:38: note: read of 8 bytes from after the end of the region 1285 | !argv[3] || !argv[4] || !argv[5]) | ~~~~^~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-03Use reallocarray if available, provide local version if notAlan Coopersmith2-2/+22
Based on similar commits to xauth Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09configure: Use AC_SYS_LARGEFILE to enable large file supportAlan Coopersmith1-0/+3
While .ICEauthority files should never be more than 2gb in size, they may be stored on filesystems with large inodes. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03iceauth 1.0.9iceauth-1.0.9Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-03Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-03gitlab CI: add a basic build testAlan Coopersmith1-0/+98
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-11-28Fix spelling/wording issuesAlan Coopersmith2-4/+4
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-16Update README for gitlab migrationAlan Coopersmith3-27/+21
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-24Fix segmentation fault on invalid input.Tobias Stoeckmann1-2/+4
The 'add' command leads to a segmentation fault on invalid input. Two arguments to 'add' can be quoted, but the quotation check does not properly parse a single double quote: $ echo 'add 0 " 0 0 0' | iceauth Segmentation fault $ _ This happens because the code does not properly check if the argument consists of just one quote. Technically, it is true that the first and the last characters are double quotes. Therefore it also takes a check to verify that the length of the string is at least 2. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-04iceauth 1.0.8iceauth-1.0.8Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-26autogen: add default patch prefixMihail Konev1-0/+3
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov1-4/+4
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer1-1/+1
Syncs the invocation of configure with the one from the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2015-04-24Add -u & -V options to synopsis in man pageNiveditha Rau1-1/+1
Signed-off-by: Niveditha Rau <niveditha.rau@oracle.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-01-16iceauth 1.0.7iceauth-1.0.7Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-01autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith1-2/+3
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-01configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-01config: Add missing AC_CONFIG_SRCDIRAlan Coopersmith1-2/+5
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>
2014-05-31More constification cleanupAlan Coopersmith3-40/+41
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>
2013-12-09Free old argv array if realloc fails to enlarge itAlan Coopersmith1-1/+5
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>
2013-11-22Print which option was in error along with usage messageAlan Coopersmith1-4/+12
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>
2013-11-22Add -V flag to print versionAlan Coopersmith2-0/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-22Fix "noexistent" typo in error messageAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-22Actually print command list in usage messageAlan Coopersmith1-2/+2
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>
2013-07-23iceauth 1.0.6iceauth-1.0.6Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17Constify some more string pointers to fix gcc warningsAlan Coopersmith2-17/+18
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17Use void * instead of char * for generic pointer arg to DoFunc functionsAlan Coopersmith1-13/+13
Quiets clang warnings of: process.c:754:29: warning: cast from 'char *' to 'struct _list_data *' increases required alignment from 1 to 8 [-Wcast-align] struct _list_data *ld = (struct _list_data *) data; ^~~~~~~~~~~~~~~~~~~~~~~~~~ process.c:787:32: warning: cast from 'char *' to 'struct _extract_data *' increases required alignment from 1 to 8 [-Wcast-align] struct _extract_data *ed = (struct _extract_data *) data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ process.c:988:22: warning: cast from 'char *' to 'int *' increases required alignment from 1 to 4 [-Wcast-align] int *nremovedp = (int *) data; ^~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17Mark unused arguments in callback functions to quiet clang warningsAlan Coopersmith2-18/+18
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17Fix some sign/size conversion warnings from clangAlan Coopersmith1-10/+10
process.c:410:22: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] retval = malloc (len); ~~~~~~ ^~~ process.c:454:30: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] strncmp (cmd, ct->name, n) == 0) { ~~~~~~~ ^ process.c:450:9: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] n = strlen (cmd); ~ ^~~~~~~~~~~~ process.c:1028:34: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if (strncmp (cmd, ct->name, len) == 0) { ~~~~~~~ ^~~ process.c:1026:12: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] int len = strlen (cmd); ~~~ ^~~~~~~~~~~~ process.c:1560:8: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] len = strlen (buf); ~ ^~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23Add _X_NORETURN attributes suggested by gccAlan Coopersmith3-4/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23Assume signal handlers return void, as C89 requiresAlan Coopersmith2-22/+2
Drops use of autoconf's obsolete AC_TYPE_SIGNAL and Imake's even more obsolete SIGNALRETURNSINT. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-23configure.ac: Bump to 1.0.5iceauth-1.0.5Jeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-23auth_finalize: Attempt to rename() if link() failsJeremy Huddleston1-1/+2
On some file systems (like AFP), hard links are not supported. If link fails, try rename() before giving up. Reported-by: Jamie Kennea <jamie@pompey.org> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-28Error out and avoid a call to malloc(0) if given a bad hex stringJeremy Huddleston1-2/+2
Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-01Make iceauth manpage describe commands. (fd.o bug#2354)David Nusinow1-0/+84
Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-19config: move man pages into their own directoryGaetan Nadon4-18/+17
Use services provided by XORG_MANPAGE_SECTIONS. Use standard Makefile for man pages. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: remove trailing spaces and tabsGaetan Nadon1-13/+13
Using s/[ \t]*$// Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon1-1/+1
This silences an Autoconf warning
2011-01-12config: remove AC_PROG_CC as it overrides AC_PROG_C_C99Gaetan Nadon1-1/+0
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONSGaetan Nadon1-1/+0
It depends on util-macros 1.8 or later The existing statement can now be removed from the configuration file. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-10-29iceauth 1.0.4iceauth-1.0.4Alan Coopersmith1-1/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-21Remove unnecessary AC_SUBST of ICEAUTH_LIBS & ICEAUTH_CFLAGSAlan Coopersmith1-2/+0
PKG_CHECK_MODULES automatically handles those for us Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-21config: upgrade to util-macros 1.8 for additional man page supportAlan Coopersmith2-22/+4
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Enables use of platform appropriate version of sed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-21config: update AC_PREREQ statement to 2.60Gaetan Nadon1-1/+1
Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-10-06Purge cvs tags.Jesse Adkins4-14/+0
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>