diff options
author | Jeremy Allison <jra@samba.org> | 2001-06-18 17:52:58 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-06-18 17:52:58 +0000 |
commit | 0417200fa9af35167de3e4d6df7c3071f07b15a9 (patch) | |
tree | ac55cab17b324eb6947e4774e9910125b13629b5 /source3 | |
parent | e324e21457b232acb13a06fa5a4b8f363b3dec7c (diff) | |
download | samba-0417200fa9af35167de3e4d6df7c3071f07b15a9.tar.gz samba-0417200fa9af35167de3e4d6df7c3071f07b15a9.tar.bz2 samba-0417200fa9af35167de3e4d6df7c3071f07b15a9.zip |
Added "Jim McDonough" <jmcd@us.ibm.com> patches for directory support
for Win9x.
Jeremy.
(This used to be commit 70194b194e0ca4b0f4f9c1eece9176415f9bb928)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 7ae95a5eac..b28a0c9683 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -1611,9 +1611,14 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &action); if (!fsp) { - DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename)); - r_u->status = ERROR_ACCESS_DENIED; - goto error_exit; + /* Perhaps it is a directory */ + fsp = open_directory(conn, filename, &st, + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action); + if (!fsp) { + DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename)); + r_u->status = ERROR_ACCESS_DENIED; + goto error_exit; + } } sd_size = conn->vfs_ops.get_nt_acl(fsp, fsp->fsp_name, &psd); @@ -1699,9 +1704,14 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_ (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &action); if (!fsp) { - DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file %s\n", filename)); - r_u->status = ERROR_ACCESS_DENIED; - goto error_exit; + /* Perhaps it is a directory */ + fsp = open_directory(conn, filename, &st, + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action); + if (!fsp) { + DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file %s\n", filename)); + r_u->status = ERROR_ACCESS_DENIED; + goto error_exit; + } } ret = conn->vfs_ops.set_nt_acl(fsp, fsp->fsp_name, q_u->sec_info, q_u->sec_desc); |