1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol

The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
This commit is contained in:
Andrew Bartlett 2011-06-20 14:55:32 +10:00
parent 018f4a5889
commit a1f04e8abc
40 changed files with 142 additions and 142 deletions

View File

@ -88,7 +88,7 @@ _PUBLIC_ NTSTATUS torture_temp_dir(struct torture_context *tctx,
NT_STATUS_HAVE_NO_MEMORY(*tempdir);
if (mkdtemp(*tempdir) == NULL) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -154,7 +154,7 @@ _PUBLIC_ NTSTATUS torture_deltree_outputdir(struct torture_context *tctx)
if (local_deltree(tctx->outputdir) == -1) {
if (errno != 0) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_UNSUCCESSFUL;
}

View File

@ -78,7 +78,7 @@ NTSTATUS msrpc_gen(TALLOC_CTX *mem_ctx,
s, &n);
if (!ret) {
va_end(ap);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
pointers[i].length = n;
pointers[i].length -= 2;
@ -92,7 +92,7 @@ NTSTATUS msrpc_gen(TALLOC_CTX *mem_ctx,
s, &n);
if (!ret) {
va_end(ap);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
pointers[i].length = n;
pointers[i].length -= 1;
@ -108,7 +108,7 @@ NTSTATUS msrpc_gen(TALLOC_CTX *mem_ctx,
s, &n);
if (!ret) {
va_end(ap);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
pointers[i].length = n;
pointers[i].length -= 2;

View File

@ -284,7 +284,7 @@ static bool cldap_socket_recv_dgram(struct cldap_socket *c,
nomem:
in->recv_errno = ENOMEM;
error:
status = map_nt_error_from_unix(in->recv_errno);
status = map_nt_error_from_unix_common(in->recv_errno);
nterror:
/* in connected mode the first pending search gets the error */
if (!c->connected) {
@ -337,7 +337,7 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx,
NULL, 0,
&any);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
goto nterror;
}
local_addr = any;
@ -351,7 +351,7 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx,
ret = tdgram_inet_udp_socket(local_addr, remote_addr,
c, &c->sock);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
goto nterror;
}
talloc_free(any);
@ -669,7 +669,7 @@ static void cldap_search_state_queue_done(struct tevent_req *subreq)
talloc_free(subreq);
if (ret == -1) {
NTSTATUS status;
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
DLIST_REMOVE(state->caller.cldap->searches.list, state);
ZERO_STRUCT(state->caller.cldap);
tevent_req_nterror(req, status);

View File

@ -75,20 +75,20 @@ struct tevent_req *echo_request_send(TALLOC_CTX *mem_ctx,
ret = tsocket_address_inet_from_strings(state, "ip", NULL, 0,
&local_addr);
if (ret != 0) {
tevent_req_nterror(req, map_nt_error_from_unix(ret));
tevent_req_nterror(req, map_nt_error_from_unix_common(ret));
return tevent_req_post(req, ev);
}
ret = tsocket_address_inet_from_strings(state, "ip", server_addr_string,
ECHO_PORT, &server_addr);
if (ret != 0) {
tevent_req_nterror(req, map_nt_error_from_unix(ret));
tevent_req_nterror(req, map_nt_error_from_unix_common(ret));
return tevent_req_post(req, ev);
}
ret = tdgram_inet_udp_socket(local_addr, server_addr, state, &dgram);
if (ret != 0) {
tevent_req_nterror(req, map_nt_error_from_unix(ret));
tevent_req_nterror(req, map_nt_error_from_unix_common(ret));
return tevent_req_post(req, ev);
}
@ -132,7 +132,7 @@ static void echo_request_get_reply(struct tevent_req *subreq)
TALLOC_FREE(subreq);
if (len == -1 && err != 0) {
tevent_req_nterror(req, map_nt_error_from_unix(err));
tevent_req_nterror(req, map_nt_error_from_unix_common(err));
return;
}
@ -168,7 +168,7 @@ static void echo_request_done(struct tevent_req *subreq)
TALLOC_FREE(subreq);
if (len == -1 && err != 0) {
tevent_req_nterror(req, map_nt_error_from_unix(err));
tevent_req_nterror(req, map_nt_error_from_unix_common(err));
return;
}

View File

@ -331,7 +331,7 @@ _PUBLIC_ NTSTATUS nbt_name_refresh_wins(struct nbt_name_socket *nbtsock,
}
if (!tevent_req_poll(subreq, ev)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
talloc_free(frame);
return status;
}

View File

@ -283,7 +283,7 @@ NTSTATUS nbt_name_register_bcast(struct nbt_name_socket *nbtsock,
}
if (!tevent_req_poll(subreq, ev)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
talloc_free(frame);
return status;
}
@ -498,7 +498,7 @@ _PUBLIC_ NTSTATUS nbt_name_register_wins(struct nbt_name_socket *nbtsock,
}
if (!tevent_req_poll(subreq, ev)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
talloc_free(frame);
return status;
}

View File

@ -140,7 +140,7 @@ static const struct {
/*********************************************************************
Map an NT error code from a Unix error code.
*********************************************************************/
NTSTATUS map_nt_error_from_unix(int unix_error)
NTSTATUS map_nt_error_from_unix_common(int unix_error)
{
int i;

View File

@ -41,7 +41,7 @@ WERROR ntstatus_to_werror(NTSTATUS error);
/*********************************************************************
Map an NT error code from a Unix error code.
*********************************************************************/
NTSTATUS map_nt_error_from_unix(int unix_error);
NTSTATUS map_nt_error_from_unix_common(int unix_error);
NTSTATUS nt_status_squash(NTSTATUS nt_status);

View File

@ -106,7 +106,7 @@ static void tstream_read_pdu_blob_done(struct tevent_req *subreq)
ret = tstream_readv_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
tevent_req_nterror(req, status);
return;
}

View File

@ -495,7 +495,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
dir = sys_opendir(modules_path(talloc_tos(),
SAMBA_SUBSYSTEM_GPEXT));
if (!dir) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
while ((dirent = sys_readdir(dir))) {

View File

@ -108,7 +108,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
}
if (write(tmp_fd, data_out, converted_size) != converted_size) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
goto out;
}

View File

@ -227,7 +227,7 @@ NTSTATUS dcerpc_binding_handle_raw_call(struct dcerpc_binding_handle *h,
}
if (!tevent_req_poll(subreq, ev)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
talloc_free(frame);
return status;
}
@ -540,7 +540,7 @@ NTSTATUS dcerpc_binding_handle_call(struct dcerpc_binding_handle *h,
}
if (!tevent_req_poll(subreq, ev)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
talloc_free(frame);
return status;
}

View File

@ -266,7 +266,7 @@ static void dcerpc_read_ncacn_packet_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
tevent_req_nterror(req, status);
return;
}

View File

@ -465,7 +465,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
lib/util.o lib/util_malloc.o lib/namearray.o lib/util_cmdline.o lib/util_names.o \
lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
lib/substitute.o lib/substitute_generic.o ../lib/util/substitute.o lib/dbwrap_util.o \
lib/ms_fnmatch.o ../lib/util/ms_fnmatch.o lib/errmap_unix.o \
lib/ms_fnmatch.o ../lib/util/ms_fnmatch.o lib/errmap_unix.o ../libcli/util/errmap_unix.o \
lib/tallocmsg.o lib/dmallocmsg.o \
libsmb/clisigning.o libsmb/smb_signing.o \
../lib/util/charset/iconv.o intl/lang_tdb.o \

View File

@ -448,14 +448,14 @@ NTSTATUS kerberos_pac_blob_to_user_info_dc(TALLOC_CTX *mem_ctx,
pac_blob.data, pac_blob.length,
&pac);
if (ret) {
return map_nt_error_from_unix(ret);
return map_nt_error_from_unix_common(ret);
}
ret = kerberos_pac_to_user_info_dc(mem_ctx, pac, context, user_info_dc, pac_srv_sig, pac_kdc_sig);
krb5_pac_free(context, pac);
if (ret) {
return map_nt_error_from_unix(ret);
return map_nt_error_from_unix_common(ret);
}
return NT_STATUS_OK;
}

View File

@ -116,7 +116,7 @@ static NTSTATUS cldapd_add_socket(struct cldapd_server *cldapd, struct loadparm_
lpcfg_cldap_port(lp_ctx),
&socket_address);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0,("invalid address %s:%d - %s:%s\n",
address, lpcfg_cldap_port(lp_ctx),
gai_strerror(ret), nt_errstr(status)));

View File

@ -490,7 +490,7 @@ static NTSTATUS dns_add_socket(struct dns_server *dns,
address, port,
&dns_socket->local_address);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
return status;
}
@ -519,7 +519,7 @@ static NTSTATUS dns_add_socket(struct dns_server *dns,
dns_udp_socket,
&dns_udp_socket->dgram);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0,("Failed to bind to %s:%u UDP - %s\n",
address, port, nt_errstr(status)));
return status;

View File

@ -79,7 +79,7 @@ static void dnsupdate_rndc_done(struct tevent_req *subreq)
ret = samba_runcmd_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret != 0) {
service->confupdate.status = map_nt_error_from_unix(sys_errno);
service->confupdate.status = map_nt_error_from_unix_common(sys_errno);
} else {
service->confupdate.status = NT_STATUS_OK;
}
@ -242,7 +242,7 @@ static void dnsupdate_nameupdate_done(struct tevent_req *subreq)
ret = samba_runcmd_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret != 0) {
service->nameupdate.status = map_nt_error_from_unix(sys_errno);
service->nameupdate.status = map_nt_error_from_unix_common(sys_errno);
} else {
service->nameupdate.status = NT_STATUS_OK;
}
@ -271,7 +271,7 @@ static void dnsupdate_spnupdate_done(struct tevent_req *subreq)
ret = samba_runcmd_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret != 0) {
service->nameupdate.status = map_nt_error_from_unix(sys_errno);
service->nameupdate.status = map_nt_error_from_unix_common(sys_errno);
} else {
service->nameupdate.status = NT_STATUS_OK;
}
@ -381,7 +381,7 @@ static void dnsupdate_RODC_callback(struct tevent_req *req)
ret = samba_runcmd_recv(req, &sys_errno);
talloc_free(req);
if (ret != 0) {
st->r->out.result = map_nt_error_from_unix(sys_errno);
st->r->out.result = map_nt_error_from_unix_common(sys_errno);
DEBUG(2,(__location__ ": RODC DNS Update failed: %s\n", nt_errstr(st->r->out.result)));
} else {
st->r->out.result = NT_STATUS_OK;

View File

@ -197,7 +197,7 @@ static NTSTATUS echo_add_socket(struct echo_server *echo,
address, port,
&echo_socket->local_address);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
return status;
}
@ -212,7 +212,7 @@ static NTSTATUS echo_add_socket(struct echo_server *echo,
echo_udp_socket,
&echo_udp_socket->dgram);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0, ("Failed to bind to %s:%u UDP - %s\n",
address, port, nt_errstr(status)));
return status;

View File

@ -654,7 +654,7 @@ static NTSTATUS kdc_add_socket(struct kdc_server *kdc,
address, port,
&kdc_socket->local_address);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
return status;
}
@ -685,7 +685,7 @@ static NTSTATUS kdc_add_socket(struct kdc_server *kdc,
kdc_udp_socket,
&kdc_udp_socket->dgram);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0,("Failed to bind to %s:%u UDP - %s\n",
address, port, nt_errstr(status)));
return status;

View File

@ -82,7 +82,7 @@ static void ldapsrv_starttls_postprocess_done(struct tevent_req *subreq)
conn, &conn->sockets.tls);
TALLOC_FREE(subreq);
if (ret == -1) {
NTSTATUS status = map_nt_error_from_unix(sys_errno);
NTSTATUS status = map_nt_error_from_unix_common(sys_errno);
DEBUG(1,("ldapsrv_starttls_postprocess_done: accept_tls_loop: "
"tstream_tls_accept_recv() - %d:%s => %s",

View File

@ -451,7 +451,7 @@ _PUBLIC_ NTSTATUS socket_dup(struct socket_context *sock)
}
fd = dup(sock->fd);
if (fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
close(sock->fd);
sock->fd = fd;

View File

@ -47,7 +47,7 @@ static NTSTATUS ipv4_init(struct socket_context *sock)
sock->fd = socket(PF_INET, type, 0);
if (sock->fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
sock->backend_name = "ipv4";
@ -70,16 +70,16 @@ static NTSTATUS ip_connect_complete(struct socket_context *sock, uint32_t flags)
for non-blocking connect */
ret = getsockopt(sock->fd, SOL_SOCKET, SO_ERROR, &error, &len);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (error != 0) {
return map_nt_error_from_unix(error);
return map_nt_error_from_unix_common(error);
}
if (!(flags & SOCKET_FLAG_BLOCK)) {
ret = set_blocking(sock->fd, false);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -102,7 +102,7 @@ static NTSTATUS ipv4_connect(struct socket_context *sock,
if (my_address && my_address->sockaddr) {
ret = bind(sock->fd, my_address->sockaddr, my_address->sockaddrlen);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
} else if (my_address) {
my_ip = interpret_addr2(my_address->addr);
@ -119,7 +119,7 @@ static NTSTATUS ipv4_connect(struct socket_context *sock,
ret = bind(sock->fd, (struct sockaddr *)&my_addr, sizeof(my_addr));
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
}
@ -127,7 +127,7 @@ static NTSTATUS ipv4_connect(struct socket_context *sock,
if (srv_address->sockaddr) {
ret = connect(sock->fd, srv_address->sockaddr, srv_address->sockaddrlen);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
} else {
srv_ip = interpret_addr2(srv_address->addr);
@ -147,7 +147,7 @@ static NTSTATUS ipv4_connect(struct socket_context *sock,
ret = connect(sock->fd, (const struct sockaddr *)&srv_addr, sizeof(srv_addr));
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -186,20 +186,20 @@ static NTSTATUS ipv4_listen(struct socket_context *sock,
}
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (sock->type == SOCKET_TYPE_STREAM) {
ret = listen(sock->fd, queue_size);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
if (!(flags & SOCKET_FLAG_BLOCK)) {
ret = set_blocking(sock->fd, false);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -220,14 +220,14 @@ static NTSTATUS ipv4_accept(struct socket_context *sock, struct socket_context *
new_fd = accept(sock->fd, (struct sockaddr *)&cli_addr, &cli_addr_len);
if (new_fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (!(sock->flags & SOCKET_FLAG_BLOCK)) {
int ret = set_blocking(new_fd, false);
if (ret == -1) {
close(new_fd);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -268,7 +268,7 @@ static NTSTATUS ip_recv(struct socket_context *sock, void *buf,
if (gotlen == 0) {
return NT_STATUS_END_OF_FILE;
} else if (gotlen == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
*nread = gotlen;
@ -311,7 +311,7 @@ static NTSTATUS ipv4_recvfrom(struct socket_context *sock, void *buf,
return NT_STATUS_END_OF_FILE;
} else if (gotlen == -1) {
talloc_free(src);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
src->sockaddrlen = from_len;
@ -342,7 +342,7 @@ static NTSTATUS ip_send(struct socket_context *sock,
len = send(sock->fd, blob->data, blob->length, 0);
if (len == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
*sendlen = len;
@ -383,7 +383,7 @@ static NTSTATUS ipv4_sendto(struct socket_context *sock,
(struct sockaddr *)&srv_addr, sizeof(srv_addr));
}
if (len == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
*sendlen = len;
@ -518,7 +518,7 @@ static NTSTATUS ip_pending(struct socket_context *sock, size_t *npending)
*npending = value;
return NT_STATUS_OK;
}
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
static const struct socket_ops ipv4_ops = {
@ -604,7 +604,7 @@ static NTSTATUS ipv6_init(struct socket_context *sock)
sock->fd = socket(PF_INET6, type, 0);
if (sock->fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
sock->backend_name = "ipv6";
@ -623,7 +623,7 @@ static NTSTATUS ipv6_tcp_connect(struct socket_context *sock,
if (my_address && my_address->sockaddr) {
ret = bind(sock->fd, my_address->sockaddr, my_address->sockaddrlen);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
} else if (my_address) {
struct in6_addr my_ip;
@ -638,7 +638,7 @@ static NTSTATUS ipv6_tcp_connect(struct socket_context *sock,
ret = bind(sock->fd, (struct sockaddr *)&my_addr, sizeof(my_addr));
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
}
@ -661,7 +661,7 @@ static NTSTATUS ipv6_tcp_connect(struct socket_context *sock,
ret = connect(sock->fd, (const struct sockaddr *)&srv_addr, sizeof(srv_addr));
}
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return ip_connect_complete(sock, flags);
@ -711,20 +711,20 @@ static NTSTATUS ipv6_listen(struct socket_context *sock,
}
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (sock->type == SOCKET_TYPE_STREAM) {
ret = listen(sock->fd, queue_size);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
if (!(flags & SOCKET_FLAG_BLOCK)) {
ret = set_blocking(sock->fd, false);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -745,14 +745,14 @@ static NTSTATUS ipv6_tcp_accept(struct socket_context *sock, struct socket_conte
new_fd = accept(sock->fd, (struct sockaddr *)&cli_addr, &cli_addr_len);
if (new_fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (!(sock->flags & SOCKET_FLAG_BLOCK)) {
int ret = set_blocking(new_fd, false);
if (ret == -1) {
close(new_fd);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -816,7 +816,7 @@ static NTSTATUS ipv6_recvfrom(struct socket_context *sock, void *buf,
return NT_STATUS_END_OF_FILE;
} else if (gotlen == -1) {
talloc_free(src);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
src->sockaddrlen = from_len;
@ -867,7 +867,7 @@ static NTSTATUS ipv6_sendto(struct socket_context *sock,
(struct sockaddr *)&srv_addr, sizeof(srv_addr));
}
if (len == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
*sendlen = len;

View File

@ -33,7 +33,7 @@ _PUBLIC_ const struct socket_ops *socket_unixdom_ops(enum socket_type type);
*/
static NTSTATUS unixdom_error(int ernum)
{
return map_nt_error_from_unix(ernum);
return map_nt_error_from_unix_common(ernum);
}
static NTSTATUS unixdom_init(struct socket_context *sock)
@ -53,7 +53,7 @@ static NTSTATUS unixdom_init(struct socket_context *sock)
sock->fd = socket(PF_UNIX, type, 0);
if (sock->fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
sock->private_data = NULL;
@ -76,16 +76,16 @@ static NTSTATUS unixdom_connect_complete(struct socket_context *sock, uint32_t f
for non-blocking connect */
ret = getsockopt(sock->fd, SOL_SOCKET, SO_ERROR, &error, &len);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (error != 0) {
return map_nt_error_from_unix(error);
return map_nt_error_from_unix_common(error);
}
if (!(flags & SOCKET_FLAG_BLOCK)) {
ret = set_blocking(sock->fd, false);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -194,7 +194,7 @@ static NTSTATUS unixdom_accept(struct socket_context *sock,
int ret = set_blocking(new_fd, false);
if (ret == -1) {
close(new_fd);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
}
@ -280,7 +280,7 @@ static NTSTATUS unixdom_sendto(struct socket_context *sock,
(struct sockaddr *)&srv_addr, sizeof(srv_addr));
}
if (len == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
*sendlen = len;
@ -390,7 +390,7 @@ static NTSTATUS unixdom_pending(struct socket_context *sock, size_t *npending)
*npending = value;
return NT_STATUS_OK;
}
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
static const struct socket_ops unixdom_ops = {

View File

@ -518,7 +518,7 @@ struct composite_context *resolve_name_dns_ex_send(TALLOC_CTX *mem_ctx,
/* setup a pipe to chat to our child */
ret = pipe(fd);
if (ret == -1) {
composite_error(c, map_nt_error_from_unix(errno));
composite_error(c, map_nt_error_from_unix_common(errno));
return c;
}
@ -542,7 +542,7 @@ struct composite_context *resolve_name_dns_ex_send(TALLOC_CTX *mem_ctx,
state->child = fork();
if (state->child == (pid_t)-1) {
composite_error(c, map_nt_error_from_unix(errno));
composite_error(c, map_nt_error_from_unix_common(errno));
return c;
}

View File

@ -381,7 +381,7 @@ NTSTATUS smb2_connect(TALLOC_CTX *mem_ctx,
ok = tevent_req_poll(subreq, ev);
if (!ok) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
TALLOC_FREE(frame);
return status;
}

View File

@ -318,7 +318,7 @@ NTSTATUS smb2_session_setup_spnego(struct smb2_session *session,
ok = tevent_req_poll(subreq, ev);
if (!ok) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
TALLOC_FREE(frame);
return status;
}

View File

@ -430,7 +430,7 @@ NTSTATUS smb2_composite_setpathinfo(struct smb2_tree *tree, union smb_setfileinf
ok = tevent_req_poll(subreq, ev);
if (!ok) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
TALLOC_FREE(frame);
return status;
}

View File

@ -181,7 +181,7 @@ struct tevent_req *wrepl_connect_send(TALLOC_CTX *mem_ctx,
our_ip, 0,
&state->local_address);
if (ret != 0) {
NTSTATUS status = map_nt_error_from_unix(errno);
NTSTATUS status = map_nt_error_from_unix_common(errno);
tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
@ -190,7 +190,7 @@ struct tevent_req *wrepl_connect_send(TALLOC_CTX *mem_ctx,
peer_ip, WINS_REPLICATION_PORT,
&state->remote_address);
if (ret != 0) {
NTSTATUS status = map_nt_error_from_unix(errno);
NTSTATUS status = map_nt_error_from_unix_common(errno);
tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
@ -250,7 +250,7 @@ static void wrepl_connect_done(struct tevent_req *subreq)
ret = tstream_inet_tcp_connect_recv(subreq, &sys_errno,
state, &state->stream, NULL);
if (ret != 0) {
NTSTATUS status = map_nt_error_from_unix(sys_errno);
NTSTATUS status = map_nt_error_from_unix_common(sys_errno);
tevent_req_nterror(req, status);
return;
}
@ -443,7 +443,7 @@ static void wrepl_request_writev_done(struct tevent_req *subreq)
ret = tstream_writev_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
NTSTATUS status = map_nt_error_from_unix(sys_errno);
NTSTATUS status = map_nt_error_from_unix_common(sys_errno);
TALLOC_FREE(state->caller.wrepl_socket->stream);
tevent_req_nterror(req, status);
return;
@ -494,7 +494,7 @@ static void wrepl_request_disconnect_done(struct tevent_req *subreq)
ret = tstream_disconnect_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
NTSTATUS status = map_nt_error_from_unix(sys_errno);
NTSTATUS status = map_nt_error_from_unix_common(sys_errno);
TALLOC_FREE(state->caller.wrepl_socket->stream);
tevent_req_nterror(req, status);
return;

View File

@ -769,7 +769,7 @@ static void becomeDC_send_cldap(struct libnet_BecomeDC_state *s)
lpcfg_cldap_port(s->libnet->lp_ctx),
&dest_address);
if (ret != 0) {
c->status = map_nt_error_from_unix(errno);
c->status = map_nt_error_from_unix_common(errno);
if (!composite_is_ok(c)) return;
}

View File

@ -64,7 +64,7 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_context *lctx, struct li
&dest_address);
if (ret != 0) {
r->out.error_string = NULL;
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
return status;
}

View File

@ -277,7 +277,7 @@ static void unbecomeDC_send_cldap(struct libnet_UnbecomeDC_state *s)
lpcfg_cldap_port(s->libnet->lp_ctx),
&dest_address);
if (ret != 0) {
c->status = map_nt_error_from_unix(errno);
c->status = map_nt_error_from_unix_common(errno);
if (!composite_is_ok(c)) return;
}

View File

@ -150,7 +150,7 @@ static NTSTATUS cifspsx_unlink(struct ntvfs_module_context *ntvfs,
/* ignoring wildcards ... */
if (unlink(unix_path) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -179,7 +179,7 @@ static NTSTATUS cifspsx_chkpath(struct ntvfs_module_context *ntvfs,
unix_path = cifspsx_unix_path(ntvfs, req, cp->chkpath.in.path);
if (stat(unix_path, &st) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (!S_ISDIR(st.st_mode)) {
@ -294,7 +294,7 @@ static NTSTATUS cifspsx_qpathinfo(struct ntvfs_module_context *ntvfs,
DEBUG(19,("cifspsx_qpathinfo: file %s\n", unix_path));
if (stat(unix_path, &st) == -1) {
DEBUG(19,("cifspsx_qpathinfo: file %s errno=%d\n", unix_path, errno));
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
DEBUG(19,("cifspsx_qpathinfo: file %s, stat done\n", unix_path));
return cifspsx_map_fileinfo(ntvfs, req, info, &st, unix_path);
@ -320,7 +320,7 @@ static NTSTATUS cifspsx_qfileinfo(struct ntvfs_module_context *ntvfs,
}
if (fstat(f->fd, &st) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return cifspsx_map_fileinfo(ntvfs, req,info, &st, f->name);
@ -389,13 +389,13 @@ static NTSTATUS cifspsx_open(struct ntvfs_module_context *ntvfs,
case NTCREATEX_DISP_CREATE:
if (mkdir(unix_path, 0755) == -1) {
DEBUG(9,("cifspsx_open: mkdir %s errno=%d\n", unix_path, errno));
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
break;
case NTCREATEX_DISP_OPEN_IF:
if (mkdir(unix_path, 0755) == -1 && errno != EEXIST) {
DEBUG(9,("cifspsx_open: mkdir %s errno=%d\n", unix_path, errno));
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
break;
}
@ -404,13 +404,13 @@ static NTSTATUS cifspsx_open(struct ntvfs_module_context *ntvfs,
do_open:
fd = open(unix_path, flags, 0644);
if (fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (fstat(fd, &st) == -1) {
DEBUG(9,("cifspsx_open: fstat errno=%d\n", errno));
close(fd);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
status = ntvfs_handle_new(ntvfs, req, &handle);
@ -459,7 +459,7 @@ static NTSTATUS cifspsx_mkdir(struct ntvfs_module_context *ntvfs,
unix_path = cifspsx_unix_path(ntvfs, req, md->mkdir.in.path);
if (mkdir(unix_path, 0777) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -478,7 +478,7 @@ static NTSTATUS cifspsx_rmdir(struct ntvfs_module_context *ntvfs,
unix_path = cifspsx_unix_path(ntvfs, req, rd->in.path);
if (rmdir(unix_path) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -502,7 +502,7 @@ static NTSTATUS cifspsx_rename(struct ntvfs_module_context *ntvfs,
unix_path2 = cifspsx_unix_path(ntvfs, req, ren->rename.in.pattern2);
if (rename(unix_path1, unix_path2) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -541,7 +541,7 @@ static NTSTATUS cifspsx_read(struct ntvfs_module_context *ntvfs,
rd->readx.in.maxcnt,
rd->readx.in.offset);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
rd->readx.out.nread = ret;
@ -577,7 +577,7 @@ static NTSTATUS cifspsx_write(struct ntvfs_module_context *ntvfs,
wr->writex.in.count,
wr->writex.in.offset);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
wr->writex.out.nwritten = ret;
@ -648,7 +648,7 @@ static NTSTATUS cifspsx_close(struct ntvfs_module_context *ntvfs,
}
if (close(f->fd) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
DLIST_REMOVE(p->open_files, f);
@ -738,7 +738,7 @@ static NTSTATUS cifspsx_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
if (ftruncate(f->fd,
info->end_of_file_info.in.size) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
break;
case RAW_SFILEINFO_SETATTRE:
@ -784,7 +784,7 @@ static NTSTATUS cifspsx_fsinfo(struct ntvfs_module_context *ntvfs,
if (sys_fsusage(p->connectpath,
&fs->generic.out.blocks_free,
&fs->generic.out.blocks_total) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
fs->generic.out.block_size = 512;
@ -824,7 +824,7 @@ static NTSTATUS cifspsx_fsattr(struct ntvfs_module_context *ntvfs,
}
if (stat(p->connectpath, &st) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
unix_to_nt_time(&fs->generic.out.create_time, st.st_ctime);

View File

@ -353,7 +353,7 @@ static void ipc_open_done(struct tevent_req *subreq)
&p->allocation_size);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@ -602,7 +602,7 @@ static void ipc_read_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@ -687,7 +687,7 @@ static void ipc_write_done(struct tevent_req *subreq)
ret = tstream_writev_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@ -1009,7 +1009,7 @@ static void ipc_trans_writev_done(struct tevent_req *subreq)
status = NT_STATUS_PIPE_DISCONNECTED;
goto reply;
} else if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@ -1045,7 +1045,7 @@ static void ipc_trans_readv_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@ -1215,7 +1215,7 @@ static void ipc_ioctl_writev_done(struct tevent_req *subreq)
ret = tstream_writev_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@ -1251,7 +1251,7 @@ static void ipc_ioctl_readv_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}

View File

@ -40,7 +40,7 @@ bool pvfs_has_wildcard(const char *str)
NTSTATUS pvfs_map_errno(struct pvfs_state *pvfs, int unix_errno)
{
NTSTATUS status;
status = map_nt_error_from_unix(unix_errno);
status = map_nt_error_from_unix_common(unix_errno);
DEBUG(10,(__location__ " mapped unix errno %d -> %s\n", unix_errno, nt_errstr(status)));
return status;
}

View File

@ -147,7 +147,7 @@ static NTSTATUS svfs_unlink(struct ntvfs_module_context *ntvfs,
/* ignoring wildcards ... */
if (unlink(unix_path) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -176,7 +176,7 @@ static NTSTATUS svfs_chkpath(struct ntvfs_module_context *ntvfs,
unix_path = svfs_unix_path(ntvfs, req, cp->chkpath.in.path);
if (stat(unix_path, &st) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (!S_ISDIR(st.st_mode)) {
@ -291,7 +291,7 @@ static NTSTATUS svfs_qpathinfo(struct ntvfs_module_context *ntvfs,
DEBUG(19,("svfs_qpathinfo: file %s\n", unix_path));
if (stat(unix_path, &st) == -1) {
DEBUG(19,("svfs_qpathinfo: file %s errno=%d\n", unix_path, errno));
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
DEBUG(19,("svfs_qpathinfo: file %s, stat done\n", unix_path));
return svfs_map_fileinfo(ntvfs, req, info, &st, unix_path);
@ -317,7 +317,7 @@ static NTSTATUS svfs_qfileinfo(struct ntvfs_module_context *ntvfs,
}
if (fstat(f->fd, &st) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return svfs_map_fileinfo(ntvfs, req,info, &st, f->name);
@ -386,13 +386,13 @@ static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
case NTCREATEX_DISP_CREATE:
if (mkdir(unix_path, 0755) == -1) {
DEBUG(9,("svfs_open: mkdir %s errno=%d\n", unix_path, errno));
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
break;
case NTCREATEX_DISP_OPEN_IF:
if (mkdir(unix_path, 0755) == -1 && errno != EEXIST) {
DEBUG(9,("svfs_open: mkdir %s errno=%d\n", unix_path, errno));
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
break;
}
@ -401,13 +401,13 @@ static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
do_open:
fd = open(unix_path, flags, 0644);
if (fd == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
if (fstat(fd, &st) == -1) {
DEBUG(9,("svfs_open: fstat errno=%d\n", errno));
close(fd);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
status = ntvfs_handle_new(ntvfs, req, &handle);
@ -456,7 +456,7 @@ static NTSTATUS svfs_mkdir(struct ntvfs_module_context *ntvfs,
unix_path = svfs_unix_path(ntvfs, req, md->mkdir.in.path);
if (mkdir(unix_path, 0777) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -475,7 +475,7 @@ static NTSTATUS svfs_rmdir(struct ntvfs_module_context *ntvfs,
unix_path = svfs_unix_path(ntvfs, req, rd->in.path);
if (rmdir(unix_path) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -499,7 +499,7 @@ static NTSTATUS svfs_rename(struct ntvfs_module_context *ntvfs,
unix_path2 = svfs_unix_path(ntvfs, req, ren->rename.in.pattern2);
if (rename(unix_path1, unix_path2) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@ -538,7 +538,7 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
rd->readx.in.maxcnt,
rd->readx.in.offset);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
rd->readx.out.nread = ret;
@ -574,7 +574,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
wr->writex.in.count,
wr->writex.in.offset);
if (ret == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
wr->writex.out.nwritten = ret;
@ -645,7 +645,7 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
}
if (close(f->fd) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
DLIST_REMOVE(p->open_files, f);
@ -735,7 +735,7 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
if (ftruncate(f->fd,
info->end_of_file_info.in.size) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
break;
case RAW_SFILEINFO_SETATTRE:
@ -781,7 +781,7 @@ static NTSTATUS svfs_fsinfo(struct ntvfs_module_context *ntvfs,
if (sys_fsusage(p->connectpath,
&fs->generic.out.blocks_free,
&fs->generic.out.blocks_total) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
fs->generic.out.block_size = 512;
@ -821,7 +821,7 @@ static NTSTATUS svfs_fsattr(struct ntvfs_module_context *ntvfs,
}
if (stat(p->connectpath, &st) == -1) {
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
unix_to_nt_time(&fs->generic.out.create_time, st.st_ctime);

View File

@ -258,7 +258,7 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx)
if (in->fd == -1) {
DEBUG(0,("Failed to init inotify - %s\n", strerror(errno)));
talloc_free(in);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
in->ctx = ctx;
in->watches = NULL;
@ -274,7 +274,7 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx)
}
DEBUG(0,("Failed to tevent_add_fd() - %s\n", strerror(errno)));
talloc_free(in);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
tevent_fd_set_auto_close(fde);
@ -373,7 +373,7 @@ static NTSTATUS inotify_watch(struct sys_notify_context *ctx,
wd = inotify_add_watch(in->fd, e->path, mask);
if (wd == -1) {
e->filter = filter;
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
w = talloc(in, struct inotify_watch_context);

View File

@ -131,13 +131,13 @@ static NTSTATUS linux_lease_setup(struct sys_lease_context *ctx,
ret = fcntl(*fd, F_SETSIG, LINUX_LEASE_RT_SIGNAL);
if (ret == -1) {
talloc_free(p);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
ret = fcntl(*fd, F_SETLEASE, F_WRLCK);
if (ret == -1) {
talloc_free(p);
return map_nt_error_from_unix(errno);
return map_nt_error_from_unix_common(errno);
}
DLIST_ADD(leases, p);

View File

@ -1353,7 +1353,7 @@ static void dcesrv_sock_reply_done(struct tevent_req *subreq)
ret = tstream_writev_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
status = map_nt_error_from_unix(sys_errno);
status = map_nt_error_from_unix_common(sys_errno);
dcesrv_terminate_connection(substate->dce_conn, nt_errstr(status));
return;
}
@ -1436,7 +1436,7 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn)
socket_get_fd(srv_conn->socket),
&dcesrv_conn->stream);
if (ret == -1) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0, ("dcesrv_sock_accept: "
"failed to setup tstream: %s\n",
nt_errstr(status)));

View File

@ -201,7 +201,7 @@ NTSTATUS tstream_setup_named_pipe(TALLOC_CTX *mem_ctx,
}
if (!directory_create_or_exist(lpcfg_ncalrpc_dir(lp_ctx), geteuid(), 0755)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0,(__location__ ": Failed to create ncalrpc pipe directory '%s' - %s\n",
lpcfg_ncalrpc_dir(lp_ctx), nt_errstr(status)));
goto fail;
@ -213,7 +213,7 @@ NTSTATUS tstream_setup_named_pipe(TALLOC_CTX *mem_ctx,
}
if (!directory_create_or_exist(dirname, geteuid(), 0700)) {
status = map_nt_error_from_unix(errno);
status = map_nt_error_from_unix_common(errno);
DEBUG(0,(__location__ ": Failed to create stream pipe directory '%s' - %s\n",
dirname, nt_errstr(status)));
goto fail;