Bug 10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind
Summary: source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 4.0.7
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 18:50 UTC by shawn.starr@rogers.com
Modified: 2013-08-27 10:45 UTC (History)
0 users

See Also:


Attachments
git-am fix for master. (917 bytes, patch)
2013-08-02 22:54 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description shawn.starr@rogers.com 2013-08-01 18:50:41 UTC
When using the sudo command with pam_winbind.so / winbind hooked up I get the following notice:

My samba build is as follows:

libpam-winbind_4.0.7+dfsg-1 (4.0.7+dfsg-1) from Debian experimental git repositories.

$ sudo bash
[sudo] password for spstarr:
no talloc stackframe at ../source3/lib/util.c:1493, leaking memory

From IRC:

[14:41] <spstarr_work> no talloc stackframe at ../source3/lib/util.c:1493, leaking memory
[14:41] <spstarr_work> leaky leaky (samba 4.0.7)
[14:42] <wanon> What tool is this called from ?
[14:43] <spstarr_work> sudo
[14:43] <spstarr_work> when using sudo (via pam_winbind.so)
[14:44] <wanon> Ah. the myhostname_upper() call there shouldn't be calling talloc_tos().
Comment 1 Jeremy Allison 2013-08-02 22:54:51 UTC
Created attachment 9105 [details]
git-am fix for master.

I think this should fix it. Can you test and confirm please ?

Thanks,

Jeremy.
Comment 2 Łukasz Trąbiński 2013-08-08 09:44:29 UTC
(In reply to comment #1)
> Created attachment 9105 [details]
> git-am fix for master.
> 
> I think this should fix it. Can you test and confirm please ?
> 
> Thanks,
> 
> Jeremy.

I have the same problem with 4.0.7-2 taken from FC19. I trying to compile
RPM packages including Your patch:


[1400/2615] Compiling source3/lib/sock_exec.c
Waf: Leaving directory `/root/rpmbuild/BUILD/samba-4.0.7/bin'
Build failed:  -> task failed (err #1):
        {task: cc util.c -> util_58.o}
make: *** [all] Error 1
Comment 3 Jeremy Allison 2013-08-26 18:46:11 UTC
Fix already in master - reviewed by Simo and Jeremy. Re-assigning to Karolin for inclusion in 4.0.next and 4.1.0.

Cherry-pick for 4.0.next and 4.1.0 using:

git cherry-pick -x 9423d5afb71e272298f4858d82f436e19ee2b07f

Jeremy.
Comment 4 Karolin Seeger 2013-08-27 07:37:16 UTC
(In reply to comment #3)
> Fix already in master - reviewed by Simo and Jeremy. Re-assigning to Karolin
> for inclusion in 4.0.next and 4.1.0.
> 
> Cherry-pick for 4.0.next and 4.1.0 using:
> 
> git cherry-pick -x 9423d5afb71e272298f4858d82f436e19ee2b07f
> 
> Jeremy.

Pushed to autobuild-v4-1-test and autobuild-v4-0-test.
Comment 5 Karolin Seeger 2013-08-27 10:45:42 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Fix already in master - reviewed by Simo and Jeremy. Re-assigning to Karolin
> > for inclusion in 4.0.next and 4.1.0.
> > 
> > Cherry-pick for 4.0.next and 4.1.0 using:
> > 
> > git cherry-pick -x 9423d5afb71e272298f4858d82f436e19ee2b07f
> > 
> > Jeremy.
> 
> Pushed to autobuild-v4-1-test and autobuild-v4-0-test.

Pushed to v4-1-test and v4-0-test.
Closing out bug report.

Thanks!