diff options
author | Simo Sorce <idra@samba.org> | 2003-04-17 14:25:52 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-04-17 14:25:52 +0000 |
commit | 491aa2bfde1010709e61807a62d5a77b54a6179f (patch) | |
tree | bdc53bb5a3c8fd41a714d1748063ef144958e716 /source3/passdb/pdb_tdb.c | |
parent | 800f68d2fbba2cc1727329c5c026e5a8165b9fd0 (diff) | |
download | samba-491aa2bfde1010709e61807a62d5a77b54a6179f.tar.gz samba-491aa2bfde1010709e61807a62d5a77b54a6179f.tar.bz2 samba-491aa2bfde1010709e61807a62d5a77b54a6179f.zip |
seem that someone changed the semanthic of unix_strlower without fixing all
places where it was used, this caused me segfaults in the last week :(
add more debugging in idmap to chase down a problem
(This used to be commit 6393105bda12fb3f6211e4f0128aabf588431b49)
Diffstat (limited to 'source3/passdb/pdb_tdb.c')
-rw-r--r-- | source3/passdb/pdb_tdb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 7e2f4b832f..3a1702a4e0 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -585,8 +585,10 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods, SAM_ACCOUNT return nt_status; } + /* Data is stored in all lower-case */ - unix_strlower(sname, -1, name, sizeof(name)); + fstrcpy(name, sname); + strlower(name); /* set search key */ slprintf(keystr, sizeof(keystr)-1, "%s%s", USERPREFIX, name); @@ -692,7 +694,8 @@ static NTSTATUS tdbsam_delete_sam_account(struct pdb_methods *my_methods, SAM_AC uint32 rid; fstring name; - unix_strlower(pdb_get_username(sam_pass), -1, name, sizeof(name)); + fstrcpy(name, pdb_get_username(sam_pass)); + strlower(name); /* open the TDB */ if (!(pwd_tdb = tdb_open_log(tdb_state->tdbsam_location, 0, TDB_DEFAULT, O_RDWR, 0600))) { @@ -826,7 +829,8 @@ static BOOL tdb_update_sam(struct pdb_methods *my_methods, SAM_ACCOUNT* newpwd, } data.dptr = buf; - unix_strlower(pdb_get_username(newpwd), -1, name, sizeof(name)); + fstrcpy(name, pdb_get_username(newpwd)); + strlower(name); DEBUG(5, ("Storing %saccount %s with RID %d\n", flag == TDB_INSERT ? "(new) " : "", name, user_rid)); |