summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-09-15 12:55:59 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-09-15 12:55:59 +0000
commit7892c494e7321c64b20bf7e1d794a6b6508fe84a (patch)
treeabde252c0198e7fd43f6da119230208263f82c1c /source3/rpc_server
parentcde3f0fae15c977b8af28e3e2b327f4576c14e69 (diff)
downloadsamba-7892c494e7321c64b20bf7e1d794a6b6508fe84a.tar.gz
samba-7892c494e7321c64b20bf7e1d794a6b6508fe84a.tar.bz2
samba-7892c494e7321c64b20bf7e1d794a6b6508fe84a.zip
Kill off the //server/share%user hack in share level security.
This should help make much of this code simpiler. Andrew Bartlett (This used to be commit fb0c3629c360fd0c57129500474960e6da6f9ef0)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 0db06754f4..9f156a3d95 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1598,7 +1598,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
BOOL bad_path;
int access_mode;
int action;
- NTSTATUS ecode;
+ NTSTATUS nt_status;
struct current_user user;
fstring user_name;
connection_struct *conn = NULL;
@@ -1612,14 +1612,11 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
/* Null password is ok - we are already an authenticated user... */
*null_pw = '\0';
- get_current_user(&user, p);
- fstrcpy(user_name, uidtoname(user.uid));
-
- conn = make_connection(qualname, user_name, null_pw, 0, "A:", user.vuid, &ecode);
+ conn = make_connection(qualname, null_pw, 0, "A:", user.vuid, &nt_status);
if (conn == NULL) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to connect to %s\n", qualname));
- r_u->status = ecode;
+ r_u->status = nt_status;
goto error_exit;
}
@@ -1690,7 +1687,7 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *
BOOL bad_path;
int access_mode;
int action;
- NTSTATUS ecode;
+ NTSTATUS nt_status;
struct current_user user;
fstring user_name;
connection_struct *conn = NULL;
@@ -1705,14 +1702,11 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *
/* Null password is ok - we are already an authenticated user... */
*null_pw = '\0';
- get_current_user(&user, p);
- fstrcpy(user_name, uidtoname(user.uid));
-
- conn = make_connection(qualname, user_name, null_pw, 0, "A:", user.vuid, &ecode);
+ conn = make_connection(qualname, null_pw, 0, "A:", user.vuid, &nt_status);
if (conn == NULL) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to connect to %s\n", qualname));
- r_u->status = ecode;
+ r_u->status = nt_status;
goto error_exit;
}