summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-17 02:09:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:12 -0500
commit83eb0d1d6d90d182e8eee8496695113c89f8dba1 (patch)
treed2b02c7647d2755759e0453cb411101429da16b4 /source3/rpc_server
parent52a36db39fb96353702616dfac5004239c34cd2c (diff)
downloadsamba-83eb0d1d6d90d182e8eee8496695113c89f8dba1.tar.gz
samba-83eb0d1d6d90d182e8eee8496695113c89f8dba1.tar.bz2
samba-83eb0d1d6d90d182e8eee8496695113c89f8dba1.zip
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)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c6
1 files changed, 4 insertions, 2 deletions
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;