summaryrefslogtreecommitdiff
path: root/source3/sam/idmap.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-05-01 11:47:48 +0000
committerSimo Sorce <idra@samba.org>2003-05-01 11:47:48 +0000
commit75cace04fdcb672cc6c3c3ec8403206f2b222c50 (patch)
treea0e30d36b57bb698cd4af43c769c6deee0ca232d /source3/sam/idmap.c
parented454fe3d677a27e19b904f5d0d3199b62c9a1b0 (diff)
downloadsamba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.gz
samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.bz2
samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.zip
*id_to_*id call reshape to return NTSTATUS errors
plus internal fixes 1st stage (This used to be commit 6d036761e565bc93964bb3c939d5b7d78d5778a3)
Diffstat (limited to 'source3/sam/idmap.c')
-rw-r--r--source3/sam/idmap.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/source3/sam/idmap.c b/source3/sam/idmap.c
index e0634681de..9695e7b764 100644
--- a/source3/sam/idmap.c
+++ b/source3/sam/idmap.c
@@ -102,35 +102,6 @@ NTSTATUS idmap_set_mapping(const DOM_SID *sid, unid_t id, int id_type)
lazy_initialize_idmap();
- if (!lp_idmap_only()) {
- if (id_type & ID_USERID) {
- uid_t low, high;
- if (!lp_idmap_uid(&low, &high)) {
- DEBUG(0, ("idmap uid range missing or invalid\n"));
- DEBUGADD(0, ("idmap will be unable to map SIDs\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
- if (low > id.uid || high < id.uid) {
- DEBUG(0, ("uid not in range and idmap only is flase - not storing the mapping\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
- } else if (id_type & ID_GROUPID) {
- gid_t low, high;
- if (!lp_idmap_gid(&low, &high)) {
- DEBUG(0, ("idmap gid range missing or invalid\n"));
- DEBUGADD(0, ("idmap will be unable to map SIDs\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
- if (low > id.gid || high < id.gid) {
- DEBUG(0, ("uid not in range and idmap only is flase - not storing the mapping\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
- } else {
- DEBUG(0, ("Wrong ID Type, mapping failed!"));
- return NT_STATUS_UNSUCCESSFUL;
- }
- }
-
ret = local_map->set_mapping(sid, id, id_type);
if (NT_STATUS_IS_ERR(ret)) {
DEBUG (0, ("idmap_set_mapping: Error, unable to modify local cache!\n"));
@@ -239,4 +210,3 @@ void idmap_status(void)
local_map->status();
if (remote_map) remote_map->status();
}
-