search for: control_path

Displaying 20 results from an estimated 20 matches for "control_path".

2005 Jun 12
2
%h,%p,%u expansion for ControlPath
...ot;tcp"); + if (sp) + options.port = ntohs(sp->s_port); + else + options.port = SSH_DEFAULT_PORT; + } + if (options.proxy_command != NULL && strcmp(options.proxy_command, "none") == 0) options.proxy_command = NULL; @@ -611,6 +622,42 @@ again: if (options.control_path != NULL) { options.control_path = tilde_expand_filename( options.control_path, original_real_uid); + + if (strchr(options.control_path, '%')) { + Buffer path; + const char *cp; + char strport[NI_MAXSERV]; + + /* Convert the port number into a string. */ + snprintf(strpor...
2009 Jul 08
4
Feature request: "SetupCommand" invoked before connecting
Hi, (I'm not subscribed to the list, so please CC me on reply.) I'd like to request adding a feature to OpenSSH: Task: ~~~~~ It is quite sometime useful to invoke a program prior to connecting to an ssh server. The most common use case will probably be port knocking. That is a small program sends certain packets to a server and the server reacts to this by unlocking the ssh port, which
2007 Aug 03
1
race condition with ControlMaster=auto
...--- next part -------------- --- ssh.c~ Fri Jan 5 05:30:17 2007 +++ ssh.c Fri Aug 3 19:21:18 2007 @@ -1045,18 +1045,19 @@ } } -static void -ssh_control_listener(void) +static int +ssh_control_listener(int test) { struct sockaddr_un addr; mode_t old_umask; int addr_len; if (options.control_path == NULL || - options.control_master == SSHCTL_MASTER_NO) - return; + options.control_master == SSHCTL_MASTER_NO || + control_fd != -1) + return 1; - debug("setting up multiplex master socket"); + debug("trying to set up multiplex master socket"); memset(&...
2008 Dec 04
0
[patch] muxserver_listen() doesn't restore umask when bind fails
Cheers, - Salva $ diff -c mux.c~ mux.c *** mux.c~ 2008-06-14 01:01:54.000000000 +0200 --- mux.c 2008-12-04 12:24:45.000000000 +0100 *************** *** 148,153 **** --- 148,154 ---- error("ControlSocket %s already exists, " "disabling multiplexing", options.control_path); close(muxserver_sock); + umask(old_umask); muxserver_sock = -1; xfree(options.control_path); options.control_path = NULL;
2012 Apr 27
2
[PATCH] mux: fix memory leak of control path if bind() fails
--- mux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mux.c b/mux.c index d90605e..fa796bd 100644 --- a/mux.c +++ b/mux.c @@ -1195,6 +1195,7 @@ muxserver_listen(void) close(muxserver_sock); muxserver_sock = -1; } + xfree(orig_control_path); xfree(options.control_path); options.control_path = NULL; options.control_master = SSHCTL_MASTER_NO; @@ -1216,7 +1217,6 @@ muxserver_listen(void) } error("ControlSocket %s already exists, disabling multiplexing", orig_control_path); - xfree(orig_control_path);...
2005 Jun 23
0
ControlPersist.
...~ 2005-06-17 03:59:35.000000000 +0100 +++ openssh/clientloop.c 2005-06-23 11:05:11.000000000 +0100 @@ -1271,8 +1271,28 @@ static void client_channel_closed(int id, void *arg) { channel_cancel_cleanup(id); - session_closed = 1; leave_raw_mode(); + if (options.control_persist && options.control_path != NULL && control_fd != -1) { + int pid = fork(); + + if (pid < 0) { + error("fork: %.100s", strerror(errno)); + /* Just exit */ + session_closed = 1; + return; + } + if (pid != 0) { + /* We are the parent. Exit, leaving the child to continue serving */ + exit(...
2011 Feb 07
1
[PATCH] ssh: set proctitle for mux master
...(); + /* * Discard other fds that are hanging around. These can cause problem * with backgrounded ssh processes started by ControlPersist. @@ -965,6 +978,7 @@ control_persist_detach(void) if (devnull > STDERR_FILENO) close(devnull); } + setproctitle("%s [mux]", options.control_path); } /* Do fork() after authentication. Used by "ssh -f" */ -- 1.7.3.3.1603.g7f137
2016 Jul 22
2
SSH crash on OpenBSD (pledge related?)
Hello, I just ran upon this problem and couldn't find it in bugzilla. SSH crashes (abort trap) if all of the following conditions are met: (a) option -f is used (crash happens when going to background), (b) reverse port forwarding is set up (option -R), (c) option ExitOnForwardFailure is enabled, (d) there are no actual port-forwarding failures. The problem can be reproduced by
2006 Feb 10
0
OpenSSH ControlAllowUsers, et al Patch
...inenum); + value = strtol(arg, &endofnumber, 0); + if (*endofnumber != '\0' || value < 0 || value > 0777) + fatal("%.200s line %d: Bad mask.", filename, linenum); + options->control_bind_mask = value; + break; + case oControlPath: charptr = &options->control_path; goto parse_string; @@ -818,6 +835,46 @@ *intptr = value; break; + case oControlAllowUsers: + while ((arg = strdelim(&s)) && *arg != '\0') { + if (options->num_control_allow_users >= MAX_CONTROL_ALLOW_USERS) + fatal("%s line %d: too many control allo...
2010 Jan 14
1
ssh(1) multiplexing rewrite
...ltiplex server */ static u_int muxserver_pid = 0; +static Channel *mux_listener_channel = NULL; -/* ** Multiplexing master support */ - -/* Prepare a mux master to listen on a Unix domain socket. */ -void -muxserver_listen(void) -{ - struct sockaddr_un addr; - mode_t old_umask; - - if (options.control_path == NULL || - options.control_master == SSHCTL_MASTER_NO) - return; - - debug("setting up multiplex master socket"); - - memset(&addr, '\0', sizeof(addr)); - addr.sun_family = AF_UNIX; - addr.sun_len = offsetof(struct sockaddr_un, sun_path) + - strlen(options.control_p...
2009 Feb 18
1
ssh -f & pid
...((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvxz:" "ACD:F:I:KL:MNO:PR:S:TVw:XY")) != -1) { switch (opt) { + case 'z': + pid_file = optarg; + break; case '1': options.protocol = SSH_PROTO_1; break; @@ -833,6 +860,9 @@ if (options.control_path != NULL && muxserver_sock != -1) unlink(options.control_path); + if (pid_file) + unlink(pid_file); + /* * Send SIGHUP to proxy command if used. We don't wait() in * case it hangs and instead rely on init to reap the child @@ -1080,6 +1110,12 @@ fatal("daemon() fai...
2013 Oct 07
4
Feature request: FQDN Host match
Hello! I'm hoping that Gmail won't HTML format this mail so that I'll get flamed :) Anyway, my question relates to ssh_config. The problem I find is that the Host pattern is only applied to the argument given on the command line, as outlined in the man page: "The host is the hostname argument given on the command line (i.e. the name is not converted to a canonicalized host name
2012 Mar 29
1
percent_expand for QoS in ControlPath
...AULT_PORT; } - /* preserve host name given on command line for %n expansion */ + /* preserve host name given on command line for %h expansion */ host_arg = host; if (options.hostname != NULL) { host = percent_expand(options.hostname, @@ -750,6 +750,8 @@ main(int ac, char **av) options.control_path = percent_expand(cp, "h", host, "l", thishost, "n", host_arg, "r", options.user, "p", portstr, "u", pw->pw_name, "L", shorthost, + "Q", iptos2str(tty_flag ? + options.ip_qos_interactive : op...
2004 Oct 03
3
[PATCH] PreferAskpass in ssh_config
...parse_yesnoask; + case oPreferAskpass: + intptr = &options->prefer_askpass; + goto parse_flag; + case oDeprecated: debug("%s line %d: Deprecated option \"%s\"", filename, linenum, keyword); @@ -917,6 +922,7 @@ options->num_send_env = 0; options->control_path = NULL; options->control_master = -1; + options->prefer_askpass = -1; } /* @@ -1039,6 +1045,8 @@ options->server_alive_count_max = 3; if (options->control_master == -1) options->control_master = 0; + if (options->prefer_askpass == -1) + options->prefer_askpass =...
2011 Jan 07
1
[RFC/PATCH] ssh: config directive to modify the local environment
...>localenvmods.out || fail "$tid" + +diff localenvmods.expect localenvmods.out || fail "$tid" + +# reset tid +tid="localenvmod" diff --git a/ssh.c b/ssh.c index 9409fa7..48ba7b2 100644 --- a/ssh.c +++ b/ssh.c @@ -751,6 +751,63 @@ main(int ac, char **av) if (options.control_path != NULL) muxclient(options.control_path); + if (options.num_local_env_mods > 0) { + char thishost[NI_MAXHOST]; + + if (gethostname(thishost, sizeof(thishost)) == -1) + fatal("gethostname: %s", strerror(errno)); + snprintf(buf, sizeof(buf), "%d", options.port); + +...
2004 Aug 25
3
[Bug 920] Enable client multiplexing to fall back to enhance transparency
http://bugzilla.mindrot.org/show_bug.cgi?id=920 Summary: Enable client multiplexing to fall back to enhance transparency Product: Portable OpenSSH Version: -current Platform: All OS/Version: OpenBSD Status: NEW Severity: enhancement Priority: P2 Component: ssh AssignedTo:
2017 Oct 10
3
tunnel device name acquisition?
Numerous how-tos all over the Internet show how one would set up a tunnel using ssh, e.g.: ssh -f -o Tunnel=ethernet <server_ip> true I was wondering if there's a way to subsequently acquire the names of the local and remote tun/tap interfaces (e.g., using the default "-w any:any") for subsequent automatic tunnel configuration, e.g.: ip link set $TapDev up ip link set
2012 Feb 12
0
PATCH: multiple BindAddress
...*/ int verify_host_key_dns; /* Verify host key using DNS */ diff -rupN orig/openssh-5.9p1/ssh.c openssh-5.9p1/ssh.c --- orig/openssh-5.9p1/ssh.c 2011-08-05 23:18:16.000000000 +0300 +++ openssh-5.9p1/ssh.c 2012-02-12 15:41:39.446044903 +0200 @@ -595,7 +595,8 @@ main(int ac, char **av) options.control_path = xstrdup(optarg); break; case 'b': - options.bind_address = optarg; + options.bind_addresses[0] = optarg; + options.num_bind_address = 1; break; case 'F': config = optarg; diff -rupN orig/openssh-5.9p1/ssh_config openssh-5.9p1/ssh_config --- orig/openssh-5....
2024 Apr 25
1
[PATCH] Enable ssh_config to set LogPath option (-E)
ssh client has the ability to set the destination of debug logs via the `-E` flag. ssh_config lacks an equivalent keyword to set the same option via configs. This patch follows the same semantics of other `*Path` type keywords and creates a new ssh_config keyword `LogPath`. [0] Bugzilla: https://bugzilla.mindrot.org/show_bug.cgi?id=3683 [1] GitHub PR:
2007 Jul 05
36
[Bug 1330] New: RFE: 'ControlPersist' support -- automatically fork and leave ControlMaster behind as a dæmon
http://bugzilla.mindrot.org/show_bug.cgi?id=1330 Summary: RFE: 'ControlPersist' support -- automatically fork and leave ControlMaster behind as a d?mon Product: Portable OpenSSH Version: 4.6p1 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: