Bug 14908 - net ads status -P broken in a clustered environment
Summary: net ads status -P broken in a clustered environment
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Clustering (show other bugs)
Version: 4.15.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-16 15:48 UTC by Volker Lendecke
Modified: 2021-12-08 14:58 UTC (History)
2 users (show)

See Also:


Attachments
Patch (8.34 KB, text/plain)
2021-11-17 15:42 UTC, Volker Lendecke
no flags Details
Patch for 4.15 with cherry-pick info (8.99 KB, text/plain)
2021-11-18 09:14 UTC, Volker Lendecke
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lendecke 2021-11-16 15:48:42 UTC
-P looks at the wrong secrets.tdb when running clustered. cli_credentials_set_machine_account(), which is called from popt_common_credentials_callback(), only uses dbwrap_local_open(). For the source3/ utilities it must use db_open() that also looks at ctdb-based databases.
Comment 1 Volker Lendecke 2021-11-17 15:42:56 UTC
Created attachment 17000 [details]
Patch

This fixes the problem for me. Not sure we want this in master, to me the solution looks really ugly, but giving time constraints I don't have a better solution
Comment 2 Ralph Böhme 2021-11-17 16:46:30 UTC
Thanks for looking into this! It won't win us a price, but that seems to be the best thing we can do atm. :) Looks good to me, give me a test and I'd push the same second. :)

Andreas, maybe you want to take a look as well?
Comment 3 Jeremy Allison 2021-11-17 17:07:52 UTC
(In reply to Ralph Böhme from comment #2)

> give me a test and I'd push the same second. :)

Correct me if I'm wrong but it *has* a test, doesn't it ? :-).
Comment 4 Ralph Böhme 2021-11-17 17:41:14 UTC
Swooooooossssshhhhh..... the sound of a patchset being pushed to autobuild.
Comment 5 Samba QA Contact 2021-11-17 18:30:07 UTC
This bug was referenced in samba master:

9faa3173193ddcb95905993d960cc10d4366524e
d6270525699fbc856b217cf18ece7f1d063b144d
63c80f25da8829a7bd3244afea29c13f699efac1
cdc0268c1987f36ab400ea01df88d55c02dccfdb
Comment 6 Volker Lendecke 2021-11-18 09:14:43 UTC
Created attachment 17001 [details]
Patch for 4.15 with cherry-pick info
Comment 7 Volker Lendecke 2021-11-18 09:15:26 UTC
Comment on attachment 17000 [details]
Patch

7620e471b51
Comment 8 Ralph Böhme 2021-11-18 09:26:52 UTC
Reassigning to Jule for inclusion in 4.15.
Comment 9 Andreas Schneider 2021-11-18 19:33:18 UTC
Looks fine for me. Thanks for fixing!
Comment 10 Jule Anger 2021-11-19 06:44:17 UTC
Pushed to autobuild-v4-15-test.
Comment 11 Samba QA Contact 2021-11-19 08:25:13 UTC
This bug was referenced in samba v4-15-test:

3309ab5fa0245ca791e66c585c131abb82d24a8b
575e620ad6cf57634c3357f8677f8beaf7c12caa
f1c064e792ae1b9d3cc57380205246dc21e8bb3c
bf9fdf5b45531749d5e533fe91dd957d64f81d6b
Comment 12 Jule Anger 2021-11-19 09:07:06 UTC
Closing out bug report.

Thanks!
Comment 13 Samba QA Contact 2021-12-08 14:58:27 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.3):

3309ab5fa0245ca791e66c585c131abb82d24a8b
575e620ad6cf57634c3357f8677f8beaf7c12caa
f1c064e792ae1b9d3cc57380205246dc21e8bb3c
bf9fdf5b45531749d5e533fe91dd957d64f81d6b