search for: ni_maxhost

Displaying 20 results from an estimated 37 matches for "ni_maxhost".

2015 Aug 05
2
[PATCH 1/1] uid for expansion in ControlPath
...nsertions(+), 2 deletions(-) diff --git a/ssh.c b/ssh.c index 59c1f93..c4de144 100644 --- a/ssh.c +++ b/ssh.c @@ -505,7 +505,8 @@ main(int ac, char **av) { int i, r, opt, exit_status, use_syslog, config_test = 0; char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile; - char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; + char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV], + uidstr[11]; char cname[NI_MAXHOST]; struct stat st; struct passwd *pw; @@ -1122,6 +1123,7 @@ main(int ac, char **av) strlcpy(shorthost, thishost, sizeof(shorthost));...
2015 Aug 21
7
[Bug 2449] New: uid for expansion in ControlPath
https://bugzilla.mindrot.org/show_bug.cgi?id=2449 Bug ID: 2449 Summary: uid for expansion in ControlPath Product: Portable OpenSSH Version: 7.0p1 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org
2023 Nov 14
1
[PATCH v3 1/2] Permit %L and %l percent escapes in ssh Include
...const char *original_host, char *line, const char *filename, int linenum, int *activep, int flags, int *want_final_pass, int depth) { - char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *p; + char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *arg_pre, *p; + char thishost[NI_MAXHOST], shorthost[NI_MAXHOST]; char **cpptr, ***cppptr, fwdarg[256]; u_int i, *uintptr, uvalue, max_entries = 0; int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; @@ -1951,6 +1952,12 @@ parse_pubkey_algos: "command-line option"); goto out; } + + if (get...
2015 May 30
2
FWD: enable forwarding to remote named sockets in ssh
...g 2014 20:31:29 -0000 @@ -2771,13 +2770,18 @@ channel_setup_fwd_listener_tcpip(int typ fwd->listen_host : fwd->connect_host; is_client = (type == SSH_CHANNEL_PORT_LISTENER); - if (host == NULL) { - error("No forward host name."); - return 0; - } - if (strlen(host) >= NI_MAXHOST) { - error("Forward host name too long."); - return 0; + if (type == SSH_CHANNEL_PORT_LISTENER && + fwd->connect_path) + host = fwd->connect_path; + else { + if (host == NULL) { + error("No forward host name."); + return 0; + } + if (strlen(host) >...
2023 Dec 20
2
[PATCH RESEND 0/2] Permit %L and %l percent escapes in Include
Using these escapes, the include directive can be crafted to include differing, host-specific configuration. Ronan Pigott (2): Permit %L and %l percent escapes in ssh Include Permit %L and %l percent escapes in sshd Include readconf.c | 16 +++++++++++++--- servconf.c | 17 ++++++++++++++--- 2 files changed, 27 insertions(+), 6 deletions(-) base-commit:
2002 Sep 06
0
use of setsockopt(SO_LINGER)
...====================== RCS file: /cvs/src/usr.bin/ssh/channels.c,v retrieving revision 1.180 diff -u -r1.180 channels.c --- channels.c 4 Jul 2002 08:12:15 -0000 1.180 +++ channels.c 4 Sep 2002 17:12:51 -0000 @@ -2016,7 +2016,6 @@ struct addrinfo hints, *ai, *aitop; const char *host; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; - struct linger linger; success = 0; host = (type == SSH_CHANNEL_RPORT_LISTENER) ? @@ -2059,13 +2058,13 @@ continue; } /* - * Set socket options. We would like the socket to disappear - * as soon as it has been closed for whatever reason. + * Set socket...
2007 Oct 22
15
[Bug 1380] New: incorrect check for strlen(fwd->connect_host) in parse_forward()
...OS/Version: All Status: NEW Severity: normal Priority: P3 Component: ssh AssignedTo: bitbucket at mindrot.org ReportedBy: Jan.Pechanec at Sun.COM there are 2 issues for hostname len check in parse_forward() (a) the len is checked against NI_MAXHOST while it should be checked against (SSH_CHANNEL_PATH_LEN - 1). (b) the check should be also performed against listen_host when in remote fwd mode; otherwise hostname of any length is sent over The check against connect_host is already in channel_setup_fwd_listener(). I think that correct way is t...
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
2023 Nov 13
2
[PATCH v2] Permit %L and %l percent escapes in Include
...const char *original_host, char *line, const char *filename, int linenum, int *activep, int flags, int *want_final_pass, int depth) { - char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *p; + char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *arg_pre, *p; + char thishost[NI_MAXHOST], shorthost[NI_MAXHOST]; char **cpptr, ***cppptr, fwdarg[256]; u_int i, *uintptr, uvalue, max_entries = 0; int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; @@ -1951,6 +1952,12 @@ parse_pubkey_algos: "command-line option"); goto out; } + + if (get...
2023 Nov 14
0
[PATCH v3 2/2] Permit %L and %l percent escapes in sshd Include
...Options *options, char *line, struct connection_info *connectinfo, int *inc_flags, int depth, struct include_list *includes) { - char *str, ***chararrayptr, **charptr, *arg, *arg2, *p, *keyword; + char *str, ***chararrayptr, **charptr, *arg, *arg2, *arg_pre, *p, *keyword; + char thishost[NI_MAXHOST], shorthost[NI_MAXHOST]; int cmdline = 0, *intptr, value, value2, n, port, oactive, r, found; int ca_only = 0; SyslogFacility *log_facility_ptr; @@ -2130,6 +2131,12 @@ process_server_config_line_depth(ServerOptions *options, char *line, fatal("Include directive not supported as a &qu...
2002 May 20
0
Openssh 3.2.2p1 KRB5 addition
...* Return the canonical name of the localhost of the socket. The + * caller should free the returned string with xfree. + */ + + const char * + get_local_hostname(int socket) + { + struct sockaddr_storage addr_6or4; + int i; + socklen_t addr_6or4_len; + char name[NI_MAXHOST], ntop[NI_MAXHOST]; + + /* Get local IP address*/ + addr_6or4_len = sizeof(addr_6or4); + memset(&addr_6or4, 0, sizeof(addr_6or4)); + if (getsockname(socket, (struct sockaddr *) &addr_6or4, &addr_6or4_len) < 0) { + debug("getsockna...
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
2014 Jun 23
2
ListenAdress Exclusion
I was wondering what everyone's thoughts were on a simpler way to exclude addresses from having listeners on them. I know a lot of people have multiple subnets, especially larger corporations. Some networks are non-route-able, and therefor unsuitable for use with SSH, aside from communication between other servers on the same subnet. Given that we may want to exclude those non-route-able
2014 May 06
6
[Bug 2239] New: ssh-keygen cannot handle Linux with 64 char long hostname
https://bugzilla.mindrot.org/show_bug.cgi?id=2239 Bug ID: 2239 Summary: ssh-keygen cannot handle Linux with 64 char long hostname Product: Portable OpenSSH Version: 6.6p1 Hardware: All OS: Linux Status: NEW Severity: minor Priority: P5 Component: ssh-keygen
2000 Dec 27
2
patch to support hurd-i386
...p1-/canohost.c Thu Jun 22 13:32:31 2000 +++ openssh-2.2.0p1/canohost.c Sun Oct 29 16:44:49 2000 @@ -32,7 +32,8 @@ int i; socklen_t fromlen; struct addrinfo hints, *ai, *aitop; - char name[MAXHOSTNAMELEN]; + char *name; + size_t name_size; char ntop[NI_MAXHOST], ntop2[NI_MAXHOST]; /* Get IP address of client. */ @@ -71,10 +72,21 @@ fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed"); /* Map the IP address to a host name. */ - if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeo...
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...ed. Return 1 if it was used. + */ +static int +ssh_connect_happy_eyeballs_initiate(const char *host, struct addrinfo *ai, + int *timeout_ms, int needpriv, + struct timeval *initiate, + int *nfds, fd_set *fds, + struct addrinfo *fd_ai[]) +{ + int oerrno, sock; + char ntop[NI_MAXHOST], strport[NI_MAXSERV]; + + memset(ntop, 0, sizeof(ntop)); + memset(strport, 0, sizeof(strport)); + /* If *nfds != 0 then *initiate is initialised. */ + if (*nfds && + (ai == NULL || + !ssh_connect_timeout(initiate, CONNECTION_ATTEMPT_DELAY))) + /* Do not initiate new connections...
2002 Oct 30
1
connect() timeout patch.
...ak; --- sshconnect.c Wed Sep 18 22:05:04 2002 +++ ../openssh-3.5p1.modlwc/sshconnect.c Wed Oct 30 09:50:37 2002 @@ -236,10 +236,12 @@ { int gaierr; int on = 1; - int sock = -1, attempt; + int sock = -1, attempt, sigfunc; + void timeout(void); /* Function to handle socket timeout */ char ntop[NI_MAXHOST], strport[NI_MAXSERV]; struct addrinfo hints, *ai, *aitop; struct servent *sp; + /* * Did we get only other errors than "Connection refused" (which * should block fallback to rsh and similar), or did we get at least @@ -299,9 +301,11 @@ if (sock < 0) /* Any error i...
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
2017 Feb 15
5
[cifs-utils PATCH v3 0/4] cifs.upcall: allow cifs.upcall to scrape cache location initiating task's environment
Third respin of this series. Reordered for better safety for bisecting. The environment scraping is now on by default, but can be disabled with "-E" in environments where it's not needed. Also, I've added a patch to make cifs.upcall drop capabilities before doing most of its work. This may help reduce the attack surface of the program. Jeff Layton (4): cifs.upcall: convert
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...ral Public License > + along with this program; if not, write to the Free Software > + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > +*/ > + > +#ifndef STYPE_H_SEEN > +#define STYPE_H_SEEN 1 > + > +#include <netdb.h> > + > +#ifndef NI_MAXHOST > +#define NI_MAXHOST 1025 > +#endif > + > +#ifndef NI_MAXSERV > +#define NI_MAXSERV 32 > +#endif > + > +typedef struct { > + char *addr; > + char *port; > + int sock_fd; > + void *next; > +} stype; > + > +#endif /* STYPE_H_SEEN */ > > M...