svn commit: samba r14466 - in branches/tmp/vl-posixacls/source: .
lib modules
vlendec at samba.org
vlendec at samba.org
Thu Mar 16 10:03:31 GMT 2006
Author: vlendec
Date: 2006-03-16 10:03:29 +0000 (Thu, 16 Mar 2006)
New Revision: 14466
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14466
Log:
This is an empty template for AIX that show all the places where the
other acl implementations must hook in.
Volker
Added:
branches/tmp/vl-posixacls/source/modules/vfs_aixacl.c
Modified:
branches/tmp/vl-posixacls/source/Makefile.in
branches/tmp/vl-posixacls/source/configure.in
branches/tmp/vl-posixacls/source/lib/sysacls.c
Changeset:
Modified: branches/tmp/vl-posixacls/source/Makefile.in
===================================================================
--- branches/tmp/vl-posixacls/source/Makefile.in 2006-03-16 06:25:23 UTC (rev 14465)
+++ branches/tmp/vl-posixacls/source/Makefile.in 2006-03-16 10:03:29 UTC (rev 14466)
@@ -365,6 +365,7 @@
VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o
VFS_AFSACL_OBJ = modules/vfs_afsacl.o
VFS_POSIXACL_OBJ = modules/vfs_posixacl.o
+VFS_AIXACL_OBJ = modules/vfs_aixacl.o
VFS_CATIA_OBJ = modules/vfs_catia.o
PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
@@ -1344,6 +1345,11 @@
@$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_POSIXACL_OBJ:.o=.po) \
@SONAMEFLAG@`basename $@`
+bin/aixacl. at SHLIBEXT@: $(VFS_AIXACL_OBJ:.o=.po)
+ @echo "Building plugin $@"
+ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AIXACL_OBJ:.o=.po) \
+ @SONAMEFLAG@`basename $@`
+
bin/catia. at SHLIBEXT@: $(VFS_CATIA_OBJ:.o=. at PICSUFFIX@)
@echo "Building plugin $@"
@$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CATIA_OBJ:.o=. at PICSUFFIX@) \
Modified: branches/tmp/vl-posixacls/source/configure.in
===================================================================
--- branches/tmp/vl-posixacls/source/configure.in 2006-03-16 06:25:23 UTC (rev 14465)
+++ branches/tmp/vl-posixacls/source/configure.in 2006-03-16 10:03:29 UTC (rev 14466)
@@ -4534,6 +4534,7 @@
*aix*)
AC_MSG_RESULT(Using AIX ACLs)
AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available])
+ default_static_modules="$default_static_modules vfs_aixacl"
;;
*osf*)
AC_MSG_RESULT(Using Tru64 ACLs)
@@ -5300,6 +5301,7 @@
SMB_MODULE(vfs_shadow_copy, \$(VFS_SHADOW_COPY_OBJ), "bin/shadow_copy.$SHLIBEXT", VFS)
SMB_MODULE(vfs_afsacl, \$(VFS_AFSACL_OBJ), "bin/afsacl.$SHLIBEXT", VFS)
SMB_MODULE(vfs_posixacl, \$(VFS_POSIXACL_OBJ), "bin/posixacl.$SHLIBEXT", VFS)
+SMB_MODULE(vfs_aixacl, \$(VFS_AIXACL_OBJ), "bin/aixacl.$SHLIBEXT", VFS)
SMB_MODULE(vfs_catia, \$(VFS_CATIA_OBJ), "bin/catia.$SHLIBEXT", VFS)
SMB_SUBSYSTEM(VFS,smbd/vfs.o)
Modified: branches/tmp/vl-posixacls/source/lib/sysacls.c
===================================================================
--- branches/tmp/vl-posixacls/source/lib/sysacls.c 2006-03-16 06:25:23 UTC (rev 14465)
+++ branches/tmp/vl-posixacls/source/lib/sysacls.c 2006-03-16 10:03:29 UTC (rev 14466)
@@ -353,6 +353,8 @@
* statically-bound acl vfs module, but they are replacable.
*/
+#if defined(HAVE_POSIX_ACLS)
+
SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, connection_struct *conn,
const char *path_p, SMB_ACL_TYPE_T type)
{
@@ -382,6 +384,75 @@
return posixacl_sys_acl_delete_def_file(handle, conn, path);
}
+#elif defined(HAVE_AIX_ACLS)
+
+SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, connection_struct *conn,
+ const char *path_p, SMB_ACL_TYPE_T type)
+{
+ return aixacl_sys_acl_get_file(handle, conn, path_p, type);
+}
+
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+{
+ return aixacl_sys_acl_get_fd(handle, fsp, fd);
+}
+
+int sys_acl_set_file(vfs_handle_struct *handle, connection_struct *conn,
+ const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d)
+{
+ return aixacl_sys_acl_set_file(handle, conn, name, type, acl_d);
+}
+
+int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+ int fd, SMB_ACL_T acl_d)
+{
+ return aixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+}
+
+int sys_acl_delete_def_file(vfs_handle_struct *handle, connection_struct *conn,
+ const char *path)
+{
+ return aixacl_sys_acl_delete_def_file(handle, conn, path);
+}
+
+#else
+
+SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, connection_struct *conn,
+ const char *path_p, SMB_ACL_TYPE_T type)
+{
+ errno = ENOTSUP;
+ return NULL;
+}
+
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+{
+ errno = ENOTSUP;
+ return NULL;
+}
+
+int sys_acl_set_file(vfs_handle_struct *handle, connection_struct *conn,
+ const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
+int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+ int fd, SMB_ACL_T acl_d)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
+int sys_acl_delete_def_file(vfs_handle_struct *handle, connection_struct *conn,
+ const char *path)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
+#endif
+
/************************************************************************
Deliberately outside the ACL defines. Return 1 if this is a "no acls"
errno, 0 if not.
Added: branches/tmp/vl-posixacls/source/modules/vfs_aixacl.c
===================================================================
--- branches/tmp/vl-posixacls/source/modules/vfs_aixacl.c 2006-03-16 06:25:23 UTC (rev 14465)
+++ branches/tmp/vl-posixacls/source/modules/vfs_aixacl.c 2006-03-16 10:03:29 UTC (rev 14466)
@@ -0,0 +1,99 @@
+/*
+ Unix SMB/Netbios implementation.
+ VFS module to get and set posix acls
+ Copyright (C) Volker Lendecke 2006
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "includes.h"
+
+SMB_ACL_T aixacl_sys_acl_get_file(vfs_handle_struct *handle,
+ connection_struct *conn,
+ const char *path_p,
+ SMB_ACL_TYPE_T type)
+{
+ errno = ENOTSUP;
+ return NULL;
+}
+
+SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
+ files_struct *fsp,
+ int fd)
+{
+ errno = ENOTSUP;
+ return NULL;
+}
+
+int aixacl_sys_acl_set_file(vfs_handle_struct *handle,
+ connection_struct *conn,
+ const char *name,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T theacl)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
+int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
+ files_struct *fsp,
+ int fd, SMB_ACL_T theacl)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
+int aixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
+ connection_struct *conn,
+ const char *path)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
+/* VFS operations structure */
+
+static vfs_op_tuple aixacl_op_tuples[] = {
+ /* Disk operations */
+ {SMB_VFS_OP(aixacl_sys_acl_get_file),
+ SMB_VFS_OP_SYS_ACL_GET_FILE,
+ SMB_VFS_LAYER_TRANSPARENT},
+
+ {SMB_VFS_OP(aixacl_sys_acl_get_fd),
+ SMB_VFS_OP_SYS_ACL_GET_FD,
+ SMB_VFS_LAYER_TRANSPARENT},
+
+ {SMB_VFS_OP(aixacl_sys_acl_set_file),
+ SMB_VFS_OP_SYS_ACL_SET_FILE,
+ SMB_VFS_LAYER_TRANSPARENT},
+
+ {SMB_VFS_OP(aixacl_sys_acl_set_fd),
+ SMB_VFS_OP_SYS_ACL_SET_FD,
+ SMB_VFS_LAYER_TRANSPARENT},
+
+ {SMB_VFS_OP(aixacl_sys_acl_delete_def_file),
+ SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
+ SMB_VFS_LAYER_TRANSPARENT},
+
+ {SMB_VFS_OP(NULL),
+ SMB_VFS_OP_NOOP,
+ SMB_VFS_LAYER_NOOP}
+};
+
+NTSTATUS vfs_aixacl_init(void)
+{
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
+ aixacl_op_tuples);
+}
More information about the samba-cvs
mailing list