Bug 8678 - Segfault if we try to enumerate users and the last user can't be mapped to an uid
Summary: Segfault if we try to enumerate users and the last user can't be mapped to an...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.5.12
Hardware: All All
: P5 regression
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 8595
  Show dependency treegraph
 
Reported: 2011-12-23 13:42 UTC by Andreas Schneider
Modified: 2012-01-04 20:19 UTC (History)
1 user (show)

See Also:


Attachments
Patch (1.70 KB, patch)
2011-12-23 15:24 UTC, Andreas Schneider
no flags Details
patch2 (3.40 KB, patch)
2012-01-03 15:58 UTC, Andreas Schneider
vl: review+
Details
patch3 (3.32 KB, patch)
2012-01-03 16:44 UTC, Andreas Schneider
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2011-12-23 13:42:19 UTC
We get segfault if we try to enumerate users and the last user can't be mapped to an uid.

This problem has been introduced with bug #8608.
Comment 1 Andreas Schneider 2011-12-23 15:24:10 UTC
Created attachment 7215 [details]
Patch
Comment 2 Andreas Schneider 2012-01-03 15:58:57 UTC
Created attachment 7221 [details]
patch2
Comment 3 Volker Lendecke 2012-01-03 16:18:11 UTC
Comment on attachment 7221 [details]
patch2

Ok
Comment 4 Andreas Schneider 2012-01-03 16:44:44 UTC
Created attachment 7222 [details]
patch3

Some cosmetic changes. Thanks for the comments Volker. I've tested it again and it works.
Comment 5 Volker Lendecke 2012-01-04 10:08:40 UTC
Comment on attachment 7222 [details]
patch3

Obvious comment:

+	if (domain == NULL) {
+		return NULL;
+	}
+

is redundant. But please put it in as-is, yet another round is a bit too much I think.

Thanks for the clean-ups!
Comment 6 Andreas Schneider 2012-01-04 18:50:51 UTC
Karolin, could you please pick for 3.5 and 3.6? Thanks!

You can cherry pick from master:

5075e565684627dfbd23f715da344b4365351ccb
b9d208bdaa9da2a5ae534481865efc881b851b01
Comment 7 Karolin Seeger 2012-01-04 20:19:06 UTC
Pushed to both branches.
Closing out bug report.

Thanks!