pdbedit should not call idmap anymore. Otherwise pdbedit -L would
authorVolker Lendecke <vlendec@samba.org>
Thu, 10 Jul 2003 14:21:43 +0000 (14:21 +0000)
committerVolker Lendecke <vlendec@samba.org>
Thu, 10 Jul 2003 14:21:43 +0000 (14:21 +0000)
allocate id's.

Volker
(This used to be commit 0358cc76757e7ef06dada94ec3a73cd90a525ba9)

source3/Makefile.in
source3/utils/pdbedit.c

index b2ba1a1b79de0653bfb4aec6c517e53ea217990b..1ba1ac0776642bbee5fd4a350f1e7d73edde74e9 100644 (file)
@@ -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 \
index 83f61769e21c120c3b832c0dee6d680b0c393daf..b79972aa35eb7e97ec00113d4433ed1b92cb793d 100644 (file)
@@ -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) +