mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().
Michael
This commit is contained in:
parent
7b201c177b
commit
9296e93588
@ -93,6 +93,7 @@
|
|||||||
/* Leave at 22 - not yet released. Remove parameter fd from getlock. - obnox */
|
/* Leave at 22 - not yet released. Remove parameter fd from getlock. - obnox */
|
||||||
/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_get_fd. - obnox */
|
/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_get_fd. - obnox */
|
||||||
/* Leave at 22 - not yet released. Remove parameter fd from fchmod_acl. - obnox */
|
/* Leave at 22 - not yet released. Remove parameter fd from fchmod_acl. - obnox */
|
||||||
|
/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_set_fd. - obnox */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -366,7 +367,7 @@ struct vfs_ops {
|
|||||||
int (*sys_acl_set_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
|
int (*sys_acl_set_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
|
||||||
int (*sys_acl_valid)(struct vfs_handle_struct *handle, SMB_ACL_T theacl );
|
int (*sys_acl_valid)(struct vfs_handle_struct *handle, SMB_ACL_T theacl );
|
||||||
int (*sys_acl_set_file)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
|
int (*sys_acl_set_file)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
|
||||||
int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_ACL_T theacl);
|
int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
|
||||||
int (*sys_acl_delete_def_file)(struct vfs_handle_struct *handle, const char *path);
|
int (*sys_acl_delete_def_file)(struct vfs_handle_struct *handle, const char *path);
|
||||||
int (*sys_acl_get_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
|
int (*sys_acl_get_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
|
||||||
int (*sys_acl_free_text)(struct vfs_handle_struct *handle, char *text);
|
int (*sys_acl_free_text)(struct vfs_handle_struct *handle, char *text);
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
#define SMB_VFS_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs.ops.sys_acl_set_permset((conn)->vfs.handles.sys_acl_set_permset, (entry), (permset)))
|
#define SMB_VFS_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs.ops.sys_acl_set_permset((conn)->vfs.handles.sys_acl_set_permset, (entry), (permset)))
|
||||||
#define SMB_VFS_SYS_ACL_VALID(conn, theacl) ((conn)->vfs.ops.sys_acl_valid((conn)->vfs.handles.sys_acl_valid, (theacl)))
|
#define SMB_VFS_SYS_ACL_VALID(conn, theacl) ((conn)->vfs.ops.sys_acl_valid((conn)->vfs.handles.sys_acl_valid, (theacl)))
|
||||||
#define SMB_VFS_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs.ops.sys_acl_set_file((conn)->vfs.handles.sys_acl_set_file, (name), (acltype), (theacl)))
|
#define SMB_VFS_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs.ops.sys_acl_set_file((conn)->vfs.handles.sys_acl_set_file, (name), (acltype), (theacl)))
|
||||||
#define SMB_VFS_SYS_ACL_SET_FD(fsp, fd, theacl) ((fsp)->conn->vfs.ops.sys_acl_set_fd((fsp)->conn->vfs.handles.sys_acl_set_fd, (fsp), (fd), (theacl)))
|
#define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) ((fsp)->conn->vfs.ops.sys_acl_set_fd((fsp)->conn->vfs.handles.sys_acl_set_fd, (fsp), (theacl)))
|
||||||
#define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs.ops.sys_acl_delete_def_file((conn)->vfs.handles.sys_acl_delete_def_file, (path)))
|
#define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs.ops.sys_acl_delete_def_file((conn)->vfs.handles.sys_acl_delete_def_file, (path)))
|
||||||
#define SMB_VFS_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs.ops.sys_acl_get_perm((conn)->vfs.handles.sys_acl_get_perm, (permset), (perm)))
|
#define SMB_VFS_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs.ops.sys_acl_get_perm((conn)->vfs.handles.sys_acl_get_perm, (permset), (perm)))
|
||||||
#define SMB_VFS_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs.ops.sys_acl_free_text((conn)->vfs.handles.sys_acl_free_text, (text)))
|
#define SMB_VFS_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs.ops.sys_acl_free_text((conn)->vfs.handles.sys_acl_free_text, (text)))
|
||||||
@ -228,7 +228,7 @@
|
|||||||
#define SMB_VFS_OPAQUE_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs_opaque.ops.sys_acl_set_permset((conn)->vfs_opaque.handles.sys_acl_set_permset, (entry), (permset)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs_opaque.ops.sys_acl_set_permset((conn)->vfs_opaque.handles.sys_acl_set_permset, (entry), (permset)))
|
||||||
#define SMB_VFS_OPAQUE_SYS_ACL_VALID(conn, theacl) ((conn)->vfs_opaque.ops.sys_acl_valid((conn)->vfs_opaque.handles.sys_acl_valid, (theacl)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_VALID(conn, theacl) ((conn)->vfs_opaque.ops.sys_acl_valid((conn)->vfs_opaque.handles.sys_acl_valid, (theacl)))
|
||||||
#define SMB_VFS_OPAQUE_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs_opaque.ops.sys_acl_set_file((conn)->vfs_opaque.handles.sys_acl_set_file, (name), (acltype), (theacl)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs_opaque.ops.sys_acl_set_file((conn)->vfs_opaque.handles.sys_acl_set_file, (name), (acltype), (theacl)))
|
||||||
#define SMB_VFS_OPAQUE_SYS_ACL_SET_FD(fsp, fd, theacl) ((fsp)->conn->vfs_opaque.ops.sys_acl_set_fd((fsp)->conn->vfs_opaque.handles.sys_acl_set_fd, (fsp), (fd), (theacl)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_SET_FD(fsp, theacl) ((fsp)->conn->vfs_opaque.ops.sys_acl_set_fd((fsp)->conn->vfs_opaque.handles.sys_acl_set_fd, (fsp), (theacl)))
|
||||||
#define SMB_VFS_OPAQUE_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs_opaque.ops.sys_acl_delete_def_file((conn)->vfs_opaque.handles.sys_acl_delete_def_file, (path)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs_opaque.ops.sys_acl_delete_def_file((conn)->vfs_opaque.handles.sys_acl_delete_def_file, (path)))
|
||||||
#define SMB_VFS_OPAQUE_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs_opaque.ops.sys_acl_get_perm((conn)->vfs_opaque.handles.sys_acl_get_perm, (permset), (perm)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs_opaque.ops.sys_acl_get_perm((conn)->vfs_opaque.handles.sys_acl_get_perm, (permset), (perm)))
|
||||||
#define SMB_VFS_OPAQUE_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs_opaque.ops.sys_acl_free_text((conn)->vfs_opaque.handles.sys_acl_free_text, (text)))
|
#define SMB_VFS_OPAQUE_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs_opaque.ops.sys_acl_free_text((conn)->vfs_opaque.handles.sys_acl_free_text, (text)))
|
||||||
@ -348,7 +348,7 @@
|
|||||||
#define SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset) ((handle)->vfs_next.ops.sys_acl_set_permset((handle)->vfs_next.handles.sys_acl_set_permset, (entry), (permset)))
|
#define SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset) ((handle)->vfs_next.ops.sys_acl_set_permset((handle)->vfs_next.handles.sys_acl_set_permset, (entry), (permset)))
|
||||||
#define SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl) ((handle)->vfs_next.ops.sys_acl_valid((handle)->vfs_next.handles.sys_acl_valid, (theacl)))
|
#define SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl) ((handle)->vfs_next.ops.sys_acl_valid((handle)->vfs_next.handles.sys_acl_valid, (theacl)))
|
||||||
#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl) ((handle)->vfs_next.ops.sys_acl_set_file((handle)->vfs_next.handles.sys_acl_set_file, (name), (acltype), (theacl)))
|
#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl) ((handle)->vfs_next.ops.sys_acl_set_file((handle)->vfs_next.handles.sys_acl_set_file, (name), (acltype), (theacl)))
|
||||||
#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl) ((handle)->vfs_next.ops.sys_acl_set_fd((handle)->vfs_next.handles.sys_acl_set_fd, (fsp), (fd), (theacl)))
|
#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) ((handle)->vfs_next.ops.sys_acl_set_fd((handle)->vfs_next.handles.sys_acl_set_fd, (fsp), (theacl)))
|
||||||
#define SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path) ((handle)->vfs_next.ops.sys_acl_delete_def_file((handle)->vfs_next.handles.sys_acl_delete_def_file, (path)))
|
#define SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path) ((handle)->vfs_next.ops.sys_acl_delete_def_file((handle)->vfs_next.handles.sys_acl_delete_def_file, (path)))
|
||||||
#define SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm) ((handle)->vfs_next.ops.sys_acl_get_perm((handle)->vfs_next.handles.sys_acl_get_perm, (permset), (perm)))
|
#define SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm) ((handle)->vfs_next.ops.sys_acl_get_perm((handle)->vfs_next.handles.sys_acl_get_perm, (permset), (perm)))
|
||||||
#define SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text) ((handle)->vfs_next.ops.sys_acl_free_text((handle)->vfs_next.handles.sys_acl_free_text, (text)))
|
#define SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text) ((handle)->vfs_next.ops.sys_acl_free_text((handle)->vfs_next.handles.sys_acl_free_text, (text)))
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Samba system utilities for ACL support.
|
Samba system utilities for ACL support.
|
||||||
Copyright (C) Jeremy Allison 2000.
|
Copyright (C) Jeremy Allison 2000.
|
||||||
Copyright (C) Volker Lendecke 2006
|
Copyright (C) Volker Lendecke 2006
|
||||||
Copyright (C) Michael Adam 2006
|
Copyright (C) Michael Adam 2006,2008
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -376,9 +376,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
return posixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
|
return posixacl_sys_acl_set_fd(handle, fsp, acl_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
@ -407,9 +407,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
return aixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
|
return aixacl_sys_acl_set_fd(handle, fsp, acl_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
@ -438,9 +438,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
return tru64acl_sys_acl_set_fd(handle, fsp, fd, acl_d);
|
return tru64acl_sys_acl_set_fd(handle, fsp, acl_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
@ -469,9 +469,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
return solarisacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
|
return solarisacl_sys_acl_set_fd(handle, fsp, acl_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
@ -500,9 +500,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
return hpuxacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
|
return hpuxacl_sys_acl_set_fd(handle, fsp, acl_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
@ -531,9 +531,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
return irixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
|
return irixacl_sys_acl_set_fd(handle, fsp, acl_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
int sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
@ -577,7 +577,7 @@ int sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T acl_d)
|
SMB_ACL_T acl_d)
|
||||||
{
|
{
|
||||||
#ifdef ENOTSUP
|
#ifdef ENOTSUP
|
||||||
errno = ENOTSUP;
|
errno = ENOTSUP;
|
||||||
|
@ -153,7 +153,7 @@ int aixacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
|
|
||||||
int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
struct acl *file_acl = NULL;
|
struct acl *file_acl = NULL;
|
||||||
unsigned int rc;
|
unsigned int rc;
|
||||||
@ -162,7 +162,7 @@ int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
|||||||
if (!file_acl)
|
if (!file_acl)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
rc = fchacl(fd,file_acl,file_acl->acl_len);
|
rc = fchacl(fsp->fh->fd,file_acl,file_acl->acl_len);
|
||||||
DEBUG(10,("errno is %d\n",errno));
|
DEBUG(10,("errno is %d\n",errno));
|
||||||
DEBUG(10,("return code is %d\n",rc));
|
DEBUG(10,("return code is %d\n",rc));
|
||||||
SAFE_FREE(file_acl);
|
SAFE_FREE(file_acl);
|
||||||
|
@ -448,7 +448,7 @@ int aixjfs2_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
|
|
||||||
int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
|
int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
struct acl *acl_aixc;
|
struct acl *acl_aixc;
|
||||||
acl_type_t acl_type_info;
|
acl_type_t acl_type_info;
|
||||||
@ -467,7 +467,7 @@ int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
rc = aclx_fput(
|
rc = aclx_fput(
|
||||||
fd,
|
fsp->fh->fd,
|
||||||
SET_ACL, /* set only the ACL, not mode bits */
|
SET_ACL, /* set only the ACL, not mode bits */
|
||||||
acl_type_info,
|
acl_type_info,
|
||||||
acl_aixc,
|
acl_aixc,
|
||||||
|
@ -1097,9 +1097,9 @@ static int vfswrap_sys_acl_set_file(vfs_handle_struct *handle, const char *name
|
|||||||
return sys_acl_set_file(handle, name, acltype, theacl);
|
return sys_acl_set_file(handle, name, acltype, theacl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_ACL_T theacl)
|
static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
return sys_acl_set_fd(handle, fsp, fd, theacl);
|
return sys_acl_set_fd(handle, fsp, theacl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vfswrap_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path)
|
static int vfswrap_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path)
|
||||||
|
@ -250,7 +250,7 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
const char *name, SMB_ACL_TYPE_T acltype,
|
const char *name, SMB_ACL_TYPE_T acltype,
|
||||||
SMB_ACL_T theacl);
|
SMB_ACL_T theacl);
|
||||||
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl);
|
SMB_ACL_T theacl);
|
||||||
static int smb_full_audit_sys_acl_delete_def_file(vfs_handle_struct *handle,
|
static int smb_full_audit_sys_acl_delete_def_file(vfs_handle_struct *handle,
|
||||||
const char *path);
|
const char *path);
|
||||||
static int smb_full_audit_sys_acl_get_perm(vfs_handle_struct *handle,
|
static int smb_full_audit_sys_acl_get_perm(vfs_handle_struct *handle,
|
||||||
@ -1843,11 +1843,11 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl);
|
result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
|
||||||
|
|
||||||
do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,
|
do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,
|
||||||
"%s", fsp->fsp_name);
|
"%s", fsp->fsp_name);
|
||||||
|
@ -615,7 +615,7 @@ int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
|
|
||||||
int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, SMB_ACL_TYPE_ACCESS, theacl);
|
return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, SMB_ACL_TYPE_ACCESS, theacl);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Unix SMB/Netbios implementation.
|
* Unix SMB/Netbios implementation.
|
||||||
* VFS module to get and set HP-UX ACLs
|
* VFS module to get and set HP-UX ACLs
|
||||||
* Copyright (C) Michael Adam 2006
|
* Copyright (C) Michael Adam 2006,2008
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -306,14 +306,14 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
*/
|
*/
|
||||||
int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* HPUX doesn't have the facl call. Fake it using the path.... JRA.
|
* HPUX doesn't have the facl call. Fake it using the path.... JRA.
|
||||||
*/
|
*/
|
||||||
/* For all I see, the info should already be in the fsp
|
/* For all I see, the info should already be in the fsp
|
||||||
* parameter, but get it again to be safe --- necessary? */
|
* parameter, but get it again to be safe --- necessary? */
|
||||||
files_struct *file_struct_p = file_find_fd(fd);
|
files_struct *file_struct_p = file_find_fd(fsp->fh->fd);
|
||||||
if (file_struct_p == NULL) {
|
if (file_struct_p == NULL) {
|
||||||
errno = EBADF;
|
errno = EBADF;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Unix SMB/Netbios implementation.
|
Unix SMB/Netbios implementation.
|
||||||
VFS module to get and set irix acls
|
VFS module to get and set irix acls
|
||||||
Copyright (C) Michael Adam 2006
|
Copyright (C) Michael Adam 2006,2008
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -49,7 +49,7 @@ int irixacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
|
|
||||||
int irixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int irixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
errno = ENOTSUP;
|
errno = ENOTSUP;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -113,14 +113,14 @@ int posixacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
|
|
||||||
int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
acl_t acl = smb_acl_to_posix(theacl);
|
acl_t acl = smb_acl_to_posix(theacl);
|
||||||
if (acl == NULL) {
|
if (acl == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
res = acl_set_fd(fd, acl);
|
res = acl_set_fd(fsp->fh->fd, acl);
|
||||||
acl_free(acl);
|
acl_free(acl);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Unix SMB/Netbios implementation.
|
Unix SMB/Netbios implementation.
|
||||||
VFS module to get and set Solaris ACLs
|
VFS module to get and set Solaris ACLs
|
||||||
Copyright (C) Michael Adam 2006
|
Copyright (C) Michael Adam 2006,2008
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -219,7 +219,7 @@ int solarisacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|||||||
*/
|
*/
|
||||||
int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
SOLARIS_ACL_T solaris_acl = NULL;
|
SOLARIS_ACL_T solaris_acl = NULL;
|
||||||
SOLARIS_ACL_T default_acl = NULL;
|
SOLARIS_ACL_T default_acl = NULL;
|
||||||
@ -242,7 +242,7 @@ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
|||||||
strerror(errno)));
|
strerror(errno)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!solaris_acl_get_fd(fd, &default_acl, &default_count)) {
|
if (!solaris_acl_get_fd(fsp->fh->fd, &default_acl, &default_count)) {
|
||||||
DEBUG(10, ("error getting (default) acl from fd\n"));
|
DEBUG(10, ("error getting (default) acl from fd\n"));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = facl(fd, SETACL, count, solaris_acl);
|
ret = facl(fsp->fh->fd, SETACL, count, solaris_acl);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(10, ("call of facl failed (%s).\n", strerror(errno)));
|
DEBUG(10, ("call of facl failed (%s).\n", strerror(errno)));
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Unix SMB/Netbios implementation.
|
Unix SMB/Netbios implementation.
|
||||||
VFS module to get and set Tru64 acls
|
VFS module to get and set Tru64 acls
|
||||||
Copyright (C) Michael Adam 2006
|
Copyright (C) Michael Adam 2006,2008
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -128,14 +128,14 @@ fail:
|
|||||||
|
|
||||||
int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
|
int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
int fd, SMB_ACL_T theacl)
|
SMB_ACL_T theacl)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
acl_t tru64_acl = smb_acl_to_tru64_acl(theacl);
|
acl_t tru64_acl = smb_acl_to_tru64_acl(theacl);
|
||||||
if (tru64_acl == NULL) {
|
if (tru64_acl == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
res = acl_set_fd(fd, ACL_TYPE_ACCESS, tru64_acl);
|
res = acl_set_fd(fsp->fh->fd, ACL_TYPE_ACCESS, tru64_acl);
|
||||||
acl_free(tru64_acl);
|
acl_free(tru64_acl);
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
@ -2573,7 +2573,7 @@ static bool set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, bool defau
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, the_acl) == -1) {
|
if (SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl) == -1) {
|
||||||
/*
|
/*
|
||||||
* Some systems allow all the above calls and only fail with no ACL support
|
* Some systems allow all the above calls and only fail with no ACL support
|
||||||
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
|
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
|
||||||
@ -2589,7 +2589,7 @@ static bool set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, bool defau
|
|||||||
fsp->fsp_name ));
|
fsp->fsp_name ));
|
||||||
|
|
||||||
become_root();
|
become_root();
|
||||||
sret = SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, the_acl);
|
sret = SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl);
|
||||||
unbecome_root();
|
unbecome_root();
|
||||||
if (sret == 0) {
|
if (sret == 0) {
|
||||||
ret = True;
|
ret = True;
|
||||||
@ -3814,7 +3814,7 @@ int fchmod_acl(files_struct *fsp, mode_t mode)
|
|||||||
if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1)
|
if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
ret = SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, posix_acl);
|
ret = SMB_VFS_SYS_ACL_SET_FD(fsp, posix_acl);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
||||||
@ -4152,7 +4152,7 @@ static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const c
|
|||||||
|
|
||||||
/* Set the new empty file ACL. */
|
/* Set the new empty file ACL. */
|
||||||
if (fsp && fsp->fh->fd != -1) {
|
if (fsp && fsp->fh->fd != -1) {
|
||||||
if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, new_file_acl) == -1) {
|
if (SMB_VFS_SYS_ACL_SET_FD(fsp, new_file_acl) == -1) {
|
||||||
DEBUG(5,("remove_posix_acl: acl_set_file failed on %s (%s)\n",
|
DEBUG(5,("remove_posix_acl: acl_set_file failed on %s (%s)\n",
|
||||||
fname, strerror(errno) ));
|
fname, strerror(errno) ));
|
||||||
goto done;
|
goto done;
|
||||||
@ -4199,7 +4199,7 @@ bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *
|
|||||||
|
|
||||||
if (fsp && fsp->fh->fd != -1) {
|
if (fsp && fsp->fh->fd != -1) {
|
||||||
/* The preferred way - use an open fd. */
|
/* The preferred way - use an open fd. */
|
||||||
if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, file_acl) == -1) {
|
if (SMB_VFS_SYS_ACL_SET_FD(fsp, file_acl) == -1) {
|
||||||
DEBUG(5,("set_unix_posix_acl: acl_set_file failed on %s (%s)\n",
|
DEBUG(5,("set_unix_posix_acl: acl_set_file failed on %s (%s)\n",
|
||||||
fname, strerror(errno) ));
|
fname, strerror(errno) ));
|
||||||
SMB_VFS_SYS_ACL_FREE_ACL(conn, file_acl);
|
SMB_VFS_SYS_ACL_FREE_ACL(conn, file_acl);
|
||||||
|
Loading…
Reference in New Issue
Block a user