Displaying 20 results from an estimated 48 matches for "fromlen".
2001 Aug 07
1
do_pre_login() used before declared
...ch included for 0807 snapshot.
thanks,
wendy
% diff -u session.c.orig session.c.mod
--- session.c.orig Tue Aug 7 13:11:51 2001
+++ session.c.mod Tue Aug 7 16:21:07 2001
@@ -397,6 +397,34 @@
}
}
+#ifdef LOGIN_NEEDS_UTMPX
+void
+do_pre_login(Session *s)
+{
+ socklen_t fromlen;
+ struct sockaddr_storage from;
+ pid_t pid = getpid();
+
+ /*
+ * Get IP address of client. If the connection is not a socket, let
+ * the address be 0.0.0.0.
+ */
+ memset(&from, 0, sizeof(from));
+ if (packet_connection_is_on_socket()) {
+...
2001 Mar 22
0
Solaris UseLogin problem
...================================================
RCS file: /cvs/openssh_cvs/session.c,v
retrieving revision 1.100
diff -u -r1.100 session.c
--- session.c 2001/03/22 02:06:57 1.100
+++ session.c 2001/03/22 21:28:04
@@ -597,6 +597,8 @@
{
int fdout, ptyfd, ttyfd, ptymaster;
pid_t pid;
+ socklen_t fromlen;
+ struct sockaddr_storage from;
if (s == NULL)
fatal("do_exec_pty: no session");
@@ -635,11 +637,35 @@
/* Close the extra descriptor for the pseudo tty. */
close(ttyfd);
+
+ /*
+ * Get IP address of client. If the connection is not a socket, let
+ * the address be 0.0...
2015 Dec 10
2
[PATCH] Receive multiple packets at a time
...return n;
}
-void handle_incoming_vpn_data(int sock) {
- vpn_packet_t pkt;
+#ifdef HAVE_RECVMMSG
+#define MAX_MSG 256
+#else
+#define MAX_MSG 1
+#endif
+
+static void handle_incoming_vpn_packet(int sock, vpn_packet_t *pkt, sockaddr_t *from) {
char *hostname;
- sockaddr_t from;
- socklen_t fromlen = sizeof(from);
node_t *n;
- pkt.len = recvfrom(listen_socket[sock].udp, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen);
-
- if(pkt.len < 0) {
- if(!sockwouldblock(sockerrno))
- logger(LOG_ERR, "Receiving packet failed: %s", sockstrerror(sockerrno));
- return;...
2000 Jun 27
1
openssh-2.1.1p1 on Irix6.2 report
...=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c canohost.c
"canohost.c", line 41: warning(1164): argument of type "socklen_t *" is
incompatible with parameter of type "int *"
if (getpeername(socket, (struct sockaddr *) & from, &fromlen) < 0) {
^
"canohost.c", line 153: warning(1164): argument of type "socklen_t *" is
incompatible with parameter of type "int *"
&option_size) >= 0 && option_size != 0) {...
2004 Mar 16
1
[Bug 551] ssh install fails on Tru64 V5.0A
http://bugzilla.mindrot.org/show_bug.cgi?id=551
------- Additional Comments From stock at stokkie.net 2004-03-17 06:21 -------
shouldn't this compiler warning be fixed first?? :
cc: Warning: session.c, line 635: In this statement, the referenced type of
the pointer value "&fromlen" is "unsigned long", which is not compatible with
"int". (ptrmismatch)
(struct sockaddr *) & from, &fromlen) < 0) {
------------------------------------------------^
------- You are receiving this mail because: -------
You are the ass...
2000 Jan 19
3
AIX openssh patches
...rerror(errno));
close(random_pool);
+ #endif /* USE_SYSRANDOM */
}
#endif /* !HAVE_ARC4RANDOM */
*** canohost.c.DIST Wed Jan 19 11:00:42 2000
--- canohost.c Wed Jan 19 11:01:09 2000
***************
*** 29,35 ****
get_remote_hostname(int socket)
{
struct sockaddr_in from;
! int fromlen, i;
struct hostent *hp;
char name[MAXHOSTNAMELEN];
--- 29,40 ----
get_remote_hostname(int socket)
{
struct sockaddr_in from;
! #ifdef _AIX
! unsigned long fromlen;
! #else
! int fromlen;
! #endif
! int i;
struct hostent *hp;
char name[MAXHOSTNAMELEN];
***************
***...
2003 Feb 20
0
Netbios name service forwarding.
...;, name, inet_ntoa (i->me.sin_addr));
ptr += sprintf (ptr, " bcast %s", inet_ntoa (i->bcast.sin_addr));
syslog (LOG_ERR, ptr);
}
i->next = ifs;
ifs = i;
}
int
main (int argc, char **argv)
{
unsigned char buf[8192];
int w = getdtablesize ();
int len;
int fromlen;
iface i, j;
struct sockaddr_in from;
fd_set rfds;
int tid;
int bcast;
int dmport;
if (argc < 3)
{
fprintf (stderr, "Usage:\n");
fprintf (stderr, "%s nmbdport interface [interface] [interface] ...\n");
exit (1);
}
openlog ("nbn...
2009 Nov 23
0
[PATCH] Bluetooth support.
...6 +400,13 @@ get_sock_port(int sock, int local)
}
}
+#ifdef HAVE_BLUETOOTH
+ if (from.ss_family == AF_BLUETOOTH) {
+ struct sockaddr_rc *from_rc = (void *)&from;
+
+ return from_rc->rc_channel;
+ }
+#endif
/* Work around Linux IPv6 weirdness */
if (from.ss_family == AF_INET6)
fromlen = sizeof(struct sockaddr_in6);
Index: configure.ac
===================================================================
RCS file: /cvs/openssh/configure.ac,v
retrieving revision 1.430
diff -u -p -r1.430 configure.ac
--- configure.ac 11 Oct 2009 10:50:20 -0000 1.430
+++ configure.ac 23 Nov 2009 09:50...
2002 Dec 29
0
[Bug 460] New: ut_addr_v6 not used
...>ut_host));
diff -ruN t/openssh-3.5p1/session.c openssh-3.5p1/session.c
--- t/openssh-3.5p1/session.c 2002-09-26 02:38:50.000000000 +0200
+++ openssh-3.5p1/session.c 2002-11-05 13:11:30.000000000 +0100
@@ -730,8 +730,8 @@
* the address be 0.0.0.0.
*/
memset(&from, 0, sizeof(from));
+ fromlen = sizeof(from);
if (packet_connection_is_on_socket()) {
- fromlen = sizeof(from);
if (getpeername(packet_get_connection_in(),
(struct sockaddr *) & from, &fromlen) < 0) {
debug("getpeername: %.100s", strerror(errno));
diff -ruN t/openssh-3.5p1/sshlogin.c openss...
2001 Sep 30
3
UTF-8 stuff
...ding)
+ if (!charset)
+ charset = getenv("CHARSET");
+
+ free(current_charset);
+ current_charset = 0;
+ if (charset && *charset)
+ current_charset = strdup(charset);
+}
+
+static int convert_buffer(const char *fromcode, const char *tocode,
+ const char *from, size_t fromlen,
+ char **to, size_t *tolen)
{
+ int ret = -1;
+
#ifdef HAVE_ICONV
- static unsigned char buffer[BUFSIZE];
- char *from_p, *to_p;
- size_t from_left, to_left;
- iconv_t cd;
+ ret = iconvert(fromcode, tocode, from, fromlen, to, tolen);
+ if (ret != -1)
+ return ret;
#endif
- if (!s...
2000 Dec 27
2
patch to support hurd-i386
...l-files
install-files:
./mkinstalldirs $(DESTDIR)$(bindir)
diff -Nur openssh-2.2.0p1-/canohost.c openssh-2.2.0p1/canohost.c
--- openssh-2.2.0p1-/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...
2001 Apr 29
2
PATCH: UseLogin fix for 2.9p1 (w/improved last-login time)
...mp; command == NULL))
do_login(s, command);
+# ifdef LOGIN_NEEDS_UTMPX
+ else
+ do_pre_login(s);
+# endif
#endif
/* Do common processing for the child, such as execing the command. */
@@ -687,6 +694,34 @@
}
}
+#ifdef LOGIN_NEEDS_UTMPX
+void
+do_pre_login(Session *s)
+{
+ socklen_t fromlen;
+ struct sockaddr_storage from;
+ pid_t pid = getpid();
+
+ /*
+ * Get IP address of client. If the connection is not a socket, let
+ * the address be 0.0.0.0.
+ */
+ memset(&from, 0, sizeof(from));
+ if (packet_connection_is_on_socket()) {
+ fromlen = sizeof(from);
+ if (getpeername(pack...
2015 Dec 10
0
[PATCH] Receive multiple packets at a time
...pkt[i].len = msg[i].msg_len;
if(pkt[i].len <= 0 || pkt[i].len > MAXSIZE)
continue;
handle_incoming_vpn_packet(sock, &pkt[i], &from[i]);
}
#else
vpn_packet_t pkt;
sockaddr_t from;
socklen_t fromlen = sizeof(from);
pkt.len = recvfrom(listen_socket[sock].udp, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen);
if(pkt.len < 0)
{
if(!sockwouldblock(sockerrno))
logger(LOG_ERR, "Receiving packet failed: %s"...
2008 Aug 21
2
IP options
I'm seeing something similar to bug 1179
(https://bugzilla.mindrot.org/show_bug.cgi?id=1179), even with the
reordered IP options check.
For some reason, getsockopt is returning an IP options of length 2,
value 00 00.
Would Mark Weindling's original patch
(https://bugzilla.mindrot.org/attachment.cgi?id=1105) break anything if
I incorporated it?
Platform: HP NonStop S7000 series
2003 Feb 27
1
Unwanted reverse mapping of ip addresses
...the clients hostname, once the hostname has been
determined.
I am using Solaris 8 with ssh 3.4p1, and this piece of code:
debug3("Trying to reverse map address %.100s.", ntop);
/* Map the IP address to a host name. */
if (getnameinfo((struct sockaddr *)&from, fromlen, name,
sizeof(name),
NULL, 0, NI_NAMEREQD) != 0) {
/* Host name not found. Use ip address. */
log("Could not reverse map address %.100s.", ntop);
return xstrdup(ntop);
takes like 30 to 60 seconds to run if you have dns listed i...
2002 Sep 24
3
[Bug 401] ipv4 mapped address (ipv4 in ipv6) and ipv6 support fix
http://bugzilla.mindrot.org/show_bug.cgi?id=401
yoshfuji at linux-ipv6.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|misc. ipv4-mapped address |ipv4 mapped address (ipv4 in
|support fix |ipv6) and ipv6 support fix
------- Additional
2011 Jan 03
1
Tinc improvements
...n = e->to;
+ // if(!n)
+ // n = e->to;
- if(!try_mac(e->to, pkt))
+ if (!try_mac(e->to, pkt)) {
continue;
-
- n = e->to;
- break;
+ }
+ return e->to;
}
- return n;
+ return NULL;
}
void handle_incoming_vpn_data(int sock) {
@@ -606,7 +615,7 @@
socklen_t fromlen = sizeof(from);
node_t *n;
- pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen);
+ pkt.len = recvfrom(sock, (char *) &pkt.flags, MAXSIZE, 0, &from.sa, &fromlen);
if(pkt.len < 0) {
if(!sockwouldblock(sockerrno))
1998 May 14
1
samba main cvs branch seems to be broken on 64-bit boxes.....
hi there :)
the code in util.c seems to have some bugs w/regard to compilation on
64-bit machines. in this case, the hardware is an Alpha running redhat
4.2 with pam turned off in the makefile.
i get a whole series of errors, all of which say "passing arg 'n' of
'function' from incompatible pointer type. in util.c, checked out of the
main branch the day before yesterday,
1999 Dec 10
5
openssh on AIX v4.3.3 with native compiler
Hello,
Was looking in the archives... and haven't seen this one listed.
When I compile openssh-1.2pre17 on AIX v4.3.3 with the native compiler
I get the following errors. I haven't see this __attribute__ code.. What
compiler/libraries are needed to compile this? I have seen that people
have compiled openssh on AIX.. Just wondering what you have used.
# make
cc -g
2000 Mar 07
2
patch for openssh-1.2.2p1
...amp;from, 0, sizeof(from));
+ ((struct sockaddr_in *)&from)->sin_family = AF_INET;
+ memcpy(&((struct sockaddr_in *)&from)->sin_addr, &addr, sizeof(addr));
+ ((struct sockaddr_in *)&from)->sin_port = port;
+ }
+#endif
+
if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop),
NULL, 0, NI_NUMERICHOST) != 0)
fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed");
diff -ru openssh-1.2.2p1/channels.c openssh-1.2.2p1-20000308/channels.c
--- openssh-1.2.2p1/channels.c Fri Mar 3 20:35:33 2000
+++ openssh-1.2.2p1-20000308/chann...