Bug 8714 - smbcontrol can't find the pid file of winbindd because the later is created with a different name
Summary: smbcontrol can't find the pid file of winbindd because the later is created w...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.6.1
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 07:58 UTC by Matthieu Patou
Modified: 2012-05-31 19:23 UTC (History)
2 users (show)

See Also:


Attachments
Proposed solution to fix the problem (1.56 KB, patch)
2012-01-23 08:00 UTC, Matthieu Patou
no flags Details
Updated fix with SAFE_FREE added. (1.29 KB, patch)
2012-01-24 00:51 UTC, Jeremy Allison
metze: review+
Details
git-am fix for 3.6.next (1.76 KB, patch)
2012-02-23 00:35 UTC, Jeremy Allison
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Patou 2012-01-23 07:58:38 UTC
If winbind is not started with a configuration file called smb.conf, the pid file will be named <lock_dir>/winbind-<name_of_smb.conf>.pid.

smbcontrol only search for <lock_dir>/winbind.pid.
Comment 1 Matthieu Patou 2012-01-23 08:00:00 UTC
Created attachment 7249 [details]
Proposed solution to fix the problem
Comment 2 Matthieu Patou 2012-01-23 08:01:02 UTC
The attached patch fix the problem by having the same method for pid name calculation in pidfile_pid and in pidfile_create
Comment 3 Stefan Metzmacher 2012-01-23 09:39:44 UTC
Comment on attachment 7249 [details]
Proposed solution to fix the problem

This introduces a memory leak, some SAFE_FREE(name) calls are missing
Comment 4 Jeremy Allison 2012-01-24 00:51:59 UTC
Created attachment 7253 [details]
Updated fix with SAFE_FREE added.

Matthieu and Metze, how about this instead ?

Jeremy.
Comment 5 Stefan Metzmacher 2012-01-24 07:49:51 UTC
Comment on attachment 7253 [details]
Updated fix with SAFE_FREE added.

Looks good
Comment 6 Stefan Metzmacher 2012-01-24 08:08:09 UTC
Comment on attachment 7253 [details]
Updated fix with SAFE_FREE added.

Jeremy, please upload a git patch and assign to Karolin for 3.6.2
Comment 7 Matthieu Patou 2012-01-24 09:08:26 UTC
Attention with this patch make test fails on the s3's winbind test due to nmbd dropping GETDC request which are originating from the same ip as the nmbd server.
Comment 8 Stefan Metzmacher 2012-01-24 09:25:57 UTC
(In reply to comment #7)
> Attention with this patch make test fails on the s3's winbind test due to nmbd
> dropping GETDC request which are originating from the same ip as the nmbd
> server.

That's a different bug, which we already have if someone uses the default
smb.conf, right?

This just makes the behavior (maybe including bugs) consistent
between the case where we use the default smb.conf and the case
where we use a different config file. 

metze
Comment 9 Matthieu Patou 2012-01-24 18:33:00 UTC
Just try to make test with this patch and you will see that there is a problem.

The reason why this occurs is that with this patch, winbind is now able to find nmbd when running in make test (because nmbd is started with a server.conf configuration file) so it tries to get the DC via netbios calls and it fails because nmbd drops the request. Before this patch winbind in make test wasn't finding nmbd (because it looked for a different pid file) and so used another method to get the DC.
Comment 10 Karolin Seeger 2012-01-24 18:35:46 UTC
Metze, so this a showstopper for 3.6.2?
Comment 11 Jeremy Allison 2012-01-24 18:42:02 UTC
No - this is not a showstopper for 3.6.2 (IMHO). It only affects sites where smb.conf isn't used for winbindd - not a large number.

Jeremy.
Comment 12 Karolin Seeger 2012-01-24 18:46:09 UTC
Metze, so this a showstopper for 3.6.2?(In reply to comment #11)
> No - this is not a showstopper for 3.6.2 (IMHO). It only affects sites where
> smb.conf isn't used for winbindd - not a large number.
> 
> Jeremy.

Thanks for your feedback, Jeremy! :-)
Comment 13 Jeremy Allison 2012-01-24 22:16:55 UTC
Yeah, can't check this in until I can resolve the "make test" issue..
Comment 14 Stefan Metzmacher 2012-01-25 02:40:32 UTC
I think we can leave this for 3.6.3.
Comment 15 Matthieu Patou 2012-02-05 21:40:29 UTC
Patch pushed to master: 9b43ad4fcac1eb6796973336c5614b18a054080d
Comment 16 Jeremy Allison 2012-02-23 00:35:51 UTC
Created attachment 7339 [details]
git-am fix for 3.6.next
Comment 17 Stefan Metzmacher 2012-05-30 11:33:12 UTC
Comment on attachment 7339 [details]
git-am fix for 3.6.next

Looks good
Comment 18 Stefan Metzmacher 2012-05-30 11:33:38 UTC
Karolin, please pick this for the release
Comment 19 Karolin Seeger 2012-05-31 19:23:00 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!