diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 2003-04-07 15:02:52 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 2003-04-07 15:02:52 +0000 |
commit | 951aec08e8480690acbb10ab5e7db78db2e72061 (patch) | |
tree | 099a6b97031961b9479924879735e8a0cd6bbeb0 /source3/include | |
parent | a48d89bb9d0092d9b2368d55fdd1e2350210c012 (diff) | |
parent | f157e663f131bc26f351475226cce38b957cd0bd (diff) | |
download | samba-951aec08e8480690acbb10ab5e7db78db2e72061.tar.gz samba-951aec08e8480690acbb10ab5e7db78db2e72061.tar.bz2 samba-951aec08e8480690acbb10ab5e7db78db2e72061.zip |
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 43f21c87e12fe88dab6ccba13c2e54161cf87093)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/idmap.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/source3/include/idmap.h b/source3/include/idmap.h new file mode 100644 index 0000000000..1e56519453 --- /dev/null +++ b/source3/include/idmap.h @@ -0,0 +1,56 @@ +/* + 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_EMPTY 0x00 +#define ID_USERID 0x01 +#define ID_GROUPID 0x02 +#define ID_OTHER 0x04 + +#define ID_TYPEMASK 0x0f + +#define ID_NOMAP 0x10 +#define ID_CACHE 0x20 + +typedef union unid_t { + uid_t uid; + gid_t gid; +} unid_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, unid_t id, int id_type); + NTSTATUS (*get_id_from_sid)(unid_t *id, int *id_type, const DOM_SID *sid); + NTSTATUS (*set_mapping)(const DOM_SID *sid, unid_t id, int id_type); + + /* Called when backend is unloaded */ + NTSTATUS (*close)(void); + + /* Called to dump backend status */ + void (*status)(void); +}; + |