From 7f3f878abb689813c29a7090e5d7707987369590 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 10 Jul 2003 14:21:43 +0000 Subject: pdbedit should not call idmap anymore. Otherwise pdbedit -L would allocate id's. Volker (This used to be commit 0358cc76757e7ef06dada94ec3a73cd90a525ba9) --- source3/utils/pdbedit.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'source3/utils/pdbedit.c') diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 83f61769e2..b79972aa35 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -172,8 +172,7 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst char lm_passwd[33]; char nt_passwd[33]; - uid = -1; - idmap_sid_to_uid(pdb_get_user_sid(sam_pwent), &uid, 0); + uid = nametouid(pdb_get_username(sam_pwent)); pdb_sethexpwd(lm_passwd, pdb_get_lanman_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent)); pdb_sethexpwd(nt_passwd, pdb_get_nt_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent)); @@ -185,8 +184,7 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN), (uint32)pdb_get_pass_last_set_time(sam_pwent)); } else { - uid = -1; - idmap_sid_to_uid(pdb_get_user_sid(sam_pwent), &uid, 0); + uid = nametouid(pdb_get_username(sam_pwent)); printf ("%s:%d:%s\n", pdb_get_username(sam_pwent), uid, pdb_get_fullname(sam_pwent)); } @@ -621,21 +619,12 @@ int main (int argc, char **argv) exit(1); } - /* Initialise the password backed before idmap and the global_sam_sid - to ensure that we fetch from ldap before we make a domain sid up */ - if(!initialize_password_db(False)) exit(1); if (!init_names()) exit(1); - if (!idmap_init(lp_idmap_backend())) - exit(1); - - if (!idmap_init_wellknown_sids()) - exit(1); - setparms = (backend ? BIT_BACKEND : 0) + (verbose ? BIT_VERBOSE : 0) + (spstyle ? BIT_SPSTYLE : 0) + -- cgit