Bug 3615 - PATCH ntvfs_logoff is receiving a NULL ctx
Summary: PATCH ntvfs_logoff is receiving a NULL ctx
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
Depends on:
Reported: 2006-03-16 20:39 UTC by Matthew L Daniel
Modified: 2006-03-16 21:12 UTC (History)
0 users

See Also:

PATCH against svn trunk to check req->ctx for nullness (920 bytes, patch)
2006-03-16 20:40 UTC, Matthew L Daniel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew L Daniel 2006-03-16 20:39:15 UTC
switch message SMBulogoffX (task_id 36)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208916288 (LWP 1966)]
0x08394e03 in ntvfs_logoff (req=0x87bb388) at ntvfs/ntvfs_interface.c:298
298             struct ntvfs_module_context *ntvfs = req->ctx->modules;
(gdb) print req
$1 = (struct smbsrv_request *) 0x87bb388
(gdb) print req->ctx
$2 = (struct ntvfs_context *) 0x0

Please find attached a patch which WorksForMe.
After applying the patch, the same operation yields:

switch message SMBulogoffX (task_id 38)
ntvfs_logoff: ntvfs_request->ctx is NULL
switch message SMBtdis (task_id 38) closed connection to service IPC$

  -- /v\atthew
Comment 1 Matthew L Daniel 2006-03-16 20:40:28 UTC
Created attachment 1809 [details]
PATCH against svn trunk to check req->ctx for nullness

And I am happy to report that samba4 is serving that patch :-)
Comment 2 Andrew Bartlett 2006-03-16 21:12:35 UTC
I've fixed this by fixing the caller.

Thanks for the report!