Ejemplo n.º 1
0
static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
	/* If the underlying VFS doesn't have ACL support... */
	if (!handle->vfs_next.ops.fchmod_acl) {
		errno = ENOSYS;
		return -1;
	}
	return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
}
Ejemplo n.º 2
0
static int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
			struct files_struct *fsp, mode_t mode)
{
	if (fsp->posix_open) {
		/* Only allow this on POSIX opens. */
		return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
	}
	return 0;
}
Ejemplo n.º 3
0
static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
	int result;

	result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);

	syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
	       fsp->fsp_name->base_name, mode,
	       (result < 0) ? "failed: " : "",
	       (result < 0) ? strerror(errno) : "");

	return result;
}
Ejemplo n.º 4
0
static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
	int result;

	result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);

	if (lp_syslog() > 0) {
		syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
		       fsp->fsp_name->base_name, mode,
		       (result < 0) ? "failed: " : "",
		       (result < 0) ? strerror(errno) : "");
	}
	DEBUG(1, ("vfs_extd_audit: fchmod_acl %s mode 0x%x %s %s",
		fsp_str_dbg(fsp),  (unsigned int)mode,
	       (result < 0) ? "failed: " : "",
	       (result < 0) ? strerror(errno) : ""));

	return result;
}
Ejemplo n.º 5
0
static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
	return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
}