Exemple #1
0
static int skel_chmod_acl(vfs_handle_struct *handle,  const char *name, mode_t mode)
{
	/* If the underlying VFS doesn't have ACL support... */
	if (!handle->vfs_next.ops.chmod_acl) {
		errno = ENOSYS;
		return -1;
	}
	return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
}
Exemple #2
0
static int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
			const char *name, mode_t mode)
{
	if (lp_posix_pathnames()) {
		/* Only allow this on POSIX pathnames. */
		return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
	}
	return 0;
}
Exemple #3
0
static int cap_chmod_acl(vfs_handle_struct *handle, connection_struct *conn, const char *name, mode_t mode)
{
        pstring capname;
	capencode(capname, name);

	/* If the underlying VFS doesn't have ACL support... */
	if (!handle->vfs_next.ops.chmod_acl) {
		errno = ENOSYS;
		return -1;
	}
	return SMB_VFS_NEXT_CHMOD_ACL(handle, conn, capname, mode);
}
Exemple #4
0
static int audit_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t mode)
{
	int result;

	result = SMB_VFS_NEXT_CHMOD_ACL(handle, path, mode);

	syslog(audit_syslog_priority(handle), "chmod_acl %s mode 0x%x %s%s\n",
	       path, mode,
	       (result < 0) ? "failed: " : "",
	       (result < 0) ? strerror(errno) : "");

	return result;
}
Exemple #5
0
static int audit_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t mode)
{
	int result;

	result = SMB_VFS_NEXT_CHMOD_ACL(handle, path, mode);

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

	return result;
}
Exemple #6
0
static int skel_chmod_acl(vfs_handle_struct *handle,  const char *name, mode_t mode)
{
	return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
}