Follow-up to "Added account creation for retroshare service", touching
only that feature's own paths.
**-U create could only mint a brand-new PGP profile.** A null RsPgpId was
always passed to createLocationV2(), so a user who already has a profile,
sees it in the -U list output and picks [c] silently got a second
identity: their friends no longer recognise them and every certificate
has to be exchanged again. createLocationV2() takes pgpId as in/out and
reuses it when non-null (rsinit.cc:2247), and it explicitly accepts an
empty pgpName in that case (rsinit.cc:2243), so the profiles known to
RsAccounts::GetPGPLogins() are now listed first and reusing one just adds
this machine as another node. The prompt spells out what a new profile
costs.
**Ctrl-C at a prompt reported the wrong thing.** On glibc signal()
installs the handler with SA_RESTART, so the read blocked behind getline
is restarted and keepRunning is only seen once the user also presses
Enter. Control then fell out of the selector with prefUserString still
"list", RsPeerId("list") null, and the user who had just cancelled was
told their location id was invalid, with exit -EINVAL. Cancelling now
returns 0. doTerminalCreateAccount() returns a three-state result so a
deliberate abort is no longer reported as a failure, and the failure
paths use -RsInit::ERR_* instead of a bare -1 (exit 255).
**-U list failed on a non-tty even when accounts existed.** It returned
ERR_NO_AVAILABLE_ACCOUNT whenever stdin was not a terminal, while the
option is documented as a way to list accounts and retroshare-webui's
README puts it in the first-start flow. It now prints the list and
returns 0, keeping the error for the case it names: nothing to list. The
[c] line moved below that check, so a non-interactive run no longer
advertises an option it then refuses.
**Every prompt is bounded.** A terminal dying mid-prompt -- an ssh
session dropping, a container losing its tty -- turns each following read
into an immediate EOF, and all these loops re-ask on empty or mismatched
input. Three attempts then a clear message. This also covers the -W web
interface password loop, which had the same shape before this feature
existed.
**A passphrase is no longer asked of an absent terminal.** The
PASSWORD_REQUESTED handler now checks for an interactive stdin first, so
-U <hexid> under systemd or docker fails with a readable message instead
of prompting nothing.
Selections are trimmed, so "1 " and a CRLF line are no longer rejected as
invalid, and MAX_PROMPT_ATTEMPTS sits outside the terminal-login guard
because the web interface password prompt has its own build option.
Compile-checked in all four RS_SERVICE_TERMINAL_LOGIN /
RS_SERVICE_TERMINAL_WEBUI_PASSWORD combinations, warning-free.
Note that the underlying spin is a libretroshare bug: rs_getpass() stored
getchar()'s EOF in an unsigned char, where -1 becomes 0xFF and never ends
the loop. Fixed separately in libretroshare; the bounds here are useful
on their own and do not depend on it.
|
||
|---|---|---|
| .github/workflows | ||
| .reuse | ||
| build_scripts | ||
| data | ||
| jsonapi-generator | ||
| libbitdht@4355ea96b2 | ||
| libretroshare@cafaaa1964 | ||
| LICENSES | ||
| openpgpsdk@40db9d6bfe | ||
| plugins | ||
| retroshare-friendserver | ||
| retroshare-gui | ||
| retroshare-service | ||
| retroshare-webui@a28d77fe9a | ||
| supportlibs | ||
| tests | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .gitmodules | ||
| .travis.yml | ||
| BUILD-cmake.md | ||
| CMakeLists.txt | ||
| COPYING | ||
| README.md | ||
| retroshare.pri | ||
| RetroShare.pro | ||
RetroShare
RetroShare is a decentralized, private, secure, cross-platform, communication toolkit. RetroShare provides file sharing, chat, messages, forums, channels, boards and more.
Get the source
Clone this repository, enter the directory and then get the submodules with the following command
git submodule update --init --remote --force libbitdht/ libretroshare/ openpgpsdk/
Compilation
Short of comprehensive and updated documentation on how to build RetroShare (for the many supported platforms it runs on), scripts and recipes are provided in the aim of creating packages for the supported platforms (and more) in the build_scripts directory of this repository.
Compilation on Windows
Follow this file : WindowsMSys2_InstallGuide
With QtCreator : Windows-QtCreator-InstallGuide
Compilation on MacOSX
Follow this file : MacOS_X_InstallGuide
Compilation on Linux
Follow this file : Linux_InstallGuide
Releases
Latest release here
Other Builds RetroShare Downloads