summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-16 17:26:26 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:44 +0200
commit2c549be359152964f9126530664e24bedd75f6f5 (patch)
tree6f066c790dca0696f1743ae221b243c6ed6f87f0 /source3/winbindd
parentfd81228ed8691e3c8fc61e0be6f516b219c0e39f (diff)
downloadsamba-2c549be359152964f9126530664e24bedd75f6f5.tar.gz
samba-2c549be359152964f9126530664e24bedd75f6f5.tar.bz2
samba-2c549be359152964f9126530664e24bedd75f6f5.zip
s3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_tdb2.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index dba5690bfb..979eb53790 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -44,12 +44,6 @@ struct idmap_tdb2_context {
#define HWM_GROUP "GROUP HWM"
#define HWM_USER "USER HWM"
-static struct idmap_tdb2_state {
- /* User and group id pool */
- uid_t low_uid, high_uid; /* Range of uids to allocate */
- gid_t low_gid, high_gid; /* Range of gids to allocate */
-} idmap_tdb2_state;
-
static NTSTATUS idmap_tdb2_new_mapping(struct idmap_domain *dom,
struct id_map *map);
@@ -59,43 +53,6 @@ static struct db_context *idmap_tdb2;
static NTSTATUS idmap_tdb2_alloc_load(struct idmap_domain *dom);
-static NTSTATUS idmap_tdb2_load_ranges(void)
-{
- uid_t low_uid = 0;
- uid_t high_uid = 0;
- gid_t low_gid = 0;
- gid_t high_gid = 0;
-
- if (!lp_idmap_uid(&low_uid, &high_uid)) {
- DEBUG(1, ("idmap uid missing\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- if (!lp_idmap_gid(&low_gid, &high_gid)) {
- DEBUG(1, ("idmap gid missing\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- idmap_tdb2_state.low_uid = low_uid;
- idmap_tdb2_state.high_uid = high_uid;
- idmap_tdb2_state.low_gid = low_gid;
- idmap_tdb2_state.high_gid = high_gid;
-
- if (idmap_tdb2_state.high_uid <= idmap_tdb2_state.low_uid) {
- DEBUG(1, ("idmap uid range missing or invalid\n"));
- DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- if (idmap_tdb2_state.high_gid <= idmap_tdb2_state.low_gid) {
- DEBUG(1, ("idmap gid range missing or invalid\n"));
- DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- return NT_STATUS_OK;
-}
-
/*
open the permanent tdb
*/
@@ -136,16 +93,8 @@ static NTSTATUS idmap_tdb2_open_db(struct idmap_domain *dom)
*/
static NTSTATUS idmap_tdb2_alloc_load(struct idmap_domain *dom)
{
- NTSTATUS status;
uint32 low_id;
- /* load ranges */
-
- status = idmap_tdb2_load_ranges();
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
/* Create high water marks for group and user id */
low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_USER);