Copyright (C) Jim McDonough <jmcd@us.ibm.com> 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 Lesser General Public
License as published by the Free Software Foundation; either
version 3 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 Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define SMB_IDMAP_INTERFACE_VERSION 5
+#include "librpc/gen_ndr/idmap.h"
+
struct idmap_domain {
const char *name;
struct idmap_methods *methods;
+ uint32_t low_id;
+ uint32_t high_id;
+ bool read_only;
void *private_data;
};
and type and gets back a uid or gid. */
NTSTATUS (*sids_to_unixids)(struct idmap_domain *dom, struct id_map **ids);
- NTSTATUS (*set_mapping)(struct idmap_domain *dom, const struct id_map *map);
- NTSTATUS (*remove_mapping)(struct idmap_domain *dom, const struct id_map *map);
-
- /* Called to dump backends data */
- /* NOTE: caller must use talloc_free to free maps when done */
- NTSTATUS (*dump_data)(struct idmap_domain *dom, struct id_map **maps, int *num_maps);
-
- /* Called when backend is unloaded */
- NTSTATUS (*close_fn)(struct idmap_domain *dom);
+ /* Allocate a Unix-ID. */
+ NTSTATUS (*allocate_id)(struct idmap_domain *dom, struct unixid *id);
};
-struct idmap_alloc_methods {
-
- /* Called when backend is first loaded */
- NTSTATUS (*init)(const char *compat_params);
-
- NTSTATUS (*allocate_id)(struct unixid *id);
- NTSTATUS (*get_id_hwm)(struct unixid *id);
- NTSTATUS (*set_id_hwm)(struct unixid *id);
-
- /* Called when backend is unloaded */
- NTSTATUS (*close_fn)(void);
-};
+#include "winbindd/idmap_proto.h"
#endif /* _IDMAP_H_ */