diff options
author | Marcus Brinkmann <mb@g10code.com> | 2006-09-19 10:46:58 +0000 |
---|---|---|
committer | Marcus Brinkmann <mb@g10code.com> | 2006-09-19 10:46:58 +0000 |
commit | 2c22ab8151bd504d32ace8755945e6d323c06107 (patch) | |
tree | 0926cc5868299b5320435edc7a411e35aa8e83b9 /tests | |
parent | 5c751af7b4b499f4949e1080f2039554acd63d20 (diff) | |
download | libassuan-2c22ab8151bd504d32ace8755945e6d323c06107.tar.gz |
2006-09-19 Marcus Brinkmann <marcus@g10code.de>
* tests/fdpassing.c (MOTD): New macro.
* tests/Makefile.am (AM_CPPFLAGS): New variable.
* tests/motd: New file.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/fdpassing.c | 11 | ||||
-rw-r--r-- | tests/motd | 9 |
3 files changed, 19 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index ef2510e..7121f8e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,6 +29,7 @@ CLEANFILES = TESTS = fdpassing +AM_CPPFLAGS = -DSRCDIR=$(srcdir) AM_CFLAGS = # $(GPG_ERROR_CFLAGS) noinst_HEADERS = common.h diff --git a/tests/fdpassing.c b/tests/fdpassing.c index b2f118b..da85bf7 100644 --- a/tests/fdpassing.c +++ b/tests/fdpassing.c @@ -32,6 +32,13 @@ #include "../src/assuan.h" #include "common.h" +#ifndef SRCDIR +#define SRCDIR "/etc" +#endif +#define STRINGIFY2(str) #str +#define STRINGIFY(str) STRINGIFY2(str) +#define MOTD STRINGIFY(SRCDIR) "/motd" + /* @@ -159,10 +166,10 @@ client (assuan_context_t ctx) for (i=0; i < 6; i++) { - fp = fopen ("/etc/motd", "r"); + fp = fopen (MOTD, "r"); if (!fp) { - log_error ("failed to open `%s': %s\n", "/etc/motd", + log_error ("failed to open `%s': %s\n", MOTD, strerror (errno)); return -1; } diff --git a/tests/motd b/tests/motd new file mode 100644 index 0000000..9d303b7 --- /dev/null +++ b/tests/motd @@ -0,0 +1,9 @@ +Big Brother trust@unlimited.com 0.4.2-TC #1 PREEMPT Thu Aug 3 02:52:00 UTC 2006 TC Lockinos + +The programs included monitor each and every keystroke by its users +and report them back for evaluation. Use of this software is entirely +voluntary, but non-compliance results in reducing the machine to an +expensive paper-weight. + +There is no warranty whatsoever, and should we have made a mistake, we will +come and sue you for taking advantage of that. |