[PATCH] s3-lib: fix segf while reading incomplete session info (bug #10003)

Bjoern Baumbach bb at sernet.de
Tue Jul 9 10:09:40 MDT 2013


I've an additional patch for smbstatus, that completes the set of patches.

Without the attached patch I get process listing like:
PID     Username      Group         Machine
8090      root          root          laila
8126      4294967295    -1            laila
8103      4294967295    -1            laila

The attached patch checks if the uid or gid is -1 and uses "-1" for
displaying the names/ids.
Without the patch we're trying to print -1 as unsigned int.


On 07/08/2013 05:03 PM, Bjoern Baumbach wrote:
> Hi!
> If we are listing connections with net status shares or smbstatus, it's
> possible that we get an incomplete session.
> For this case we need to check if the session_info is already set or
> not, otherwise we're using invalid pointers and the tools are segfaulting.
> Please find and push (or comment) the attached patch-set by Metze and me.
> There is an additional patch that avoids that we print incomplete
> sessions e.g. without a service name.
> Thanks
> Björn

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s3-smbstatus-display-u-g-id-of-1-as-1.patch
Type: text/x-patch
Size: 1830 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130709/e1d9a587/attachment.bin>

More information about the samba-technical mailing list