summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-07-10 14:21:43 +0000
committerVolker Lendecke <vlendec@samba.org>2003-07-10 14:21:43 +0000
commit7f3f878abb689813c29a7090e5d7707987369590 (patch)
treef9bc50ff7800ddf938428c96ff5a392ad50ce53b /source3
parent0b07d432cc2894144a0641c898df9cac7281e352 (diff)
downloadsamba-7f3f878abb689813c29a7090e5d7707987369590.tar.gz
samba-7f3f878abb689813c29a7090e5d7707987369590.tar.bz2
samba-7f3f878abb689813c29a7090e5d7707987369590.zip
pdbedit should not call idmap anymore. Otherwise pdbedit -L would
allocate id's. Volker (This used to be commit 0358cc76757e7ef06dada94ec3a73cd90a525ba9)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/utils/pdbedit.c15
2 files changed, 3 insertions, 14 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index b2ba1a1b79..1ba1ac0776 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -419,7 +419,7 @@ SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(SECRETS_OBJ) \
PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(IDMAP_OBJ)
+ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ)
RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
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) +