summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 128df08)
raw | patch | inline | side by side (parent: 128df08)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 14 Sep 2014 09:23:39 +0000 (11:23 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 14 Sep 2014 09:23:39 +0000 (11:23 +0200) |
The server may request further authentication information from the client
before sending an OK status.
before sending an OK status.
src/client/sock.c | patch | blob | history | |
src/include/frontend/proto.h | patch | blob | history |
diff --git a/src/client/sock.c b/src/client/sock.c
index b60bad45e2cf97d47d2c101513c030f4a27fff5e..82a48a62534a6e0d0b00dee704e58cf821dc998c 100644 (file)
--- a/src/client/sock.c
+++ b/src/client/sock.c
sdb_log(SDB_LOG_ERR, "Encountered end-of-file while waiting "
"for server response");
- if (rstatus != CONNECTION_OK) {
+ if (rstatus == CONNECTION_ERROR) {
sdb_log(SDB_LOG_ERR, "Access denied for user '%s'", username);
status = -((int)rstatus);
}
+ else if (rstatus != CONNECTION_OK) {
+ sdb_log(SDB_LOG_ERR, "Received unsupported authentication request "
+ "(status %d) during startup", (int)rstatus);
+ status = -((int)rstatus);
+ }
sdb_client_close(client);
sdb_strbuf_destroy(buf);
index 1d549a933bad84f739611f0a61882e4e82e44735..9e02400e13ea597d9201d0a0577c47e9daefa11e 100644 (file)
#endif
/*
- * The SysDB frontend protocol is based messages being passed between the
+ * The SysDB frontend protocol is based on messages being passed between the
* client and the server. Each message includes a header containing the
* message type which is usually a status or command code, the length of the
* message not including the header, and the message body. The content of the
* username of the user contacting the server. The server may then send
* further requests to the client for authentication (not implemented
* yet). Once the setup and authentication was successful, the server
- * replies with CONNECTION_OK. No other messages may be sent to the server
- * before this. Also, the server does not send any asynchronous messages
- * before startup is complete.
+ * replies with CONNECTION_OK. Further information may be requested from
+ * the server using special messages specific to the authentication
+ * method. The server does not send any asynchronous messages before
+ * startup is complete.
*/
CONNECTION_STARTUP,