diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-31 00:43:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:22 -0500 |
commit | 07e3fa214673fde54c13273c5f95418011d56080 (patch) | |
tree | 77c5840135b682a28dacb7b9379fad4ffa3c55f1 /source4/lib | |
parent | e124ec95188933fa4244356edb664601359c489f (diff) | |
download | samba-07e3fa214673fde54c13273c5f95418011d56080.tar.gz samba-07e3fa214673fde54c13273c5f95418011d56080.tar.bz2 samba-07e3fa214673fde54c13273c5f95418011d56080.zip |
r6144: Apparently there are more systems that have AF_UNIX then
AF_LOCAL (we already use AF_UNIX in other places).
(This used to be commit 88d93b9782766ab1159a233307ef508881caa615)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/socket_wrapper/socket_wrapper.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/socket_wrapper/socket_wrapper.c b/source4/lib/socket_wrapper/socket_wrapper.c index b91ff2cb0e..238155b26b 100644 --- a/source4/lib/socket_wrapper/socket_wrapper.c +++ b/source4/lib/socket_wrapper/socket_wrapper.c @@ -129,12 +129,12 @@ static int sockaddr_convert_to_un(const struct socket_info *si, const struct soc if (!out_addr) return 0; - out_addr->sun_family = AF_LOCAL; + out_addr->sun_family = AF_UNIX; switch (in_addr->sa_family) { case AF_INET: return convert_in_un(si->type, (const struct sockaddr_in *)in_addr, out_addr); - case AF_LOCAL: + case AF_UNIX: memcpy(out_addr, in_addr, sizeof(*out_addr)); return 0; default: @@ -157,7 +157,7 @@ static int sockaddr_convert_from_un(const struct socket_info *si, switch (family) { case AF_INET: return convert_un_in(in_addr, (struct sockaddr_in *)out_addr, out_len); - case AF_LOCAL: + case AF_UNIX: memcpy(out_addr, in_addr, sizeof(*in_addr)); *out_len = sizeof(*in_addr); return 0; @@ -178,7 +178,7 @@ int swrap_socket(int domain, int type, int protocol) return real_socket(domain, type, protocol); } - fd = real_socket(PF_LOCAL, type, 0); + fd = real_socket(AF_UNIX, type, 0); if (fd < 0) return fd; @@ -330,7 +330,7 @@ int swrap_getsockopt(int s, int level, int optname, void *optval, socklen_t *opt } switch (si->domain) { - case AF_LOCAL: + case AF_UNIX: return real_getsockopt(s, level, optname, optval, optlen); default: errno = ENOPROTOOPT; @@ -351,7 +351,7 @@ int swrap_setsockopt(int s, int level, int optname, const void *optval, so } switch (si->domain) { - case AF_LOCAL: + case AF_UNIX: return real_setsockopt(s, level, optname, optval, optlen); case AF_INET: /* Silence some warnings */ |