static size_t afs_fto_nt_acl(struct afs_acl *afs_acl, struct files_struct *fsp, uint32 security_info, struct security_descriptor **ppdesc) { SMB_STRUCT_STAT sbuf; if (fsp->is_directory || fsp->fh->fd == -1) { /* Get the stat struct for the owner info. */ return afs_to_nt_acl(afs_acl, fsp->conn, fsp->fsp_name, security_info, ppdesc); } if(SMB_VFS_FSTAT(fsp, &sbuf) != 0) { return 0; } return afs_to_nt_acl_common(afs_acl, &sbuf, security_info, ppdesc); }
static size_t afs_get_nt_acl(struct files_struct *fsp, uint32 security_info, struct security_descriptor **ppdesc) { struct afs_acl acl; size_t sd_size; DEBUG(5, ("afs_get_nt_acl: %s\n", fsp->fsp_name)); sidpts = lp_parm_bool(SNUM(fsp->conn), "afsacl", "sidpts", False); if (!afs_get_afs_acl(fsp->fsp_name, &acl)) { return 0; } sd_size = afs_to_nt_acl(&acl, fsp, security_info, ppdesc); free_afs_acl(&acl); return sd_size; }
static NTSTATUS afsacl_get_nt_acl(struct vfs_handle_struct *handle, const char *name, uint32 security_info, struct security_descriptor **ppdesc) { struct afs_acl acl; size_t sd_size; DEBUG(5, ("afsacl_get_nt_acl: %s\n", name)); sidpts = lp_parm_bool(SNUM(handle->conn), "afsacl", "sidpts", False); if (!afs_get_afs_acl(name, &acl)) { return NT_STATUS_ACCESS_DENIED; } sd_size = afs_to_nt_acl(&acl, handle->conn, name, security_info, ppdesc); free_afs_acl(&acl); return (sd_size != 0) ? NT_STATUS_OK : NT_STATUS_ACCESS_DENIED; }