| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
Generated with
sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h
followed by manually tweaking the result a bit. No license change intended.
|
| |
|
|
|
|
|
| |
There are two callers, one in client_common.c and one in client.c. The
former passes NULL, hence does not need the argument. The latter passes a
non-NULL pointer to initialize the global client_loglevel integer, but this
initialization can as well be done in the caller, simplifying the code a bit.
|
| |
|
|
| |
Both callers pass NULL.
|
| |
|
|
|
| |
Currently we store a copy of the config file path in the client task
structure for no reason at all. Remove it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
}'
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Now that non-client sideband connection attempts are rejected up-front,
we may get rid of all the non-sideband code.
|
| |
|
|
| |
Better late than never.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Hey, this is earlier than last year :)
|
| |
|
|
|
|
|
|
|
|
| |
The use of the client code in audiod requires a node to be inserted
as the _parent_ of some existing node, which was not neccessary
before. Therefore a new btrn pointer for the child node is added to
struct btr_node_description and btr_new_node() is adjusted accordingly.
The patch also adds a small helper sched_request_barrier() to
the scheduler.
|
| | |
|
| |
|
|
| |
A relict from 0.3.x.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code used a rather fancy way to (de)activate encryption on
a per fd basis: In net.c there was an array of rc4 keys, indexed by fd.
This is rather wastful because the array size is determined by the
highest fd for which encryption is activated.
It's also hard to comprehend and it's easy to get strange results if
one forgets to deactivate the encryption after the fd is closed.
This patch introduces a new structure, rc4_context, which consists of
an fd and the needed rc4 keys. Users explicitly call the new rc4 variants
of the receving/sending functions which take a pointer to a struct
rc4_context instead of a file descriptor but are otherwise identical.
Keep crypt simple!
|
| |
|
|
|
| |
This should simplify subsequent patches that allow variable-sized
output buffers for filters/receivers.
|
| |
|
|
| |
Without this fix, para_client always used loglevel debug.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Get rid of sched->select_ret. Tasks shouldn't care about the
return value of the select call.
- Kill task->private_data. Use container_of() instead.
- Remove task->event_handler. It is never necessary and only
makes the code more convoluted. The scheduler unregisters
tasks as soon as either the pre_select or the post_select
functions return an error.
- Rename task->ret to task->error and get rid of a couple
of error fields in other structs that usually only contained
a copy of the task's error value.
This conversion likely introduces many bugs that have to be
shaken out in subsequent patches. Hopefully it will result in
less error-prone code in the long run.
|
| | |
|
| |
|
|
| |
Move functions around a bit to avoid forward-declarations.
|
| |
|
|
|
|
| |
In the client event handler we have to set the eof variable
to a negative value in order to shut down the stdout task.
Rename eof to error while at it.
|
| |
|
|
|
|
|
|
|
|
| |
This way it's possible to tell at a later time why
the receiver/filter/writer terminated.
This allows to increase the delay for reconnecting in case
the receiver failed to connect to para_server: Let the receivers
set the error value to -E_RECV_EOF in case a normal end of file
event occurred and check this value when calculating the restart
barrier.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both users (client.c and audiod.c) called client_open() right
after calling client_parse_config(), so call client_open() from
client_parse_config() and make client_open() static.
While we're at it, rename client_open() to client_connect() as this
is what the function does. Also rename client_parse_config() to
client_open() and change audiod.c and client.c to call client_open()
instead of client_parse_config().
This patch fixes a segfault in para_client was it was run without
specifying a command. In this case, the private client data struct
was used by para_log after being freed -- Ouch. Fortunately, this
bug didn't affect para_audiod as it never calls these functions with
no command.
Another bug due to a typo in client_close() is also fixed. This code
needs closer investigation and lacks documentation btw.
|
| |
|
|
| |
and add documentation for enable_crypt() and enable_crypt().
|
|
|
new file: client.h
new file: client_common.c
This completes the preparations for including para_client into para_audiod.
client_common.c contains all functions that are also useful for para_audiod.
|