mirror of git://anongit.mindrot.org/openssh.git
upstream: use status error message to communicate ~user expansion
failures; provides better experience for scp in sftp mode, where ~user paths are more likely to be used; spotted jsg, feedback jsg & deraadt ok jsg & markus (forgot to include this file in previous commit) OpenBSD-Commit-ID: d37cc4c8c861ce48cd6ea9899e96aaac3476847b
This commit is contained in:
parent
a1d42a6ce0
commit
1cd1b2eac3
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sftp-server.c,v 1.137 2022/01/11 02:56:19 dtucker Exp $ */
|
/* $OpenBSD: sftp-server.c,v 1.138 2022/01/14 03:31:52 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1567,7 +1567,8 @@ process_extended_expand(u_int32_t id)
|
||||||
} else {
|
} else {
|
||||||
/* ~user expansions */
|
/* ~user expansions */
|
||||||
if (tilde_expand(path, pw->pw_uid, &npath) != 0) {
|
if (tilde_expand(path, pw->pw_uid, &npath) != 0) {
|
||||||
send_status(id, errno_to_portable(ENOENT));
|
send_status_errmsg(id,
|
||||||
|
errno_to_portable(ENOENT), "no such user");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
free(path);
|
free(path);
|
||||||
|
|
Loading…
Reference in New Issue