Bug 3704 - SEGV in tdbsam_getsampwnam (passdb/pdb_tdb.c)
Summary: SEGV in tdbsam_getsampwnam (passdb/pdb_tdb.c)
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Domain Control (show other bugs)
Version: 3.0.22
Hardware: All All
: P3 critical
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-20 08:06 UTC by Leonid Kabanov
Modified: 2006-04-20 08:10 UTC (History)
0 users

See Also:


Attachments
Patch for passdb/pdb_tdb.c (588 bytes, patch)
2006-04-20 08:07 UTC, Leonid Kabanov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Kabanov 2006-04-20 08:06:19 UTC
Just look at the patch, it's self-explanatory:

--- passdb/pdb_tdb.c    Mon Jan 30 21:45:07 2006
+++ passdb/pdb_tdb.c.fixed      Thu Apr 20 20:34:18 2006
@@ -420,7 +420,7 @@
                         * TDB file doesn't exist, so try to create new one. This is useful to avoid
                         * confusing error msg when adding user account first time
                         */
-                       if (!(pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT ))) {
+                       if ((pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT ))) {
                                DEBUG(0, ("pdb_getsampwnam: TDB passwd (%s) did not exist. File successfully created.\n",
                                          tdb_state->tdbsam_location));
                                tdb_close(pwd_tdb);
Comment 1 Leonid Kabanov 2006-04-20 08:07:30 UTC
Created attachment 1867 [details]
Patch for passdb/pdb_tdb.c
Comment 2 Gerald (Jerry) Carter (dead mail address) 2006-04-20 08:10:01 UTC
Already fixed in the SAMBA_3_0 tree.  Thanks for teh patch though.