summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb2.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-01-22 17:56:19 +0100
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:35 +0200
commit3715a1687f0b258d0c8f0966eddc8aa6586a8735 (patch)
treef54dd5876aec1e478989aca3186e8b1cfdd877fe /source3/winbindd/idmap_tdb2.c
parent672ab10ee784fcfc3270df3e7665f74ff08f7d40 (diff)
downloadsamba-3715a1687f0b258d0c8f0966eddc8aa6586a8735.tar.gz
samba-3715a1687f0b258d0c8f0966eddc8aa6586a8735.tar.bz2
samba-3715a1687f0b258d0c8f0966eddc8aa6586a8735.zip
s3:idmap: remove unused alloc method get_id_hwm from idmap API
Michael
Diffstat (limited to 'source3/winbindd/idmap_tdb2.c')
-rw-r--r--source3/winbindd/idmap_tdb2.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index bd30a25393..d5044ed5c6 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -298,54 +298,6 @@ static NTSTATUS idmap_tdb2_allocate_id(struct unixid *xid)
}
/*
- Get current highest id.
-*/
-static NTSTATUS idmap_tdb2_get_hwm(struct unixid *xid)
-{
- const char *hwmkey;
- const char *hwmtype;
- uint32_t hwm;
- uint32_t high_hwm;
- NTSTATUS status;
-
- status = idmap_tdb2_open_db();
- NT_STATUS_NOT_OK_RETURN(status);
-
- /* Get current high water mark */
- switch (xid->type) {
-
- case ID_TYPE_UID:
- hwmkey = HWM_USER;
- hwmtype = "UID";
- high_hwm = idmap_tdb2_state.high_uid;
- break;
-
- case ID_TYPE_GID:
- hwmkey = HWM_GROUP;
- hwmtype = "GID";
- high_hwm = idmap_tdb2_state.high_gid;
- break;
-
- default:
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- if ((hwm = dbwrap_fetch_int32(idmap_tdb2, hwmkey)) == -1) {
- return NT_STATUS_INTERNAL_DB_ERROR;
- }
-
- xid->id = hwm;
-
- /* Warn if it is out of range */
- if (hwm >= high_hwm) {
- DEBUG(0, ("Warning: %s range full!! (max: %lu)\n",
- hwmtype, (unsigned long)high_hwm));
- }
-
- return NT_STATUS_OK;
-}
-
-/*
Set high id.
*/
static NTSTATUS idmap_tdb2_set_hwm(struct unixid *xid)
@@ -945,7 +897,6 @@ static struct idmap_methods db_methods = {
static struct idmap_alloc_methods db_alloc_methods = {
.init = idmap_tdb2_alloc_init,
.allocate_id = idmap_tdb2_allocate_id,
- .get_id_hwm = idmap_tdb2_get_hwm,
.set_id_hwm = idmap_tdb2_set_hwm,
.close_fn = idmap_tdb2_alloc_close
};