Bug 9135 - Don't segfault if we don't find a domain in resolve_username_to_alias()/fill_grent()
Summary: Don't segfault if we don't find a domain in resolve_username_to_alias()/fill_...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.6.7
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-04 13:15 UTC by Andreas Schneider
Modified: 2012-09-04 17:09 UTC (History)
1 user (show)

See Also:


Attachments
v3-6-test patch (1.25 KB, patch)
2012-09-04 13:15 UTC, Andreas Schneider
asn: review? (jra)
gd: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2012-09-04 13:15:58 UTC
Created attachment 7858 [details]
v3-6-test patch

Don't segfault we we don't find a domain in resolve_username_to_alias()/fill_grent(). Leave and print a debug message.

(gdb) bt
#0  0x00002ac4578fa285 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00002ac4578fbd30 in abort () at abort.c:88
#2  0x00002ac454f2561d in dump_core () at lib/fault.c:337
#3  0x00002ac454f35ee9 in smb_panic (why=<value optimized out>) at lib/util.c:1484
#4  0x00002ac454f25b4e in fault_report (sig=10) at lib/fault.c:52
#5  sig_fault (sig=10) at lib/fault.c:75
#6  <signal handler called>
#7  get_cache (domain=0x0) at winbindd/winbindd_cache.c:145
#8  0x00002ac454e70f37 in resolve_username_to_alias (mem_ctx=0x2ac46d508570, domain=0x0,
    name=0x2ac46d51cee0 "Site_Administrators", alias=0x7fffba3196e8) at winbindd/winbindd_cache.c:1098
#9  0x00002ac454e64de1 in normalize_name_map (mem_ctx=0x2ac46d508570, domain=0x0, name=0x2ac46d51cee0 "Site_Administrators",
    normalized=0x7fffba3196e8) at winbindd/winbindd_util.c:1212
#10 0x00002ac454e644f6 in fill_grent (mem_ctx=0x2ac46d508570, gr=0x2ac46d548df8, dom_name=0x2ac46d508640 "ENCORE",
    gr_name=0x2ac46d51cee0 "Site_Administrators", unix_gid=34085) at winbindd/winbindd_group.c:41
#11 0x00002ac454eaf93d in winbindd_getgrgid_recv (req=<value optimized out>, response=0x2ac46d548df0) at winbindd/winbindd_getgrgid.c:117
#12 0x00002ac454e62972 in wb_request_done (req=0x2ac46d4b0840) at winbindd/winbindd.c:651
#13 0x00002ac454ea9f13 in wb_group_members_done (subreq=0x0) at winbindd/wb_group_members.c:450
#14 0x00002ac454ea9bad in wb_groups_members_done (subreq=0x0) at winbindd/wb_group_members.c:245
#15 0x00002ac454ea996b in wb_lookupgroupmem_done (subreq=0x2ac46d570430) at winbindd/wb_group_members.c:101
#16 0x00002ac454f47027 in tevent_common_loop_immediate (ev=0x2ac46d519450) at ../lib/tevent/tevent_immediate.c:135
#17 0x00002ac454f457cb in run_events (ev=0x2ac46d519450, selrtn=0, read_fds=0x0, write_fds=0x0) at lib/events.c:107
#18 0x00002ac454f45bcb in s3_event_loop_once (ev=0x2ac46d519450, location=<value optimized out>) at lib/events.c:201
#19 0x00002ac454f46020 in _tevent_loop_once (ev=0x2ac46d519450, location=0x2ac4552a8ed7 "winbindd/winbindd.c:1273")
    at ../lib/tevent/tevent.c:497
#20 0x00002ac454e63d07 in main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>)
    at winbindd/winbindd.c:1273
Comment 1 Guenther Deschner 2012-09-04 14:33:43 UTC
Comment on attachment 7858 [details]
v3-6-test patch

Looks good of course. Just wondering why that domain is NULL in this setup.
Comment 2 Andreas Schneider 2012-09-04 16:26:01 UTC
gd: ENCORE is a trusted domain probably the connection to the trusted domain got lost. Maybe I got more details about why. However we shouldn't segfault in this code path.


Karolin, please add this patch to the next 3.6 release. Thanks!
Comment 3 Karolin Seeger 2012-09-04 17:09:38 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!