Add in the dirfsp parameter. Fix all callers.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
filesystem sd.
*******************************************************************/
-NTSTATUS get_nt_acl_common(
- NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx,
+NTSTATUS get_nt_acl_common_at(
+ NTSTATUS (*get_acl_blob_at_fn)(TALLOC_CTX *ctx,
vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
DATA_BLOB *pblob),
vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname_in,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
DBG_DEBUG("name=%s\n", smb_fname_in->base_name);
- status = get_acl_blob_fn(mem_ctx, handle, smb_fname_in, &blob);
+ status = get_acl_blob_at_fn(mem_ctx,
+ handle,
+ dirfsp,
+ smb_fname_in,
+ &blob);
if (NT_STATUS_IS_OK(status)) {
status = validate_nt_acl_blob(mem_ctx,
handle,
int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode);
-NTSTATUS get_nt_acl_common(
- NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx,
+NTSTATUS get_nt_acl_common_at(
+ NTSTATUS (*get_acl_blob_at_fn)(TALLOC_CTX *ctx,
vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
DATA_BLOB *pblob),
vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname_in,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
Pull a security descriptor into a DATA_BLOB from a tdb store.
*******************************************************************/
-static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
+static NTSTATUS get_acl_blob_at(TALLOC_CTX *ctx,
vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
DATA_BLOB *pblob)
{
struct security_descriptor **ppdesc)
{
NTSTATUS status;
- status = get_nt_acl_common(get_acl_blob, handle, smb_fname,
- security_info, mem_ctx, ppdesc);
+ status = get_nt_acl_common_at(get_acl_blob_at,
+ handle,
+ handle->conn->cwd_fsp,
+ smb_fname,
+ security_info,
+ mem_ctx,
+ ppdesc);
return status;
}
return map_nt_error_from_unix(errno);
}
-static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
+static NTSTATUS get_acl_blob_at(TALLOC_CTX *ctx,
vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
DATA_BLOB *pblob)
{
struct security_descriptor **ppdesc)
{
NTSTATUS status;
- status = get_nt_acl_common(get_acl_blob, handle, smb_fname,
- security_info, mem_ctx, ppdesc);
+ status = get_nt_acl_common_at(get_acl_blob_at,
+ handle,
+ handle->conn->cwd_fsp,
+ smb_fname,
+ security_info,
+ mem_ctx,
+ ppdesc);
return status;
}