[openssh-commits] [openssh] 03/04: upstream: log error message for process_write() write failures

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 17 13:53:12 AEST 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 287dc6396e0f9cb2393f901816dbd7f2a7dfbb5f
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Jul 17 03:51:32 2020 +0000

    upstream: log error message for process_write() write failures
    
    OpenBSD-Commit-ID: f733d7b3b05e3c68967dc18dfe39b9e8fad29851
---
 sftp-server.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sftp-server.c b/sftp-server.c
index b1d8c88c..55386fa9 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.118 2020/06/22 05:52:05 djm Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.119 2020/07/17 03:51:32 djm Exp $ */
 /*
  * Copyright (c) 2000-2004 Markus Friedl.  All rights reserved.
  *
@@ -799,18 +799,19 @@ process_write(u_int32_t id)
 		if (!(handle_to_flags(handle) & O_APPEND) &&
 				lseek(fd, off, SEEK_SET) == -1) {
 			status = errno_to_portable(errno);
-			error("process_write: seek failed");
+			error("%s: seek failed", __func__);
 		} else {
 /* XXX ATOMICIO ? */
 			ret = write(fd, data, len);
 			if (ret == -1) {
-				error("process_write: write failed");
+				error("%s: write: %s", __func__,
+				    strerror(errno));
 				status = errno_to_portable(errno);
 			} else if ((size_t)ret == len) {
 				status = SSH2_FX_OK;
 				handle_update_write(handle, ret);
 			} else {
-				debug2("nothing at all written");
+				debug2("%s: nothing at all written", __func__);
 				status = SSH2_FX_FAILURE;
 			}
 		}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list