*len = size;
errno = 0;
- ret = smbd_gpfs_getacl((char *)fname, flags, aclbuf);
+ ret = smbd_gpfs_getacl(discard_const_p(char, fname), flags, aclbuf);
if ((ret != 0) && (errno == ENOSPC)) {
/*
* get the size needed to accommodate the complete buffer
return -1;
}
- result = smbd_gpfs_putacl((char *)name, GPFS_PUTACL_STRUCT | GPFS_ACL_SAMBA, gpfs_acl);
+ result = smbd_gpfs_putacl(discard_const_p(char, name),
+ GPFS_PUTACL_STRUCT|GPFS_ACL_SAMBA, gpfs_acl);
SAFE_FREE(gpfs_acl);
return result;
files_struct fake_fsp; /* TODO: rationalize parametrization */
SMB4ACE_T *smbace;
TALLOC_CTX *frame = talloc_stackframe();
- NTSTATUS status;
DEBUG(10, ("gpfsacl_emu_chmod invoked for %s mode %o\n", path, mode));
struct xattr_DOSATTRIB dosattrib;
enum ndr_err_code ndr_err;
DATA_BLOB blob;
- const char *attrstr = value;
unsigned int dosmode=0;
struct gpfs_winattr attrs;
int ret = 0;
return SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags);
}
- blob.data = (uint8_t *)attrstr;
+ blob.data = discard_const_p(uint8_t, value);
blob.length = size;
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &dosattrib,