| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
In rare cases the getpwuid() call will fail because of a YP
or LDAP timeout. If we're not using the local username we
shouldn't even bother looking it up.
|
|
|
|
|
|
| |
If qarshd is broken enough that it can't load libxml2.so, it
won't return an XML packet which we can parse. set_remote_user()
really needs to error out of we didn't get a packet back.
|
|
|
|
|
|
|
|
|
| |
I don't know how, but I found one instance of qarsh looping
through the pselect loop with a one second timeout. If the command has
exited and the output file descriptors are all closed, we fall onto
this continue which prevents us from getting to the break at the end of
the loop. The only thing the continue skips over is that check which we
really should check, so remove the continue.
|
|
|
|
|
|
| |
All the actions which need to be done before we exit are done after the
pselect. Waiting until after the next pselect can cause us to sit for
a second before we exit, which slows down things which use qarsh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to test all exit conditions at once so we fall back into the
hbeat code. I was falling into a case when running "reboot -fin &"
where the command would exit, but the sockets would not close and we
weren't getting to hbeat() to detect the reboot.
In another case which I can't completely explain, we were getting a
double-free error from glibc in the qpfree() at the end of
run_remote_cmd(). Instead of waiting until the very end to read the
exit status, save it off as soon as we get the packet and use
cmd_exitted to determine if we have an exit code or if something went
horribly wrong.
|
| |
|
|
|
|
| |
quickly that we do a hbeat then go back to the pselect.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When running rsync on an existing directory structure, rsync may be too
busy to read everything that qarsh is writing to it from the remote
rsync daemon. Create a buffer for each of stdin, stdout, and stderr
and keep it around until we are able to write it, holding off further
reads until it can be written. We still don't handle partial writes.
|
|
|
|
| |
has exitted and we've processed all the output.
|
|
|
|
|
| |
help get all output before we exit. There is still a race if the cmdexit
packet returns before all output where we could truncate output.
|
| |
|
| |
|
|
|
|
|
| |
reproduced properly by qarsh.
Return 127 as an exit code on internal error cases.
|
| |
|
|
|
|
|
| |
name in the usage output would show "(null)." qarsh isn't called anything
else so just hard code qarsh in the usage message.
|
| |
|
|
|
|
|
|
| |
OpenSSH. After they get to the end of the args and they haven't gotten
a host name yet they chew the next arg as the hostname and restart parsing
the command line. Now we do too.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
infinite loop.
|
|
|
|
| |
There may still be output to be read even after the command completed.
|
|
|
|
| |
set of files.
|
|
|
|
| |
the host, and we only want to check for timeout if we were already in HOST_QUIET
|
|
|
|
|
|
|
|
| |
-m missed to -t timeout on the command line.
New env var - QARSH_TIMEOUT can be set to change the default timeout.
Command line -t overrides this env var.
|
| |
|
|
|