client: Support $if Empire in .inputrc Set the application name to "Empire" to support Empire-specific customization of readline. Use in .inputrc looks like this: $if Empire set bell-style audible set history-size 500 else set bell-style visible $endif Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
man/empire: Explain restricted mode a bit better Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
client: Enable history file by default unless -r Make -H take an argument. Default it to ~/.empire_history, except in -r restricted mode, where history is off unless you specify -H. That's because restricted mode restricts the player's access to the local system, and that includes the history file. If you want to grant access to a history file, you have to do so explicitly. Thanks to the previous commit, there is no need to suppress saving to ~/.empire_history in the test suite. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
client: Tie up a few lose readline ends Document readline in more detail in man/empire.6. Make @history_file local to main(). main() silently truncates the home directory name to 1000 characters when constructing the history file name; mark FIXME. Set @rl_already_prompted just once. Write history file on unsuccessful exit, too. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
client: Add readline support to empire client Readline provides fancy command line editing such as <Arrow Up> for previous commands and CTRL+A to jump to the beginning of the line. This patch does not add any completion on <tab> key, a TODO, if you will. A new command line flag, -H, turns on saving the history to disk. This may have security implications on shared computers, as all commands are saved as-is. Thus "change re 1234" would be logged directly to the file. Signed-off-by: Martin Haukeli <martin.haukeli@gmail.com> Rebase on top of preparatory work, fix a few bugs, and tidy up: * Update the standalone client build, too. * Fix the Windows build. * Keep command line options sorted case-insensitively. * Error out when $HOME is unset and getpwuid() fails, just like we do for $LOGNAME. * Give @input_from_rl, @has_rl_input static linkage. * @has_rl_input is a flag, not a counter, set and test it accordingly. * Save all input in history, not just commands. Martin's attempt to recognize commands works only as long as the server sends prompts faster than the user sends input. Drop that part, and update commit message accordingly. * Fix recv_input() not to truncate value of strlen() to int, and to use memmove() for updating @input_from_rl in place. * Clean up whitespace in a few places. * Tweak commit message. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
man/empire: Trim unwanted space in synopsis Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
man: Get rid of unwanted space in SYNOPSIS Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
client: New option -r for restricted mode Redirections and the execute command let the user read and write files and run programs on the local system. Restricted mode prevents such access. This is useful when you want to grant somebody access to just Empire, but not to the host system's user account that runs the client. Signed-off-by: Marisa Giancarla <fstltna@me.com> Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Put URIs and e-mail addresses in <angle brackets> Also end URIs with '/' where appropriate. Refrain from touching scripts/ and Stephen Crane's LWP authorship note. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Fix empire(6) synopsis for argument of -s Commit 464094a6 (v4.3.26) changed it in section description, but missed section synopsis.
Change how client option -s interprets ':' Old version recognizes the first ':', which prevents use of ':' in host names. They are used in numerical IPv6 addresses. New version recognizes the last ':', which prevents use of ':' in service names. Old version treats empty host or port specially (use default). Documentation suggests ':' is required, but the code doesn't do that. Instead, the argument is interpreted as host, even when it's empty. New version makes the HOST: part optional. You can't specify host and default the port. Tough. Keeps documentation and code as simple as possible. Compare: old version new version argument host port host port "" "" default default "" "A" "A" default default "A" ":" default default "" "" "A:" "A" default "A" "" ":B" default "B" "" "B" "A:B" "A" "B" "A" "B"
New client option -s to specify server host and port Overrides EMPIREHOST and EMPIREPORT.
Document empire options -h and -v in manual page Was forgotten in commit 46c0410e, v4.3.11. Reported by Tom Dickson-Hunt.
Contract empire options in manual page synopsis
Fix title and section header in manual pages Commit 530deef2 failed to update .TH of fairland(6), files(6) and pconfig(6). Commit 530deef2 failed to update .TH of empire(6). Commit eeb9d3cb created empsched(6) with the wrong .TH.
Clarify -2. Warn about passwords on the command line.
Update AUTHORS.
Fix markup. Reorder so that options appear in alphabetical order. Document -h and -v for fairland and files. Supply proper .SA. Minor polishing.
Belatedly rename emp_client.6 to empire.6, to match the changed program name in the new build process.