enum smbacl4_mode_enum {e_simple=0, e_special=1};
enum smbacl4_acedup_enum {e_dontcare=0, e_reject=1, e_ignore=2, e_merge=3};
-typedef struct _smbacl4_vfs_params {
+struct smbacl4_vfs_params {
enum smbacl4_mode_enum mode;
bool do_chown;
enum smbacl4_acedup_enum acedup;
bool map_full_control;
-} smbacl4_vfs_params;
+};
/*
* Gather special parameters for NFS4 ACL handling
*/
static int smbacl4_get_vfs_params(
struct connection_struct *conn,
- smbacl4_vfs_params *params
+ struct smbacl4_vfs_params *params
)
{
static const struct enum_list enum_smbacl4_modes[] = {
}
static int smbacl4_GetFileOwner(struct connection_struct *conn,
- const char *filename,
+ const struct smb_filename *smb_fname,
SMB_STRUCT_STAT *psbuf)
{
ZERO_STRUCTP(psbuf);
/* Get the stat struct for the owner info. */
- if (vfs_stat_smb_basename(conn, filename, psbuf) != 0)
+ if (vfs_stat_smb_basename(conn, smb_fname, psbuf) != 0)
{
DEBUG(8, ("vfs_stat_smb_basename failed with error %s\n",
strerror(errno)));
if (fsp->fh->fd == -1) {
return smbacl4_GetFileOwner(fsp->conn,
- fsp->fsp_name->base_name, psbuf);
+ fsp->fsp_name, psbuf);
}
if (SMB_VFS_FSTAT(fsp, psbuf) != 0)
{
}
static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx,
- smbacl4_vfs_params *params,
+ const struct smbacl4_vfs_params *params,
struct SMB4ACL_T *acl, /* in */
struct dom_sid *psid_owner, /* in */
struct dom_sid *psid_group, /* in */
}
static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
- smbacl4_vfs_params *params,
+ const struct smbacl4_vfs_params *params,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc,
struct SMB4ACL_T *theacl)
{
SMB_STRUCT_STAT sbuf;
- smbacl4_vfs_params params;
+ struct smbacl4_vfs_params params;
DEBUG(10, ("smb_fget_nt_acl_nfs4 invoked for %s\n", fsp_str_dbg(fsp)));
}
NTSTATUS smb_get_nt_acl_nfs4(struct connection_struct *conn,
- const char *name,
+ const struct smb_filename *smb_fname,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc,
struct SMB4ACL_T *theacl)
{
SMB_STRUCT_STAT sbuf;
- smbacl4_vfs_params params;
+ struct smbacl4_vfs_params params;
- DEBUG(10, ("smb_get_nt_acl_nfs4 invoked for %s\n", name));
+ DEBUG(10, ("smb_get_nt_acl_nfs4 invoked for %s\n",
+ smb_fname->base_name));
- if (smbacl4_GetFileOwner(conn, name, &sbuf)) {
+ if (smbacl4_GetFileOwner(conn, smb_fname, &sbuf)) {
return map_nt_error_from_unix(errno);
}
static bool smbacl4_fill_ace4(
const struct smb_filename *filename,
- smbacl4_vfs_params *params,
+ const struct smbacl4_vfs_params *params,
uid_t ownerUID,
gid_t ownerGID,
const struct security_ace *ace_nt, /* input */
TALLOC_CTX *mem_ctx,
const files_struct *fsp,
const struct security_acl *dacl,
- smbacl4_vfs_params *pparams,
+ const struct smbacl4_vfs_params *pparams,
uid_t ownerUID,
gid_t ownerGID
)
const struct security_descriptor *psd,
set_nfs4acl_native_fn_t set_nfs4_native)
{
- smbacl4_vfs_params params;
+ struct smbacl4_vfs_params params;
struct SMB4ACL_T *theacl = NULL;
bool result;
fsp_str_dbg(fsp), (unsigned int)newUID,
(unsigned int)newGID));
if (smbacl4_GetFileOwner(fsp->conn,
- fsp->fsp_name->base_name,
+ fsp->fsp_name,
&sbuf)){
TALLOC_FREE(frame);
return map_nt_error_from_unix(errno);