client: Remove unused ->config_file member. Currently we store a copy of the config file path in the client task structure for no reason at all. Remove it.
Shorten copyright notice. The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
Convert para_client to lopsub. This replaces the gengetopt command line parser for para_client by a lopsub suite and links para_client against the lopsub library. The ggo file for para_client was the last user of m4/gengetopt/complete.m4, so this file can be removed. The tricky part is create_merged_lpr(), which replaces make_client_argv(). It is called from the i9e line handler and from the completers. The new function merges the original parse result with the arguments given at the command line to produce the parse result stored in the client task structure. The completers no longer duplicate the possible options each server subcommand because the header file generated by lopsubgen exposes an array of string literals which is suitable as the opts argument of i9e_complete_option().
Update year in copyright headers. Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
doc: Change email address to maan@tuebingen.mpg.de The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
task_register() conversion: client task
Remove client_disconnect(). Everything this function does can be done as well when the task terminates by returning negative in ->post_select(). This also avoids to leak the stream cipher structure of the previous connection when running in interactive mode. 1,032 bytes in 1 blocks are definitely lost in loss record 61 of 85 at 0x402994A: malloc (vg_replace_malloc.c:263) by 0x804C689: para_malloc (string.c:71) by 0x804FF87: sc_new (crypt.c:268) by 0x804E204: client_post_select (client_common.c:370) by 0x804D203: schedule (sched.c:59) by 0x804A2E7: main (client.c:500) 1,032 bytes in 1 blocks are definitely lost in loss record 62 of 85 at 0x402994A: malloc (vg_replace_malloc.c:263) by 0x804C689: para_malloc (string.c:71) by 0x804FF87: sc_new (crypt.c:268) by 0x804E217: client_post_select (client_common.c:371) by 0x804D203: schedule (sched.c:59) by 0x804A2E7: main (client.c:500)
Change copyright year to 2014. This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
Allow addblob commands to create output. Currently all addblob commands remain silent even on fatal errors because para_client either reads the command output, or sends its stdin, but never both. This patch overcomes this shortcoming. It makes para_client create two buffer trees instead of one. The client states CL_SENT_COMMAND and CL_RECEIVING are replaced by a single CL_EXECUTING state. Blob data is now sent as a sideband packet. The change breaks compatibility with earlier 0.4.x versions again, but that's OK as this is 0.5.0 material anyway.
client: Remove sb-compatibility code. Now that non-client sideband connection attempts are rejected up-front, we may get rid of all the non-sideband code.
Change copyright year to 2013. Better late than never.
trivial: Fix typo in client.h.
Use sideband also for challenge response. This changes server and client to exchange the challenge response as a sideband packet if both ends support sideband connections. The SBD_CHALLENGE_RESPONSE designator is used for this purpose. On the client side the changes are less intrusive due to an additional cleanup of the state handling. During connection setup the client's idea of the state of the connection is monitored in the ->status variable of struct client_task. If the client is in the CL_SENT_AUTH state, it receives the challenge and sends the hash of the decrypted challenge back to the server. Either operation may fail, and it seems cleaner to separate the two. So this patch adds the new state CL_RECEIVED_CHALLENGE. The clients enters this state once it decrypted the received challenge.
Implement client-server feature negotiation. The server announces a list of supported features and the client may request any subset of features. The only supported feature is "sideband". It has no effect at the moment but this will change in subsequent patches. TODO: Documentation, remove "foo" feature.
Change year in copyright message to 2012.
client: Split client_open() and client_close(). For interactive para_client sessions, we set up the client configuration from the values given at the command line and in the config file just as we do for non-interactive mode. However, in interactive mode we must be able to execute arbitrary many client commands using the same configuration. client_open() sets up the configuration from the command line arguments and client_close() destroys the configuration, so both functions do more than what is needed in interactive mode. This patch splits client_open() into two functions client_parse_config() and client_connect(). The old client_open() remains with the same semantics as before, it just calls both of the new functions(). In the same spirit, client_close() is split into client_disconnect(), which closes the file descriptor and deallocates the ressources of the current command but does not free the configuration. This allows to re-use the client configuration multiple times for interactive sessions.
sched: Allow more than one running scheduler instance. The interactive completion code must be able to run a second, independent scheduler instance for generating the possible completions. This is currently not possible because the pre_select and post_select list heads of the scheduler are defined globally in sched.c. This patch moves these list heads from sched.c to struct sched. This leaves only the global "now" variable in sched.c, but it is OK to update this from all scheduler instances, so it can stay. Moving the two list heads to struct sched requires that several public functions, among them register_task(), grow an additional parameter. The (mostly trivial) changes that update all callers to provide the new argument make the patch rather invasive, unfortunately.
Add/fix some doxygen comments.
Rename struct rc4_context and stream cipher send/receive functions. This only changes the name structures and functions. Unfortunately, the patch is rather large since it requires to fixup all callers of the affected functions. However, each change is either a simple rename or a trivial documentation adjustment.
Replace direct use of RC4 by stream cipher abstraction. This introduces the new struct stream_cipher in crypt.h as well as two functions stream_cipher_new() and stream_cipher_free() which initialize a new stream cipher structure and deallocate such a structure, respectively. The users of RC4 are changed to call the new abstract functions, so they become independent from openssl. Consequently the affected files need no include openssl/rc4.h any more.