From cdd802af8319e0b0744d8e727cef75526269ece2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 3 May 2011 10:40:33 +1000 Subject: s4-messaging Rename messaging -> imessaging This avoid symbol and structure conflicts between Samba3 and Samba4, and chooses a less generic name. Andrew Bartlett --- source4/smbd/server.c | 6 +++--- source4/smbd/service_stream.c | 8 ++++---- source4/smbd/service_stream.h | 2 +- source4/smbd/service_task.c | 6 +++--- source4/smbd/service_task.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 0f2f1bb1bb..81dd78701e 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -221,11 +221,11 @@ static NTSTATUS samba_terminate(struct irpc_message *msg, static NTSTATUS setup_parent_messaging(struct tevent_context *event_ctx, struct loadparm_context *lp_ctx) { - struct messaging_context *msg; + struct imessaging_context *msg; NTSTATUS status; - msg = messaging_init(talloc_autofree_context(), - lpcfg_messaging_path(event_ctx, lp_ctx), + msg = imessaging_init(talloc_autofree_context(), + lpcfg_imessaging_path(event_ctx, lp_ctx), cluster_id(0, SAMBA_PARENT_TASKID), event_ctx); NT_STATUS_HAVE_NO_MEMORY(msg); diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index 916393253b..a0e440f63c 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -122,7 +122,7 @@ NTSTATUS stream_new_connection_merge(struct tevent_context *ev, struct loadparm_context *lp_ctx, const struct model_ops *model_ops, const struct stream_server_ops *stream_ops, - struct messaging_context *msg_ctx, + struct imessaging_context *msg_ctx, void *private_data, struct stream_connection **_srv_conn) { @@ -186,11 +186,11 @@ static void stream_new_connection(struct tevent_context *ev, } /* setup to receive internal messages on this connection */ - srv_conn->msg_ctx = messaging_init(srv_conn, - lpcfg_messaging_path(srv_conn, lp_ctx), + srv_conn->msg_ctx = imessaging_init(srv_conn, + lpcfg_imessaging_path(srv_conn, lp_ctx), srv_conn->server_id, ev); if (!srv_conn->msg_ctx) { - stream_terminate_connection(srv_conn, "messaging_init() failed"); + stream_terminate_connection(srv_conn, "imessaging_init() failed"); return; } diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h index 02ade716d2..6590bc0ea0 100644 --- a/source4/smbd/service_stream.h +++ b/source4/smbd/service_stream.h @@ -47,7 +47,7 @@ struct stream_connection { } event; struct socket_context *socket; - struct messaging_context *msg_ctx; + struct imessaging_context *msg_ctx; struct loadparm_context *lp_ctx; struct tstream_context *tstream; diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c index 1eb8403e3b..32c44cf660 100644 --- a/source4/smbd/service_task.c +++ b/source4/smbd/service_task.c @@ -78,12 +78,12 @@ static void task_server_callback(struct tevent_context *event_ctx, task->server_id = server_id; task->lp_ctx = lp_ctx; - task->msg_ctx = messaging_init(task, - lpcfg_messaging_path(task, task->lp_ctx), + task->msg_ctx = imessaging_init(task, + lpcfg_imessaging_path(task, task->lp_ctx), task->server_id, task->event_ctx); if (!task->msg_ctx) { - task_server_terminate(task, "messaging_init() failed", true); + task_server_terminate(task, "imessaging_init() failed", true); return; } diff --git a/source4/smbd/service_task.h b/source4/smbd/service_task.h index b8954073e5..34b41d9f04 100644 --- a/source4/smbd/service_task.h +++ b/source4/smbd/service_task.h @@ -27,7 +27,7 @@ struct task_server { struct tevent_context *event_ctx; const struct model_ops *model_ops; - struct messaging_context *msg_ctx; + struct imessaging_context *msg_ctx; struct loadparm_context *lp_ctx; struct server_id server_id; void *private_data; -- cgit From 56a5b7d09e0eed66690d87241ee71bca5048e2f8 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 3 May 2011 13:24:10 +1000 Subject: s4-param Rename secrets_init() -> randseed_init() This only sets up the random number generator callback these days, so use a different database for that. (All secrets data in Samba4 is in secrets.ldb) Andrew Bartlett --- source4/smbd/server.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 81dd78701e..4cd0263137 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -388,10 +388,9 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ pidfile_create(lpcfg_piddir(cmdline_lp_ctx), binary_name); - /* Do *not* remove this, until you have removed - * passdb/secrets.c, and proved that Samba still builds... */ - /* Setup the SECRETS subsystem */ - if (secrets_init(talloc_autofree_context(), cmdline_lp_ctx) == NULL) { + /* Set up a database to hold a random seed, in case we don't + * have /dev/urandom */ + if (randseed_init(talloc_autofree_context(), cmdline_lp_ctx) == NULL) { return 1; } -- cgit From fa8490aa4cdf8c1836919ca412de1488840094f5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 6 May 2011 16:22:41 +0200 Subject: s4-smbd: fix randseed_init() usage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Fri May 6 17:37:11 CEST 2011 on sn-devel-104 --- source4/smbd/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/smbd') diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 4cd0263137..8daf5d4c11 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -390,7 +390,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ /* Set up a database to hold a random seed, in case we don't * have /dev/urandom */ - if (randseed_init(talloc_autofree_context(), cmdline_lp_ctx) == NULL) { + if (!randseed_init(talloc_autofree_context(), cmdline_lp_ctx)) { return 1; } -- cgit From f946668b7ad1ecc1990fa8ee0499c63c4aac6ea6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 8 May 2011 10:28:03 +0200 Subject: Improve debug messages when creating socket directories This makes clear what the permissions error and directory name actually is Andrew Bartlett --- source4/smbd/service_named_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c index 086a037b69..fc221c1c7e 100644 --- a/source4/smbd/service_named_pipe.c +++ b/source4/smbd/service_named_pipe.c @@ -207,7 +207,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); - DEBUG(0,(__location__ ": Failed to create stream pipe directory %s - %s\n", + DEBUG(0,(__location__ ": Failed to create stream pipe directory '%s' - %s\n", dirname, nt_errstr(status))); goto fail; } -- cgit From aae9353ecf56323b63da66aa84d8a0a4f219d94d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 8 May 2011 10:29:27 +0200 Subject: ncalrpc: Force ncalrpc dir to be mode 755 in all users This allows this directory to be shared between Samba3 and Samba4 in a Franky-style setup easily. Andrew Bartlett --- source4/smbd/service_named_pipe.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/smbd') diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c index fc221c1c7e..bcfd5effe4 100644 --- a/source4/smbd/service_named_pipe.c +++ b/source4/smbd/service_named_pipe.c @@ -200,6 +200,13 @@ NTSTATUS tstream_setup_named_pipe(TALLOC_CTX *mem_ctx, goto fail; } + if (!directory_create_or_exist(lpcfg_ncalrpc_dir(lp_ctx), geteuid(), 0755)) { + status = map_nt_error_from_unix(errno); + DEBUG(0,(__location__ ": Failed to create ncalrpc pipe directory '%s' - %s\n", + lpcfg_ncalrpc_dir(lp_ctx), nt_errstr(status))); + goto fail; + } + dirname = talloc_asprintf(pipe_sock, "%s/np", lpcfg_ncalrpc_dir(lp_ctx)); if (dirname == NULL) { goto fail; -- cgit From d510687408c03291df767e0ccacebcd4a360646c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 May 2011 12:33:01 +0200 Subject: s4-ipv6: fixed stream_setup_socket() to handle IPv6 for IP we now detect the address family from the address, rather than requiring the caller to specify it. --- source4/smbd/service_stream.c | 45 ++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index a0e440f63c..cb084a0039 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -27,6 +27,7 @@ #include "cluster/cluster.h" #include "param/param.h" #include "../lib/tsocket/tsocket.h" +#include "lib/util/util_net.h" /* the range of ports to try for dcerpc over tcp endpoints */ #define SERVER_TCP_LOW_PORT 1024 @@ -271,12 +272,34 @@ NTSTATUS stream_setup_socket(TALLOC_CTX *mem_ctx, struct socket_address *socket_address; struct tevent_fd *fde; int i; + struct sockaddr_storage ss; stream_socket = talloc_zero(mem_ctx, struct stream_socket); NT_STATUS_HAVE_NO_MEMORY(stream_socket); - status = socket_create(family, SOCKET_TYPE_STREAM, &stream_socket->sock, 0); - NT_STATUS_NOT_OK_RETURN(status); + if (strcmp(family, "ip") == 0) { + /* we will get the real family from the address itself */ + if (!interpret_string_addr(&ss, sock_addr, 0)) { + talloc_free(stream_socket); + return NT_STATUS_INVALID_ADDRESS; + } + + socket_address = socket_address_from_sockaddr_storage(stream_socket, &ss, port?*port:0); + NT_STATUS_HAVE_NO_MEMORY_AND_FREE(socket_address, stream_socket); + + status = socket_create(socket_address->family, SOCKET_TYPE_STREAM, &stream_socket->sock, 0); + NT_STATUS_NOT_OK_RETURN(status); + } else { + status = socket_create(family, SOCKET_TYPE_STREAM, &stream_socket->sock, 0); + NT_STATUS_NOT_OK_RETURN(status); + + /* this is for non-IP sockets, eg. unix domain sockets */ + socket_address = socket_address_from_strings(stream_socket, + stream_socket->sock->backend_name, + sock_addr, 0); + NT_STATUS_HAVE_NO_MEMORY(socket_address); + } + talloc_steal(stream_socket, stream_socket->sock); @@ -297,34 +320,19 @@ NTSTATUS stream_setup_socket(TALLOC_CTX *mem_ctx, /* Some sockets don't have a port, or are just described from * the string. We are indicating this by having port == NULL */ if (!port) { - socket_address = socket_address_from_strings(stream_socket, - stream_socket->sock->backend_name, - sock_addr, 0); - NT_STATUS_HAVE_NO_MEMORY(socket_address); status = socket_listen(stream_socket->sock, socket_address, SERVER_LISTEN_BACKLOG, 0); - talloc_free(socket_address); - } else if (*port == 0) { for (i=SERVER_TCP_LOW_PORT;i<= SERVER_TCP_HIGH_PORT;i++) { - socket_address = socket_address_from_strings(stream_socket, - stream_socket->sock->backend_name, - sock_addr, i); - NT_STATUS_HAVE_NO_MEMORY(socket_address); + socket_address->port = i; status = socket_listen(stream_socket->sock, socket_address, SERVER_LISTEN_BACKLOG, 0); - talloc_free(socket_address); if (NT_STATUS_IS_OK(status)) { *port = i; break; } } } else { - socket_address = socket_address_from_strings(stream_socket, - stream_socket->sock->backend_name, - sock_addr, *port); - NT_STATUS_HAVE_NO_MEMORY(socket_address); status = socket_listen(stream_socket->sock, socket_address, SERVER_LISTEN_BACKLOG, 0); - talloc_free(socket_address); } if (!NT_STATUS_IS_OK(status)) { @@ -362,6 +370,7 @@ NTSTATUS stream_setup_socket(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } + /* setup a connection title */ -- cgit From 0b11061b05cf6fdda8bf8a9be1a8da5b0cac1707 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 3 Jun 2011 17:57:57 +1000 Subject: s4-ipv6: fixed binding to ipv4 addresses --- source4/smbd/service_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index cb084a0039..efbcfb490a 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -296,7 +296,7 @@ NTSTATUS stream_setup_socket(TALLOC_CTX *mem_ctx, /* this is for non-IP sockets, eg. unix domain sockets */ socket_address = socket_address_from_strings(stream_socket, stream_socket->sock->backend_name, - sock_addr, 0); + sock_addr, port?*port:0); NT_STATUS_HAVE_NO_MEMORY(socket_address); } -- cgit From 907cdb5de7f16a2540299aeba211bf2a5ae6fafe Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 6 Jun 2011 14:58:28 +1000 Subject: s4-modules Remove lp_ctx from init functions that no longer need it Now that we don't allow the smb.conf to change the modules dir, many functions that simply load modules or initialise a subsytem that may load modules no longer need an lp_ctx. Andrew Bartlett --- source4/smbd/process_model.c | 2 +- source4/smbd/server.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c index af12a7b8cb..3c4c03ebf2 100644 --- a/source4/smbd/process_model.c +++ b/source4/smbd/process_model.c @@ -111,7 +111,7 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx) } initialised = true; - shared_init = load_samba_modules(NULL, lp_ctx, "process_model"); + shared_init = load_samba_modules(NULL, "process_model"); run_init_functions(static_init); run_init_functions(shared_init); diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 8daf5d4c11..53dc20d636 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -401,9 +401,9 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ } } - gensec_init(cmdline_lp_ctx); /* FIXME: */ + gensec_init(); /* FIXME: */ - ntptr_init(cmdline_lp_ctx); /* FIXME: maybe run this in the initialization function + ntptr_init(); /* FIXME: maybe run this in the initialization function of the spoolss RPC server instead? */ ntvfs_init(cmdline_lp_ctx); /* FIXME: maybe run this in the initialization functions @@ -411,7 +411,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ process_model_init(cmdline_lp_ctx); - shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "service"); + shared_init = load_samba_modules(NULL, "service"); run_init_functions(static_init); run_init_functions(shared_init); -- cgit From 81e48dfa35e1b4df6cf46df74572a2ace81c1b84 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Sun, 5 Jun 2011 21:32:11 +0200 Subject: s4/server: simplify and replace bad portable gettimeofday by time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Metzmacher Autobuild-User: Björn Jacke Autobuild-Date: Mon Jun 6 12:58:26 CEST 2011 on sn-devel-104 --- source4/smbd/server.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 53dc20d636..6acccd14ae 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -178,13 +178,7 @@ _NORETURN_ static void max_runtime_handler(struct tevent_context *ev, struct timeval t, void *private_data) { const char *binary_name = (const char *)private_data; - struct timeval tv; - struct timezone tz; - if (gettimeofday(&tv, &tz) == 0) { - DEBUG(0,("%s: maximum runtime exceeded - terminating, current ts: %d\n", binary_name, (int)tv.tv_sec)); - } else { - DEBUG(0,("%s: maximum runtime exceeded - terminating\n", binary_name)); - } + DEBUG(0,("%s: maximum runtime exceeded - terminating, current ts: %d\n", binary_name, time(NULL))); exit(0); } @@ -444,14 +438,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ discard_const(binary_name)); if (max_runtime) { - struct timeval tv; - struct timezone tz; - - if (gettimeofday(&tv, &tz) == 0) { - DEBUG(0,("Called with maxruntime %d - current ts %d\n", max_runtime, (int)tv.tv_sec)); - } else { - DEBUG(0,("Called with maxruntime %d\n", max_runtime)); - } + DEBUG(0,("Called with maxruntime %d - current ts %d\n", max_runtime, time(NULL))); tevent_add_timer(event_ctx, event_ctx, timeval_current_ofs(max_runtime, 0), max_runtime_handler, -- cgit From d6fe38b99dde9abc91a3806ece93930e5530dda7 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 6 Jun 2011 22:40:20 +0200 Subject: s4:smbd/server.c - quiet "time_t" format string warnings by casts Reviewed-by: Tridge --- source4/smbd/server.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 6acccd14ae..1be3b2885f 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -178,7 +178,8 @@ _NORETURN_ static void max_runtime_handler(struct tevent_context *ev, struct timeval t, void *private_data) { const char *binary_name = (const char *)private_data; - DEBUG(0,("%s: maximum runtime exceeded - terminating, current ts: %d\n", binary_name, time(NULL))); + DEBUG(0,("%s: maximum runtime exceeded - terminating, current ts: %llu\n", + binary_name, (unsigned long long) time(NULL))); exit(0); } @@ -438,7 +439,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ discard_const(binary_name)); if (max_runtime) { - DEBUG(0,("Called with maxruntime %d - current ts %d\n", max_runtime, time(NULL))); + DEBUG(0,("Called with maxruntime %d - current ts %llu\n", + max_runtime, (unsigned long long) time(NULL))); tevent_add_timer(event_ctx, event_ctx, timeval_current_ofs(max_runtime, 0), max_runtime_handler, -- cgit From d057116cc2e454ba097d0dcb22e16108a05a4a1b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 2 May 2011 10:55:20 +1000 Subject: server_id.idl: Bring server_id.idl in common Andrew Bartlett Signed-off-by: Andrew Tridgell --- source4/smbd/service_stream.h | 2 +- source4/smbd/service_task.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h index 6590bc0ea0..e098a690f1 100644 --- a/source4/smbd/service_stream.h +++ b/source4/smbd/service_stream.h @@ -23,7 +23,7 @@ #ifndef __SERVICE_STREAM_H__ #define __SERVICE_STREAM_H__ -#include "librpc/gen_ndr/server_id4.h" +#include "librpc/gen_ndr/server_id.h" /* modules can use the following to determine if the interface has changed * please increment the version number after each interface change diff --git a/source4/smbd/service_task.h b/source4/smbd/service_task.h index 34b41d9f04..ded4590daf 100644 --- a/source4/smbd/service_task.h +++ b/source4/smbd/service_task.h @@ -22,7 +22,7 @@ #ifndef __SERVICE_TASK_H__ #define __SERVICE_TASK_H__ -#include "librpc/gen_ndr/server_id4.h" +#include "librpc/gen_ndr/server_id.h" struct task_server { struct tevent_context *event_ctx; -- cgit From 16b1c77644217796f70a3a0bf1d95c245f9ee2d9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 8 Jun 2011 14:05:55 +1000 Subject: lib/util Bring procid_str() into lib/util as server_id_string() This is needed for OpenChange, which prints Samba struct server_id values in debug messages. Andrew Bartlett --- source4/smbd/service_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index efbcfb490a..6e65122063 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -217,7 +217,7 @@ static void stream_new_connection(struct tevent_context *ev, stream_socket->ops->name, tsocket_address_string(srv_conn->remote_address, tmp_ctx), tsocket_address_string(srv_conn->local_address, tmp_ctx), - cluster_id_string(tmp_ctx, server_id)); + server_id_str(tmp_ctx, &server_id)); if (title) { stream_connection_set_title(srv_conn, title); } -- cgit From a1f04e8abc761ef1ba211420ff1dbda50fcf527d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 20 Jun 2011 14:55:32 +1000 Subject: 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 Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104 --- source4/smbd/service_named_pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c index bcfd5effe4..b000083eec 100644 --- a/source4/smbd/service_named_pipe.c +++ b/source4/smbd/service_named_pipe.c @@ -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; -- cgit