Moshe Yosevshvili | 2 Apr 2006 12:02
Picon

winbindd_pam.c open a NETLOGON pipe but never closes it?

hi all.

I'm using samba 3.0.21c and i see in the code that in the call to:
winbindd_dual_pam_auth_crap (winbindd_pam.c) there's a call to opening
a NETLOGON pipe but the pipe is never closed. can't this cause a leak (open
handles in the domain-controller)?

thanks.

Marc Balmer | 2 Apr 2006 12:11
Picon
Favicon

Re: Samba v3.0.21c

Steve Williams wrote:
> You should have joined the OpenBSD technical list, or at least looked at 
> their archives.
> 
> There is a "feature" in the particular sequence of events with an 
> opendir, seekdir, telldir, system calls that can cause memory usage 
> increase.  You should be able to find it on the mail list archives.
> 
> There is a proposed patch to OpenBSD that changes the way that these 
> calls work, but to the best of my memory, it has not been imported into 
> the source tree yet.

I just wanted to let you guys know that we have committed a patch to 
OpenBSD -current that remedies the problem.

- Marc Balmer

Stefan (metze) Metzmacher | 2 Apr 2006 14:23
Picon
Favicon

Re: svn commit: samba r14853 - in trunk/source/smbd: .


> Log:
> When going through ipc, trans2 and nttrans I had started from the 3_0
> ipc.c. Fix the bug in the 3 new implementations that Jeremy just fixed in
> 3_0/smbd/ipc.c.

> Modified: trunk/source/smbd/ipc.c
> ===================================================================
> --- trunk/source/smbd/ipc.c	2006-04-01 18:41:07 UTC (rev 14852)
> +++ trunk/source/smbd/ipc.c	2006-04-01 19:17:07 UTC (rev 14853)
>  <at>  <at>  -638,7 +638,7  <at>  <at> 
>  			goto bad_param;
>  		if (pdisp > state->total_param)
>  			goto bad_param;
> -		if ((smb_base(inbuf) + poff + pcnt >= inbuf + size) ||
> +		if ((smb_base(inbuf) + poff + pcnt > inbuf + size) ||
>  		    (smb_base(inbuf) + poff + pcnt < smb_base(inbuf)))
>  			goto bad_param;
>  		if (state->param + pdisp < state->param)

wouldn't it be better to define some macros, and use them, so only one
place needs to be updated...?

metze
Jelmer Vernooij | 2 Apr 2006 16:47
Picon

Re: Unable to build TP since samba-4.0.0tp2-SVN-build-14059

Richard Bollinger wrote:
> On 3/27/06, Jelmer Vernooij <jelmer <at> samba.org> wrote:
>   
>> ...
>> Ah - thanks! Looks like we might have to experiment with the order of
>> the -I flags to the compiler.
>>
>>     
> I don't grok the extra_flags.txt generation mechanism, but here's the
> two lines I manually added to get the build to continue:
>   
Thanks for the patch. I've committed a change along those lines to SVN. 
It's in r14866.

Cheers,

Jelmer

Jeremy Allison | 2 Apr 2006 21:01
Picon
Favicon

Re: winbindd_pam.c open a NETLOGON pipe but never closes it?

On Sun, Apr 02, 2006 at 01:02:06PM +0300, Moshe Yosevshvili wrote:
> hi all.
> 
> I'm using samba 3.0.21c and i see in the code that in the call to:
> winbindd_dual_pam_auth_crap (winbindd_pam.c) there's a call to opening
> a NETLOGON pipe but the pipe is never closed. can't this cause a leak (open
> handles in the domain-controller)?

No, the pipe handles are pooled between uses in winbindd. Many
functions can open a netlogon pipe, and it will stay around
so long as the correction to the DC exists so each function
will reuse the same pipe.

Jeremy.

Tim Potter | 3 Apr 2006 01:12
Picon
Favicon

[PATCH] Fix dependencies in ldb subsystem

OK this isn't really a working patch, but I was wondering if anyone had
any better ideas on how to fix this problem.

Making ldb in to a library is a great idea, as it allows other
components within Samba to depend on ldb without bringing in any other
dependencies.  Unfortunately this is all messed up by the static modules
outside of ldb that end up pulling in other code.

I've started to try and tease this apart and have the subsystems that
have their own special ldb modules to register them by hand.  Hey jelmer
and metze, what do you think about this?

My goal is to create a swig interface to ldb within Samba, but the
static modules (wins, rootdse, etc) are getting in the way.

Tim.
Index: dsdb/samdb/samdb.c
===================================================================
--- dsdb/samdb/samdb.c	(revision 14869)
+++ dsdb/samdb/samdb.c	(working copy)
 <at>  <at>  -36,6 +36,15  <at>  <at> 
 #include "dsdb/samdb/samdb.h"
 #include "ads.h"

+int objectguid_module_init(void);
+int samldb_module_init(void);
+int ldb_samba3sam_module_init(void);
+int proxy_module_init(void);
(Continue reading)

Jelmer Vernooij | 3 Apr 2006 01:31
Picon

Re: [PATCH] Fix dependencies in ldb subsystem

Tim Potter wrote:
> OK this isn't really a working patch, but I was wondering if anyone had
> any better ideas on how to fix this problem.
>
> Making ldb in to a library is a great idea, as it allows other
> components within Samba to depend on ldb without bringing in any other
> dependencies.  Unfortunately this is all messed up by the static modules
> outside of ldb that end up pulling in other code.
>
> I've started to try and tease this apart and have the subsystems that
> have their own special ldb modules to register them by hand.  Hey jelmer
> and metze, what do you think about this?
>
> My goal is to create a swig interface to ldb within Samba, but the
> static modules (wins, rootdse, etc) are getting in the way.
>   
Are you sure that what you want isn't shared modules instead? Have you 
tried running ./configure.developer --enable-dso? That should be the 
default once we fix all corner cases :-)

Cheers,

Jelmer

Tim Potter | 3 Apr 2006 02:15
Picon
Favicon

Re: [PATCH] Fix dependencies in ldb subsystem

On Mon, Apr 03, 2006 at 01:31:52AM +0200, Jelmer Vernooij wrote:

> >I've started to try and tease this apart and have the subsystems that
> >have their own special ldb modules to register them by hand.  Hey jelmer
> >and metze, what do you think about this?
> >
> >My goal is to create a swig interface to ldb within Samba, but the
> >static modules (wins, rootdse, etc) are getting in the way.
> 
> Are you sure that what you want isn't shared modules instead? Have you 
> tried running ./configure.developer --enable-dso? That should be the 
> default once we fix all corner cases :-)

Yep - that looks like exactly what I want.  Thanks!  I don't suppose you
could take a quick look at what I have done with scripting/config.mk?

I've written it up by hand and I don't think that's the best way to fit
it in to the current build system.

Tim.

Jelmer Vernooij | 3 Apr 2006 02:53
Picon

Re: [PATCH] Fix dependencies in ldb subsystem

Tim Potter wrote:
> On Mon, Apr 03, 2006 at 01:31:52AM +0200, Jelmer Vernooij wrote:
>   
>>> I've started to try and tease this apart and have the subsystems that
>>> have their own special ldb modules to register them by hand.  Hey jelmer
>>> and metze, what do you think about this?
>>>
>>> My goal is to create a swig interface to ldb within Samba, but the
>>> static modules (wins, rootdse, etc) are getting in the way.
>>>       
>> Are you sure that what you want isn't shared modules instead? Have you 
>> tried running ./configure.developer --enable-dso? That should be the 
>> default once we fix all corner cases :-)
>>     
> Yep - that looks like exactly what I want.  Thanks!  I don't suppose you
> could take a quick look at what I have done with scripting/config.mk?
>   
N/p, I've just updated it.

Btw, it looks like torture_tdb.py contains python2.4-specific code. It 
complained here about missing set() when run using python2.3

Cheers,

Jelmer

Tim Potter | 3 Apr 2006 03:11
Picon
Favicon

Re: [PATCH] Fix dependencies in ldb subsystem

On Mon, Apr 03, 2006 at 02:53:47AM +0200, Jelmer Vernooij wrote:

> >Yep - that looks like exactly what I want.  Thanks!  I don't suppose you
> >could take a quick look at what I have done with scripting/config.mk?
> 
> N/p, I've just updated it.

Thanks again.

> Btw, it looks like torture_tdb.py contains python2.4-specific code. It 
> complained here about missing set() when run using python2.3

Hrm.  I was wondering which Python features I should use.  At the moment
there is the set stuff which requires Python 2.4 as you say, and also
iterators which I think are Python 2.2.  I was hoping to be able to say
that the wrappers work with any of Python 2.x although there are really
useful bits and pieces in 2.2 and above.

Python 2.1 seems to be the oldest version on modern distros that I have
used.  What do you think?

Tim.


Gmane