diff options
author | Simo Sorce <idra@samba.org> | 2003-04-30 16:35:17 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-04-30 16:35:17 +0000 |
commit | 28cef867c761ac87101e3049628cfe2a073e65f2 (patch) | |
tree | 564aab00d2d9f1ea294d446441f07092c7116686 /source3/passdb/passdb.c | |
parent | 211939f3ab6310c09eb34c67f4097453d862ac5c (diff) | |
download | samba-28cef867c761ac87101e3049628cfe2a073e65f2.tar.gz samba-28cef867c761ac87101e3049628cfe2a073e65f2.tar.xz samba-28cef867c761ac87101e3049628cfe2a073e65f2.zip |
correctly initiazlize idmap tdb when creationg new
few fixes to *id_to_*id functions, we don't set the mapping for algoritmic
RIDs, they are resolved in the classic way
eliminate getpw* calls from tdbsam
(This used to be commit 6a7689cf74cd4d5f29e0b12f4bf8ac3051d49157)
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r-- | source3/passdb/passdb.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index c93577dc044..b13ecf7a33e 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -428,59 +428,6 @@ NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd *pwd) return NT_STATUS_OK; } -/****************************************************************** - * Get the free RID base if idmap is configured, otherwise return 0 - ******************************************************************/ - -uint32 pdb_get_free_rid_base(void) -{ - uint32 low, high; - if (pdb_get_free_rid_range(&low, &high)) { - return low; - } - return 0; -} - -/****************************************************************** - * Get the the non-algorithmic RID range if idmap range are defined - ******************************************************************/ - -BOOL pdb_get_free_rid_range(uint32 *low, uint32 *high) -{ - uid_t u_low, u_high; - gid_t g_low, g_high; - uint32 id_low, id_high; - - if (lp_idmap_only()) { - *low = BASE_RID; - *high = -1; - } - - if (lp_idmap_uid(&u_low, &u_high) && lp_idmap_gid(&g_low, &g_high)) { - if (u_low < g_low) { - id_low = u_low; - } else { - id_low = g_low; - } - if (u_high > g_high) { - id_high = u_high; - } else { - id_high = g_high; - } - - *low = fallback_pdb_uid_to_user_rid(id_low); - if (fallback_pdb_user_rid_to_uid(-1) < id_high) { - *high = -1; - } else { - *high = fallback_pdb_uid_to_user_rid(id_high); - } - - return True; - } - - return False; -} - /********************************************************** Encode the account control bits into a string. length = length of string to encode into (including terminating |