Skip to content

Commit 5531b36

Browse files
committed
session server UPDATE missing error message
1 parent 3f4b069 commit 5531b36

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compat/compat.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ time_t timegm(struct tm *tm);
238238
* @param[in] sock Socket to analyze.
239239
* @param[out] uid Socket owner UID.
240240
* @return 0 on success,
241-
* @return -1 on error.
241+
* @return -1 on error, errno set.
242242
*/
243243
int unsock_get_uid(int sock, uid_t *uid);
244244

src/session_server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,6 +2342,7 @@ nc_accept_unix_session(struct nc_session *session, int sock)
23422342
size_t buf_len = 0;
23432343

23442344
if (unsock_get_uid(sock, &uid)) {
2345+
ERR(session, "Failed to get UID of a socket (%s).", strerror(errno));
23452346
close(sock);
23462347
return -1;
23472348
}

0 commit comments

Comments
 (0)