summaryrefslogtreecommitdiff
path: root/source3/sam
diff options
context:
space:
mode:
Diffstat (limited to 'source3/sam')
-rw-r--r--source3/sam/idmap.c9
-rw-r--r--source3/sam/idmap_tdb.c14
2 files changed, 18 insertions, 5 deletions
diff --git a/source3/sam/idmap.c b/source3/sam/idmap.c
index 8b5e23de25..771f4169a2 100644
--- a/source3/sam/idmap.c
+++ b/source3/sam/idmap.c
@@ -67,15 +67,18 @@ BOOL idmap_init(const char *remote_backend)
{
if (!local_map) {
idmap_reg_tdb(&local_map);
- local_map->init();
+ if (NT_STATUS_IS_ERR(local_map->init())) {
+ DEBUG(0, ("idmap_init: could not load or create local backend!\n"));
+ return False;
+ }
}
if (!remote_map && remote_backend && *remote_backend != 0) {
- DEBUG(3, ("load_methods: using '%s' as remote backend\n", remote_backend));
+ DEBUG(3, ("idmap_init: using '%s' as remote backend\n", remote_backend));
remote_map = get_methods(remote_backend);
if (!remote_map) {
- DEBUG(0, ("load_methods: could not load remote backend '%s'\n", remote_backend));
+ DEBUG(0, ("idmap_init: could not load remote backend '%s'\n", remote_backend));
return False;
}
remote_map->init();
diff --git a/source3/sam/idmap_tdb.c b/source3/sam/idmap_tdb.c
index c494cf595f..a43f5824a1 100644
--- a/source3/sam/idmap_tdb.c
+++ b/source3/sam/idmap_tdb.c
@@ -60,7 +60,7 @@ static NTSTATUS db_allocate_id(unid_t *id, int id_type)
}
if (hwm > idmap_state.uid_high) {
- DEBUG(0, ("idmap Fatal Error: UID range full!!\n"));
+ DEBUG(0, ("idmap Fatal Error: UID range full!! (max: %u)\n", idmap_state.uid_high));
return NT_STATUS_UNSUCCESSFUL;
}
@@ -75,7 +75,7 @@ static NTSTATUS db_allocate_id(unid_t *id, int id_type)
}
if (hwm > idmap_state.gid_high) {
- DEBUG(0, ("idmap Fatal Error: GID range full!!\n"));
+ DEBUG(0, ("idmap Fatal Error: GID range full!! (max: %u)\n", idmap_state.gid_high));
return NT_STATUS_UNSUCCESSFUL;
}
@@ -284,6 +284,16 @@ static NTSTATUS db_idmap_init(void)
}
}
+ if (!lp_idmap_uid(&idmap_state.uid_low, &idmap_state.uid_high)) {
+ DEBUG(0, ("idmap uid range missing or invalid\n"));
+ DEBUGADD(0, ("idmap will be unable to map foreign SIDs\n"));
+ }
+
+ if (!lp_idmap_gid(&idmap_state.gid_low, &idmap_state.gid_high)) {
+ DEBUG(0, ("idmap gid range missing or invalid\n"));
+ DEBUGADD(0, ("idmap will be unable to map foreign SIDs\n"));
+ }
+
return NT_STATUS_OK;
}