search for: sockaddr

Displaying 20 results from an estimated 624 matches for "sockaddr".

2011 Aug 29
0
[PATCH] include: [sys/socket.h] Fix bind and connect attributes
Noticed while compiling some util-linux stuff: gen_uuid.c:507:21: warning: passing argument 2 of 'connect' discards 'const' qualifier from pointer target type [enabled by default] /usr/lib/klibc/include/sys/socket.h:248:14: note: expected 'struct sockaddr *' but argument is of type 'const struct sockaddr *' Signed-off-by: maximilian attems <max at stro.at> --- usr/include/sys/socket.h | 4 ++-- usr/klibc/SOCKETCALLS.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/include/sys/socket.h b/usr/...
2007 May 03
1
sockaddr structure elements
...mba 3.0.24 compiled for xscale on two devices: We are running a smbclient and smb daemon on two different devices, 192.168.1.39 (smbd) and 192.168.1.24 (smbclient). When we establish a smbclient connection from client -> Server, in the smbd/server.c:open_sockets_smbd() function, we are getting sockaddr structure values as follows (caught at debug data on smbd): smbd/server.c:open_sockets_smbd():addr sockaddr sa_family = AF_INET sa_addr[14] = 4, 5, 192, 168, 1, 24, 220, 126, 47, 204, 180, 41, 11, 192 definition: struct sockaddr { sa_family_t sa_family; /* Address family, AF_xx...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...rsion. Sorry if this causes any inconvenience. Regards, Jan diff -ur openssh/dns.c openssh-sshfp/dns.c --- openssh/dns.c 2010-08-31 14:41:14.000000000 +0200 +++ openssh-sshfp/dns.c 2010-11-27 23:36:30.775455403 +0100 @@ -173,7 +173,7 @@ */ int verify_host_key_dns(const char *hostname, struct sockaddr *address, - Key *hostkey, int *flags) + Key *hostkey, int *flags, const char *canohost) { u_int counter; int result; @@ -200,7 +200,7 @@ return -1; } - result = getrrsetbyname(hostname, DNS_RDATACLASS_IN, + result = getrrsetbyname(canohost, DNS_RDATACLASS_IN, DNS_RDATATYPE_S...
2004 Feb 25
3
[patch] Correct configure test for sin_len to compile on Tru64 Unix
The last versions of rsync fail to compile on Tru64 Unix (alpha), because of a typo in configure.in. The problem is that the code in configure check for sockaddr.sa_len, while the code uses sockaddr.sin_len. This patch fixes the problem. Please include it in the next version of rsync. diff -ur src-2.6.0/configure.in src-2.6.0-local/configure.in --- src-2.6.0-local/configure.in 2004-01-01 20:09:16.000000000 +0100 +++ src-2.6.0-foo/configure.in 200...
2016 Jan 06
0
[klibc:master] Add accept4(), handle fallback from accept () to accept4()
...cketcalls.pl | 15 +++++++++++++-- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/usr/include/sys/socket.h b/usr/include/sys/socket.h index 3334212..d0ba9eb 100644 --- a/usr/include/sys/socket.h +++ b/usr/include/sys/socket.h @@ -251,6 +251,7 @@ __extern int bind(int, const struct sockaddr *, int); __extern int connect(int, const struct sockaddr *, socklen_t); __extern int listen(int, int); __extern int accept(int, struct sockaddr *, socklen_t *); +__extern int accept4(int, struct sockaddr *, socklen_t *, int); __extern int getsockname(int, struct sockaddr *, socklen_t *); __ext...
2011 May 10
1
[Bug 1903] New: bindresvport_sa() does not validate non-zero struct sockaddr * port is within intended range
https://bugzilla.mindrot.org/show_bug.cgi?id=1903 Summary: bindresvport_sa() does not validate non-zero struct sockaddr * port is within intended range Product: Portable OpenSSH Version: 5.8p2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Miscellaneous AssignedTo: unassigned-bugs at mindrot....
2019 Sep 18
1
[PATCH nbdkit] server: Remove useless thread local sockaddr.
When accepting a connection on a TCP or Unix domain socket we recorded the peer address in both the thread_data struct and thread-local storage. But for no reason because it was never used anywhere. Since we were only allocating a ‘struct sockaddr’ (rather than a ‘struct sockaddr_storage’) it's likely that some peer addresses would have been truncated. Remove all this code, it had no effect. Plugins that want to get the peer address can use nbdkit_peer_name() which was added in commit 03a2cc3d766e and doesn't suffer from the above...
2003 May 17
1
Tru64 Unix patch for rsync 2.5.6.
...-o socket.o cc: Error: socket.c, line 619: In this statement, "sin_len" is not a member of "sock2". (needmember) sock2.sin_len = sizeof(sock2); --------^ make: *** [socket.o] Error 1 error: compile failed. The problem seem to be that configure defines HAVE_SOCKADDR_LEN if struct sockaddr.sa_len exists, while the code uses member sin_len instead of sa_len. Trying to rename sin_len to sa_len did not help. It only gave this familiar message: cc: Error: socket.c, line 620: In this statement, "sa_len" is not a member of "sock2". (needme...
2001 Aug 07
1
do_pre_login() used before declared
...pshot. 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()) { + fromlen = s...
2001 Dec 03
0
Socket address problems with 2.5.1pre1
...ever, I think the problem may not be specific to this C lib version. I applied this patch to socket.c:client_addr() to experiment a bit: --- socket.c.orig Tue Nov 27 08:01:05 2001 +++ socket.c Sun Dec 2 21:04:20 2001 @@ -555,7 +555,7 @@ **/ char *client_addr(int fd) { - struct sockaddr ss; + struct sockaddr_storage ss; int length = sizeof(ss); static char addr_buf[100]; static int initialised; @@ -564,11 +564,14 @@ initialised = 1; - if (getpeername(fd, &ss, &length)) { + if (getpeername(fd, (struct sockaddr *)&amp...
2006 Aug 25
0
Session request packet
...nt* host; if((host = gethostbyname(szHost)) != NULL) cout << "Get host name is " << host->h_name << endl; else { cout << "Get host name failed." << endl; return -1; } //Connect port of host what want to connect struct sockaddr_in sockaddr; sockaddr.sin_family = AF_INET; sockaddr.sin_port = htons(iPort); sockaddr.sin_addr = *((struct in_addr*)host->h_addr); if(connect(socketid, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr)) == -1) { cout << "Connect failed." << endl;...
1999 Dec 29
1
Patch to use Dante socks library
...ockname +#define read Rread +#define readv Rreadv +#define recv Rrecv +#define recvmsg Rrecvmsg +#define recvfrom Rrecvfrom +#define rresvport Rrresvport +#define send Rsend +#define sendmsg Rsendmsg +#define sendto Rsendto +#define write Rwrite +#define writev Rwritev +int Raccept (int, struct sockaddr *, socklen_t *); +int Rbind (int, const struct sockaddr *, socklen_t); +int Rbindresvport(int , struct sockaddr_in *); +int Rconnect (int, const struct sockaddr *, socklen_t); +struct hostent *Rgethostbyname(const char *); +struct hostent *Rgethostbyname2(const char *, int); +int Rgetpe...
2008 Oct 07
0
"route flush" does not delete routes created with -interface option
...US 0 0 tun1 If I do "route -n flush -inet" then it does not delete the routes created with a -interface option. see verbose output: route -vn flush -inet RTM_GET: Report Metrics: len 204, pid: 0, seq 0, errno 0, flags:<UP,GATEWAY,STATIC> locks: inits: sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA> 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_DELETE: Delete Route: len 204, pid: 0, seq 2, errno 0, flags:<UP,GATEWAY,STATIC> locks: inits: sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA> 146.64.80.0 192.168.0.100...
2002 Aug 19
1
sshd doesn't log hostname into utmp correctly [resend]
Hi, Though I sent this message before, I didn't get any response. So, I send this message, again. This problem is occur when the connection is form IPv6, and IPv4 is not affected. openssh-3.4p1 doesn't handle actual size of struct sockaddr correctly, and does copy it as long as just size of struct sockaddr. So, sshd deesn't log hostname into utmp correctly. Here is a patch to fix this problem. Sincerely, -------------- next part -------------- A non-text attachment was scrubbed... Name: openssh-3.4p1-loghost.diff Type: text/x...
2017 Jun 15
2
Joining a Windows Server 2008 / 2008 R2 DC to a Samba AD - ISSUE - The RPC server is unavailable
On Wed, 2017-06-14 at 11:01 +0100, Rowland Penny via samba wrote: > On Wed, 14 Jun 2017 15:13:13 +0530 > Arjit Gupta <arjitk.gupta at gmail.com> wrote: > > > Thanks for the response. > > > > Is this xattr causing this RPC server is unavailable issue ? > > > > Arjit Kumar > > > > > > Lets be perfectly honest here, the lack of
2018 Dec 10
2
[PATCH] cleanup of global variables server/client_version_string in sshconnect.c
..._string); + free(server_version_string); free(local_user); + free(host); } void diff --git a/sshconnect.h b/sshconnect.h index 890d857..d6de9fe 100644 --- a/sshconnect.h +++ b/sshconnect.h @@ -40,7 +40,7 @@ void ssh_kill_proxy_command(void); void ssh_login(Sensitive *, const char *, struct sockaddr *, u_short, struct passwd *, int); -void ssh_exchange_identification(int); +void ssh_exchange_identification(int, char **, char **); int verify_host_key(char *, struct sockaddr *, struct sshkey *); @@ -48,7 +48,7 @@ void get_hostfile_hostname_ipaddr(char *, struct sockaddr *, u_shor...
2009 Jun 08
2
[PATCH] few minor bugfixes
...VE_CONNECT) && defined(HAVE_HTONS) && defined(HAVE_GETHOSTBYNAME) +#if defined(HAVE_SOCKET) && defined(HAVE_CONNECT) && defined(HAVE_HTONS) static int viewer_open_vnc_socket(const char* vnchost, int vncport) { - int socketfd; - struct hostent *serv; - struct sockaddr_in serv_addr; + int result, socketfd; + char port[10]; + struct addrinfo* vnc_addr; - socketfd = socket(PF_INET, SOCK_STREAM, 0); - if(socketfd < 0){ - return -1; - } + sprintf(port, "%d", vncport); - serv = gethostbyname(vnchost); - if(serv == NULL){ + result = geta...
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,
2004 Nov 21
1
mac_portacl and automatic port allocation
...15 May 2004 20:55:19 -0000 1.5 +++ mac_portacl.c 21 Nov 2004 21:25:49 -0000 @@ -79,6 +79,7 @@ #include <sys/sysctl.h> #include <netinet/in.h> +#include <netinet/in_pcb.h> #include <vm/vm.h> @@ -441,6 +442,7 @@ struct label *socketlabel, struct sockaddr *sockaddr) { struct sockaddr_in *sin; + struct inpcb *inp = sotoinpcb(so); int family, type; u_int16_t port; @@ -467,6 +469,11 @@ type = so->so_type; sin = (struct sockaddr_in *) sockaddr; port = ntohs(sin->sin_port); + /* I...
2015 Apr 08
10
Build-system cleanups
Hi everyone Following are a number of build-system cleanup patches. Some of them are prep-work for a possible upcoming automake/gnulib introduction. Best regards, Tiziano