On 2023/09/13 15:08:40 +0200, Moritz Fain <[email protected]> wrote:
> Most of the code is already there; it's basically just adding a new flag.
>
> Happy to hear your feedback!
can't comment on the diff itself, but the patch was mangled and so it
doesn't apply.
> --- a/usr.bin/ssh/ssh-agent.c
> +++ b/usr.bin/ssh/ssh-agent.c
> @@ -2003,7 +2003,7 @@ usage(void)
> int
> main(int ac, char **av)
> {
> - int c_flag = 0, d_flag = 0, D_flag = 0, k_flag = 0, s_flag = 0;
> + int c_flag = 0, d_flag = 0, D_flag = 0, k_flag = 0, s_flag =
> 0, overwrite_agentsocket = 0;
> int sock, ch, result, saved_errno;
> char *shell, *format, *pidstr, *agentsocket = NULL;
> struct rlimit rlim;
>[...]
> @@ -2163,7 +2165,7 @@ main(int ac, char **av)
> * the parent.
> */
> prev_mask = umask(0177);
> - sock = unix_listener(socket_name, SSH_LISTEN_BACKLOG, 0);
> + sock = unix_listener(socket_name, SSH_LISTEN_BACKLOG,
> overwrite_agentsocket);
> if (sock < 0) {
> /* XXX - unix_listener() calls error() not perror() */
> *socket_name = '\0'; /* Don't unlink any existing file */