summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-03-07 23:47:59 +0000
committerSimo Sorce <idra@samba.org>2003-03-07 23:47:59 +0000
commit64e49aa3c5392fd0ba5fc33ea21eff87c548995e (patch)
tree158b1a0bdd2e71ba348d6daa256ea1fde9ec66ff /source3/include
parenteed8772da109ecc6e9f35fd27b719795b28a47fb (diff)
downloadsamba-64e49aa3c5392fd0ba5fc33ea21eff87c548995e.tar.gz
samba-64e49aa3c5392fd0ba5fc33ea21eff87c548995e.tar.bz2
samba-64e49aa3c5392fd0ba5fc33ea21eff87c548995e.zip
initial work for the new idmpa interface
(This used to be commit 8338e74ac4e5f31150c96f459a67e52090dc6013)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/idmap.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
new file mode 100644
index 0000000000..0d358d3fbe
--- /dev/null
+++ b/source3/include/idmap.h
@@ -0,0 +1,49 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Idmap headers
+
+ Copyright (C) Anthony Liguori 2003
+ Copyright (C) Simo Sorce 2003
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#define ID_USERID 1
+#define ID_GROUPID 2
+#define ID_OTHER 3
+
+typedef union id_t {
+ uid_t uid;
+ gid_t gid;
+} id_t;
+
+/* Filled out by IDMAP backends */
+struct idmap_methods {
+
+ /* Called when backend is first loaded */
+ NTSTATUS (*init)(void);
+
+ NTSTATUS (*get_sid_from_id)(DOM_SID *sid, id_t id, int id_type);
+ NTSTATUS (*get_id_from_sid)(id_t *id, int *id_type, DOM_SID *sid);
+
+ /* Called when backend is unloaded */
+ NTSTATUS (*close)(void);
+
+ /* Called to dump backend status */
+ void (*status)(void);
+};
+