From 83eb0d1d6d90d182e8eee8496695113c89f8dba1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Jan 2007 02:09:37 +0000 Subject: r20844: Somewhat radical change - this may break the build (I will watch carefully - so I'm doing it in one transaction so I can roll back). Change check_name(), reduce_name() and dptr_create() to return NTSTATUS. This helps a lot in error path processing and especially in reduce_name() allows us to ditch the flaky and error-prone saving of errno and return errors directly. Jeremy. (This used to be commit 6133a694aa429d638320e39ffe1c49d172583ccf) --- source3/rpc_server/srv_srvsvc_nt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 646a414cda..a9adaf3200 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -2073,7 +2073,8 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p, const char *server_unc, const goto error_exit; } - if (!check_name(file,conn)) { + nt_status = check_name(conn, file); + if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(3,("_srv_net_file_query_secdesc: can't access %s\n", file)); status = WERR_ACCESS_DENIED; goto error_exit; @@ -2176,7 +2177,8 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p, const char *server_unc, const goto error_exit; } - if (!check_name(file,conn)) { + nt_status = check_name(conn, file); + if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(3,("_srv_net_file_set_secdesc: can't access %s\n", file)); status = WERR_ACCESS_DENIED; goto error_exit; -- cgit