1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

515 Commits

Author SHA1 Message Date
Stefan Metzmacher
475755ef9f s4:samba-tool: allow sys.exit(ret) to control the exit code
Some subcommands may use sys.exit(0), which shouldn't be reported
as an error to the caller.

metze
2012-09-11 08:23:55 +02:00
Björn Baumbach
d6428319d4 s4: samba_spnupdate: fix "if we are DNS server" check
We need to check if we have hasMasterNCs. If we are RODC we have
hasFullReplicaNCs instead of hasMasterNCs.

TODO: maybe check for hasFullReplicaNCs, too?

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-08-03 08:11:33 +02:00
Andrew Bartlett
02cbc3fbb6 s4-samba_upgradedns: Do not set DNS account for internal server
The internal DNS server does not need the samba-only NAME-dns
account.

Andrew Bartlett
2012-06-25 00:26:41 +10:00
Alexander Bokovoy
838435ab30 s4/scripting: in MIT build do not install samba-tool, it is not usable yet 2012-05-24 16:21:26 +02:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Amitay Isaacs
747e539ad0 samba-upgradedns: Use the correct magic incantation of sys.path.insert()
This replaces "bin/python" with the correct path for python libraries. The
pattern requires double quotes (") instead of single quotes (').

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue May 15 05:19:46 CEST 2012 on sn-devel-104
2012-05-15 05:19:46 +02:00
Amitay Isaacs
813557629f s4-upgradedns: Update serverdn with only the attributes that have changed
This fixes the issue of ldb 'Operations Error' when trying to modify
hasPartialReplicaNCs attribute.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue May  1 05:28:04 CEST 2012 on sn-devel-104
2012-05-01 05:28:03 +02:00
Matthieu Patou
89cb1a4676 samba_spnupdate: don't try to register DNS related SPN if we are not mastering the NC
For RW DC the impact is pretty small but for RODC the whole SPN set is
rejected by the target DC as RODC hasn't the right to register DNS SPN
if it is not mastering this NC.
2012-04-19 10:57:10 +02:00
Amitay Isaacs
13a4b72847 s4-upgradedns: Fix the fqdn for forest dns zone
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Apr  2 10:56:10 CEST 2012 on sn-devel-104
2012-04-02 10:56:10 +02:00
Amitay Isaacs
e36622f926 s4-upgradedns: Make sure the attribute exists before accessing it
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar 28 10:27:40 CEST 2012 on sn-devel-104
2012-03-28 10:27:40 +02:00
Matthias Dieter Wallnöfer
438971e214 LDB/s4 - do not use the "(dn=...)" syntax on filters anymore
Make it AD-compatible using "(distinguishedName=...)".

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-26 00:57:29 +02:00
Amitay Isaacs
b114043c46 s4-upgradedns: Add DNS partitions in msDS-hasMasterNCs in NTDS settings
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar 21 03:16:22 CET 2012 on sn-devel-104
2012-03-21 03:16:22 +01:00
Amitay Isaacs
8a39c5c3a1 s4-upgradedns: Allow fixing of dns provision after domain join
This change allows samba_upgradedns script to be run even on existing
dns provision (DLZ_BIND9 or SAMBA_INTERNAL) without any side effects.
This allows to "fix" dns provision after samba-tool domain join for
running BIND with DLZ plugin.
2012-03-21 11:41:50 +11:00
Matthieu Patou
eeec0d925e upgrade provision didn't run findprovisionrange anymore
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat Mar 17 09:51:46 CET 2012 on sn-devel-104
2012-03-17 09:51:46 +01:00
Matthieu Patou
552d223939 Rewrite findprovisionrange to use factorized functions 2012-03-17 00:19:09 -07:00
Jelmer Vernooij
441c214dda samba_dnsupdate: Mention contents of invalid line when encountering parsing error.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8809
2012-03-13 13:07:03 +01:00
Jelmer Vernooij
8b42801609 samba_dnsupdate: Raise proper exception when getting unexpected DNS reply. 2012-03-13 13:07:03 +01:00
Jelmer Vernooij
d87a24fe17 samba_dnsupdate: Use docstrings, which show up nicely in API docs. 2012-03-13 13:07:03 +01:00
Jelmer Vernooij
f5bb26edb3 upgradedns: Remove unused import. 2012-03-11 23:57:04 +01:00
Matthias Dieter Wallnöfer
a57d7ad772 s4:upgradeprovision - fix some output messages
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Mar 11 21:54:54 CET 2012 on sn-devel-104
2012-03-11 21:54:54 +01:00
Matthieu Patou
ddbca1cde6 s4-upgradeprovision: Add options to do a DB backup only and not to fix acls in sysvol 2012-03-07 22:42:24 +01:00
Jelmer Vernooij
122374e999 kcc: Improve formatting of Python code to be more consistent with our other code. 2012-03-04 18:02:06 +01:00
Amitay Isaacs
e5409ad0ca upgradedns: Fix import of TXT DNS records 2012-03-02 00:24:50 +11:00
Amitay Isaacs
0c4d1d6b19 upgradedns: Missing rename from upgradedns to samba_upgradedns
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Feb 28 10:06:03 CET 2012 on sn-devel-104
2012-02-28 10:06:03 +01:00
Jelmer Vernooij
8008228b94 samba.xattr: Massively simplify copytree_with_xattrs. 2012-02-27 03:52:05 +01:00
Jelmer Vernooij
2c9ff8a4d7 upgradeprovision: Only backup sysvol directory if it exists.
This is not the case for standalone installations.

Bug: https://bugs.launchpad.net/samba/+bug/930370
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8781
2012-02-27 03:52:05 +01:00
Jelmer Vernooij
f40c9ac7ac samba.xattr: Split copying of tree with extended attributes out into separate module. 2012-02-27 03:52:05 +01:00
Jelmer Vernooij
21f443eb82 provision: Leave result reporting up to caller. 2012-02-26 16:27:06 +01:00
Jelmer Vernooij
a1849da7c2 upgradedns: Rename to less generic name samba_upgradedns.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Feb 24 15:07:27 CET 2012 on sn-devel-104
2012-02-24 15:07:25 +01:00
Amitay Isaacs
20b79c3ea3 upgradedns: Upgrade DNS provision from BIND9_FLATFILE to AD based DNS
This script can be used to convert provision from BIND9_FLATFILE to
BIND9_DLZ or SAMBA_INTERNAL dns backends. In addition, the script
migrates the DNS data in zone file (if available).

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Feb 21 14:50:10 CET 2012 on sn-devel-104
2012-02-21 14:50:09 +01:00
Amitay Isaacs
1f0298dd1b python: Change except: statement to except Exception:
This way we only catch true exceptions and keyboard interrupts
are not caught here.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Jan 24 03:32:40 CET 2012 on sn-devel-104
2012-01-24 03:32:40 +01:00
Dave Craft
ab1f896c51 KCC importldif/exportldif and intersite topology
Add options for extracting an LDIF file from a database
and reimporting the LDIF into a schema-less database for
subsequent topology test/debug.  Add intersite topology
generation with computation of ISTG and bridgehead servers

Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Jan 14 07:45:11 CET 2012 on sn-devel-104
2012-01-14 07:45:11 +01:00
Matthieu Patou
f66ef5cfbc upgradeprovision: do not hold references to messageElements
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Tue Jan  3 08:20:02 CET 2012 on sn-devel-104
2012-01-03 08:20:02 +01:00
Matthieu Patou
3213d1e0b7 upgradeprovision: treat provision without oem attribute as quite recent, it's provision that comes from Windows replication 2012-01-03 06:47:10 +01:00
Dave Craft
819f11285d samba_kcc NTDSConnection translation
This is an advancement of samba_kcc to compute and
commit the modification of a repsFrom on an NC Replica.
The repsFrom is computed according to the MS tech spec
for implied replicas of NTDSConnections.  Proper maintenance
of (DRS options, schedules, etc) from a NTDSConnection are now
all present.  New classes for inter-site transports, sites,
and repsFrom) are now present in kcc_utils.py.  Substantively
this gets intra-site topology generation functional by committing
the repsFrom that were computed from the DSA graph implemented in
prior drops of samba_kcc

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-12-08 11:48:17 +11:00
Andrew Bartlett
650bd5e718 s4-dnsupdate: Do not attempt to add the PDC names if we are not a PDC 2011-12-07 03:09:08 +01:00
Matthias Dieter Wallnöfer
179bf9b51c s4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter
This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:34:58 +01:00
Andrew Tridgell
b16f539e0e s4-dns: added --no-credentials option to samba_dnsupdate
this is for a user who is doing DNS updates via key files rather than
GSSAPI. This allows the update to go through without a kerberos error

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Nov 22 06:34:59 CET 2011 on sn-devel-104
2011-11-22 06:34:59 +01:00
Stefan Metzmacher
e6a9e1dda9 s4:dsdb/pydsdb: pass down schema_dn to _dsdb_set_schema_from_ldif()
metze
2011-11-15 09:46:26 +01:00
Jelmer Vernooij
f0117237fa Fix default value for subunitrun --list.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov 14 17:27:03 CET 2011 on sn-devel-104
2011-11-14 17:27:02 +01:00
Jelmer Vernooij
11a77fe2d7 subunitrun: Don't load smb.conf when just listing tests. 2011-11-14 15:49:36 +01:00
Jelmer Vernooij
ad40581142 subunitrun: Add notes about subunitrun being deprecated. 2011-11-10 23:37:04 +01:00
Jelmer Vernooij
ae88d7390b Revert "test: added -D option to subunitrun"
This reverts commit ac0bba2ea1.

"python -m subunit.run" is the preferred way of running tests to
generate subunit. I also don't want to move too far away from
the standard test running infrastructure for python so that
other test runners (nosetests, trial, tribunal, ...) can be used with
Samba code.
2011-11-10 23:37:04 +01:00
Andrew Tridgell
ac0bba2ea1 test: added -D option to subunitrun
this allows for:

 subunitrun -D lib/ldb/tests/python api

which makes this easier for developers
2011-11-10 14:24:21 +11:00
Jelmer Vernooij
b8efff57dc samba_kcc: Remove unnecessary return statements. 2011-11-07 02:04:52 +01:00
Andrew Tridgell
f0ae7e1916 kcc: fixed program name
kcccompute -> samba_kcc
2011-11-07 10:02:45 +11:00
Andrew Tridgell
eb9c35cbb7 kcc: fixed tabs/spaces in kcc python implementation
as spotted by autobuild
2011-11-07 10:02:45 +11:00
Dave Craft
d85b6edf8c samba_kcc addtion
Scaffolding and initial implementations of
portions of the KCC in python.  This code currently
properly computes the graph nodes for the intrasite
topology as well as enumerating all steps for a full
run of the KCC.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-07 10:02:45 +11:00
Andrew Tridgell
43e5592e9a subunitrun: give more useful help
give some examples and more useful description for subunitrun command

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-10-20 04:23:07 +02:00
Jelmer Vernooij
9e1ef61b34 samba-tool: Move main command implementation to samba.netcmd.main, so it is accessible by the testsuite. 2011-10-14 00:22:57 +02:00
Jelmer Vernooij
63c9186e92 netcmd: Add errf stream to command instances. 2011-10-13 00:23:39 +02:00
Matthias Dieter Wallnöfer
9c979e88dc s4:findprovisionusnranges - the default python path is detected over "env"
Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct  8 13:06:20 CEST 2011 on sn-devel-104
2011-10-08 13:06:20 +02:00
Andrew Tridgell
73f2df6a37 s4-dns: started adding support for auto-creation of NS glue record
when we create a new subdomain we need to create a NS glue record in
the parent domain pointing at our subdomain
2011-09-22 10:00:48 +10:00
Jelmer Vernooij
df1d3dc777 s4-python: Consistently use spaces rather than tabs, fix headers in several places. 2011-09-13 02:24:03 +02:00
Amitay Isaacs
b2a7fe166c samba-tool: Correctly handle sys.exit() called from subcommand
Catch SystemExit exception if any subcommand calls sys.exit()
and return with failure (-1).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09 15:24:04 +10:00
Giampaolo Lauria
62379dde23 samba-tool: Removed "acl" command
Removed "acl" command as it has been changed to:
"dsacl" and "ntacl"

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09 15:24:02 +10:00
Giampaolo Lauria
6484e142dc samba-tool: Added "ntacl" command
Added "ntacl" command to substitute "acl nt" command

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09 15:24:02 +10:00
Giampaolo Lauria
7a609d827e samba-tool: Added "dsacl" command
Added "dsacl" command to substitute "acl ds"

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09 15:24:02 +10:00
Giampaolo Lauria
fb5e27e4c8 samba-tool: Moved command definition to sambatool command
Moved subcommand definition from __init__.py to cmd_sambatool class

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09 15:24:01 +10:00
Giampaolo Lauria
f5e173284a samba-tool: Redefined samba-tool as a SuperCommand
Removed MainCommand class as samba-tool is a SuperCommand
Redefined samba-tool as a SuperCommand
Fixed error handling in SuperCommand _run

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09 15:24:01 +10:00
Jelmer Vernooij
4240509ebf samba-tool: Avoid use of "except .. as" construction introduced in python2.6.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Sep  8 00:34:22 CEST 2011 on sn-devel-104
2011-09-08 00:34:22 +02:00
Amitay Isaacs
7a8565fc59 samba3dump: Update the code using modified samba3 module with passdb api
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 13:32:11 +10:00
Andrew Tridgell
08b2aa0843 s4-dns: cope with duplicate entries in dns_update_list
this is needed for when DNSFOREST and DNSDOMAIN are the same

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:39 +10:00
Andrew Tridgell
717706cb96 s4-dns/spn: fixed DNS and SPN scripts to setup forest DNS name 2011-08-25 07:39:38 +10:00
Andrew Tridgell
33fb1f85df s4-spnupdate: fixed searches on domain NC
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Andrew Tridgell
b6e1887002 s4-dns: fixed base search on domain NC
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Matthieu Patou
2d23dff49b s4-upgradeprovision: try to fix the detection of @provision record
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Aug  1 13:43:50 CEST 2011 on sn-devel-104
2011-08-01 13:43:50 +02:00
Amitay Isaacs
48d905f281 samba-tool: Catch exceptions at top-level and exit with correct return value
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:52 +10:00
Amitay Isaacs
e79040cc72 samba-tool: Display usage for main commands and list them alphabetically
This makes the MainCommand class similar to SuperCommand class in netcmd.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:52 +10:00
Amitay Isaacs
02667cbe26 samba-tool: Replace C version of samba-tool with python version
C version of samba-tool is now called samba-tool-c, which will be
removed as soon as all the samba-tool commands are ported to python.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:52 +10:00
Matthieu Patou
5f1f153998 s4-upgradeprovision: Detect recent provision in a more reliable way 2011-07-26 23:34:24 +02:00
Jelmer Vernooij
845d5add3c scripting/bin: Some formatting fixes. 2011-07-23 22:08:08 +02:00
Matthieu Patou
9117a2fa3c samba_backup: check that directory really exists 2011-07-21 11:44:35 +10:00
Andrew Tridgell
2087eb1602 ldb: use base searches for @ special DNs
subtree searches on these DNs don't work any more

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Matthieu Patou
e3fef4db0f upgradeprovision: reduce the number of attribute that we skip
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Jelmer Vernooij
a61176900f rebuildexetendeddn: PEP8: Use spaces rather than tabs.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Jun 30 12:07:32 CEST 2011 on sn-devel-104
2011-06-30 12:07:32 +02:00
Jelmer Vernooij
6dbe3e3600 rpcclient: PEP8: Use spaces rather than tabs. 2011-06-30 10:55:26 +02:00
Jelmer Vernooij
a67683eb6d smbstatus: PEP8: Use spaces rather than tabs. 2011-06-30 10:55:26 +02:00
Jelmer Vernooij
e4e9c5d140 mischema: Remove unused import. 2011-06-30 10:55:26 +02:00
Jelmer Vernooij
ac28c8216f enablerecyclebin: Remove unused imports, fix formatting. 2011-06-30 10:55:26 +02:00
Matthieu Patou
249fbd8a33 s4-samba_dnsupdate: set environment via the env parameter
I faced a situation where the os.environ("KRB5CCNAME") = ... didn't
seems to be effective
2011-06-22 20:13:08 +02:00
Matthieu Patou
c2dfaa2580 s4-upgradeprovision: Don't forget to populate the non replicated objects, and don't touch rIDPreviousAllocationPool 2011-06-22 20:13:08 +02:00
Matthieu Patou
01ce078ed1 s4-upgradeprovision: propose the use of findprovisionranges if no ranges are present
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jun 20 00:30:59 CEST 2011 on sn-devel-104
2011-06-20 00:30:59 +02:00
Matthieu Patou
957b1ff183 s4: create script to find provision ranges for old provision without this information 2011-06-19 23:21:09 +02:00
Matthieu Patou
8a19e1ecfb s4-upgradeprovision: skip versionNumber, it's used by GPO 2011-06-19 23:21:08 +02:00
Matthieu Patou
05b2d4147a s4-upgradeprovision: deltaattr can be empty or none too 2011-06-19 23:21:08 +02:00
Matthieu Patou
5e81ee8b34 s4-upgradeprovision: Rework completly how SDs are recalculated 2011-06-19 23:21:08 +02:00
Matthieu Patou
c0eb403758 s4-upgradeprovision: remove useless comment 2011-06-19 23:21:08 +02:00
Matthieu Patou
bc7b8fa108 s4-upgradeprovision: ignore objectSid 2011-06-19 23:21:08 +02:00
Matthieu Patou
f7a903ee80 s4-upgradeprovision: add a list of attribute that are not DSDB attribute that we don't want to copy 2011-06-19 23:21:08 +02:00
Matthieu Patou
930d2f28c9 s4-upgradeprovision: if there is nothing to really modify then skip it 2011-06-19 23:21:08 +02:00
Matthieu Patou
0e72914925 s4-upgradeprovision: dn must be skipped as delta.remove("dn") do not remove this attribute 2011-06-19 23:21:08 +02:00
Matthieu Patou
f76c206e2f s4-upgradeprovision: change hashAttrNotCopied to be an array 2011-06-19 23:21:08 +02:00
Matthieu Patou
4305f54b8e s4-upgradeprovision: fix inverted logic and wrong flags on sd_flags control 2011-06-19 23:21:08 +02:00
Matthieu Patou
01758595e3 s4-upgradeprovision: remove useless code 2011-06-19 23:21:08 +02:00
Matthieu Patou
44c5406252 s4-upgradeprovision: don't print dn in the list of modified attributes 2011-06-19 23:21:08 +02:00
Matthieu Patou
9a18e07b4f s4-upgradeprovision: clean up, reformating and update docs 2011-06-19 23:21:08 +02:00
Matthieu Patou
20233cdf53 s4-upgradeprovision: introduce invocation id in lastprovisionUSNs 2011-06-19 23:21:08 +02:00
Matthieu Patou
71ab462c81 s4-upgradeprovision: add function to know if attribute is replicated or not 2011-06-19 23:21:08 +02:00
Matthieu Patou
d9abcc9384 s4-upgradeprovision: split update_present in two functions depending on the method used
In order to make the function a bit more clearer and with less depth,
the selection of attribute that are not updated is split in two
functions depending on the fact that we are using mainly
replPropertyMetadata to make our choice or if we are using the list of
attributes that should, could or shouldn't be updated/created/deleted.
2011-06-19 23:21:08 +02:00
Matthieu Patou
0065742909 s4-upgradeprovision: handle_special_attributes don't really need ranges of USNs, just the information if we are using replPropertyMetadata for attribute selection 2011-06-19 23:21:08 +02:00
Matthieu Patou
b14bdf431b s4-upgradeprovision: Fix an error, so that cursddl and refsddl are not the same
Thanks to Dirk Paulli for pointing it with his bug report.
2011-06-19 23:21:07 +02:00
Andrew Tridgell
a58e69a734 s4-dns: fixed samba_tool -> samba-tool 2011-06-07 15:48:42 +10:00
Andrew Bartlett
1565da7694 s4-param Remove 'secrets database' parameter
This is now just secrets.ldb in the private dir, which remains.
2011-06-06 15:02:39 +10:00
Andrew Bartlett
c091a92be5 s4-param Remove 'sam database' parameter
This now just relies on the private dir parameter, which remains.

Andrew Bartlett
2011-06-06 15:02:38 +10:00
Andrew Tridgell
473b344699 s4-script: install some of the samba scripts in bin/ during build 2011-06-06 12:26:11 +10:00
Andrew Tridgell
0e1d7eb429 s4-testparm: testparm is now part of samba_tool 2011-06-06 12:26:11 +10:00
Andrew Tridgell
c4e43f9dff s4-ipv6: don't add link local addresses to DNS
these make no sense as DNS addresses
2011-06-06 12:26:10 +10:00
Andrew Tridgell
7d59e9c549 s4-ipv6: added IPv6 support to samba_dnsupdate 2011-06-06 12:26:10 +10:00
Matthieu Patou
a0db60d3ea Add a script for renaming a DC 2011-05-21 08:41:07 +02:00
Matthieu Patou
6071ed67bf s4-python: move function find_provision_key_parameters to provision namespace as it can be used not only for upgradeprovision 2011-05-21 08:41:07 +02:00
Matthieu Patou
d24a22fe9a s4-python: add an option for just fixing gpo folders 2011-05-17 00:31:09 +02:00
Andrew Bartlett
17fe5e0ca4 s4-samba_dnsupate Fix syntax error
This particular sub-part of the script isn't tested in 'make test' due
to it making real changes to DNS.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr  7 08:51:11 CEST 2011 on sn-devel-104
2011-04-07 08:51:11 +02:00
Andrew Bartlett
36029a0343 samba_dnsupdate: Don't use subprocess.check_call, it isn't in python 2.4
RHEL5 and clones use python 2.5
2011-04-07 14:35:36 +10:00
Andrew Tridgell
6d0be9e3d1 s4-test: fixed a problem with very verbose NDR debug
lp.get("log level") returns a string, not an integer. It needs to be
cast to an integer for comparison with a number

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr  6 08:58:05 CEST 2011 on sn-devel-104
2011-04-06 08:58:05 +02:00
Andrew Tridgell
949427c208 python: use os.environ[] instead of os.putenv()
using os.putenv() causes too much confusion, as it doesn't update
os.getenv()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-22 02:51:10 +01:00
Michael Wood
877e0ef5f2 s4/upgradeprovision: Fix help for --debugguess.
Signed-off-by: Matthieu Patou <mat@matws.net>

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Feb 13 16:38:13 CET 2011 on sn-devel-104
2011-02-13 16:38:13 +01:00
Michael Wood
249ba1ed11 s4/upgradeprovision: Typo and better word.
Signed-off-by: Matthieu Patou <mat@matws.net>
2011-02-13 17:49:01 +03:00
Michael Wood
7db5c10f1a s4: samba_backup: Fix typos.
Signed-off-by: Matthieu Patou <mat@matws.net>
2011-02-13 17:45:05 +03:00
Andrew Tridgell
1f533bff17 s4-provision: added setup_path() import in two more places
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 13:22:02 +11:00
Andrew Bartlett
d1e5a73806 s4-provision Remove setup_path, setup_dir and find_setup_dir
We now have a reliable way to know the current location of the
templates: dyn_SETUPDIR, which is updated for both the in-build and
installed binaries.

This replaces the function arguments and the distributed resolution of
the setup directory with one 'global' function (imported as required).

This also removes the ability to specify an alternate setup directory
on the command line, as this was rarely if ever used and never tested.

Andrew Bartlett
2011-02-07 13:22:01 +11:00
Michael Wood
3a14c97459 s4: upgradeprovision: Improve wording, punctuation
Signed-off-by: Matthieu Patou <mat@matws.net>

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat Jan  8 00:25:08 CET 2011 on sn-devel-104
2011-01-08 00:25:08 +01:00
Jelmer Vernooij
26c8a520f3 upgradeprovision: Fix use of dict.get().
Avoid modifying list while iterating over it.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Jan  5 03:37:35 CET 2011 on sn-devel-104
2011-01-05 03:37:35 +01:00
Jelmer Vernooij
10441ed83d subunitrun: Use unittest.TestProgram if subunit.TestProgram is not
available.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Dec 10 03:49:03 CET 2010 on sn-devel-104
2010-12-10 03:49:03 +01:00
Jelmer Vernooij
636d8cfb42 s4-python: Add convenience function for forcibly importing bundled
package.
2010-12-10 03:04:06 +01:00
Jelmer Vernooij
bdf5a49cec subunitrun: Extend hack to cope with older system subunit run installs. 2010-12-10 03:04:06 +01:00
Jelmer Vernooij
b1daa50293 subunitrun: Remove global subunit module when reimporting from a
different location.
2010-12-10 03:04:06 +01:00
Jelmer Vernooij
4571b94e7b s4-python: Split up ensure_external_module. 2010-12-10 03:04:06 +01:00
Jelmer Vernooij
069ff146cb subunitrun: Support --list. 2010-12-10 03:04:06 +01:00
Andrew Bartlett
8dd3013208 s4-param Allow +foo syntax in smb.conf list parsing
The idea here is to allow an smb.conf file to work from the defaults,
rather than override them.  For example, 'server services = +openchange'.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Dec  8 09:39:06 CET 2010 on sn-devel-104
2010-12-08 09:39:06 +01:00
Björn Jacke
f62972b761 s4/scripting/ktpass: make shell code portable and eliminate another bash requirement
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Dec  2 11:20:42 CET 2010 on sn-devel-104
2010-12-02 11:20:42 +01:00
Andrew Tridgell
1286f53455 s4-dns: catch all DNS exceptions in samba_dnsupdate 2010-12-01 00:14:40 +01:00
Andrew Tridgell
3f952aba2b s4-spnupdate: only enable NDR print at log level above 5 2010-11-18 23:12:25 +01:00
Andrew Tridgell
1ce223017d s4-dns: added support for --fail-immediately for RODC netlogon dns updates 2010-11-18 23:12:25 +01:00
Andrew Tridgell
60449d561d s4-dns: catch more expections in samba_dnsupdate 2010-11-17 23:55:38 +11:00
Andrew Tridgell
e409db9da1 s4-dns: added --fail-immediately option to samba_dnsupdate
this is useful for manual testing
2010-11-15 21:47:38 +11:00
Andrew Tridgell
deaf7e5995 s4-dns: fixed registration of multiple IPs in samba_dnsupdate
bitten by python object references again!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-15 21:47:38 +11:00
Matthias Dieter Wallnöfer
ac0dcd1e07 s4:upgradeprovision - why not directly use "provision:0"? 2010-11-13 12:33:26 +01:00
Matthieu Patou
24477cacc9 ktpass: also use userPrincipalName for locating the principal
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Nov 12 20:24:23 UTC 2010 on sn-devel-104
2010-11-12 20:24:23 +00:00
Matthieu Patou
f4e9f125e0 ktpass: fix the search path for when running in samba's source dir 2010-11-12 19:40:21 +00:00
Matthieu Patou
5a6f3f14fb Fix typo 2010-11-12 19:40:21 +00:00
Matthieu Patou
81eb7985e6 upgradeprovision: use relaxed control while adding missing object container 2010-11-12 19:40:21 +00:00
Matthieu Patou
a9c430bdd2 upgradeprovision: fix pb with dns-hostname, regenerate a correct keytab 2010-11-12 19:40:21 +00:00
Matthieu Patou
8227d1f68e upgradeprovision: use the relax/(upgrade)provision when modifying object
For certain attribute we use the relax/provision control so that we
try to respect checks as this is not a good idea to always force
unwanted behavior.
2010-11-12 19:40:21 +00:00
Matthieu Patou
757764ab1b upgradeprovision: use the (upgrade)provision control also 2010-11-12 19:40:21 +00:00
Matthieu Patou
add39bc40b upgradeprovision: update revision for forestupdate and domainupdate objects 2010-11-12 19:40:21 +00:00
Matthieu Patou
d1feb03889 Add a script to make backup of samba provision 2010-11-12 19:40:21 +00:00
Andrew Tridgell
e59bf5efb5 s4-join: modify join behaviour according to domain level
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Nov  7 23:32:16 UTC 2010 on sn-devel-104
2010-11-07 23:32:16 +00:00
Matthias Dieter Wallnöfer
c89bc8394d s4:upgradeprovision - remove some "recalculate_sd" uses
We need "recalculate_sd" only when no external "nTSecurityDescriptor" change
is performed. Otherwise the recalculation is performed automatically.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 18:52:42 UTC 2010 on sn-devel-104
2010-11-07 18:52:42 +00:00
Matthias Dieter Wallnöfer
971ce6c5ed s4:scripting/bin/samba_spnupdate - also support adding all possible "servicePrincipalName"s 2010-10-31 18:44:06 +00:00
Andrew Bartlett
4d9b12ae8f s4-provision Remove serverdn parameter from Schema()
We don't need to know the server DN here any more, and it
makes no sense for many callers.

Andrew Bartlett
2010-10-19 18:57:00 +11:00
Matthias Dieter Wallnöfer
dda6c354f6 s4:dsdb python stuff - introduce also here the "show_recycled" control
But also here beside "show_deleted" to not loose compatibility with older
provisions.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-10-03 15:23:18 +00:00
Andrew Tridgell
694f2876c9 s4-spn: don't try and send an empty SPN list
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-30 20:11:15 -07:00
Andrew Tridgell
92586abac0 s4-dns: send A record updates via TKEY 2010-09-30 00:59:16 +00:00
Andrew Tridgell
31310826e0 s4-spnupdate: when we are a RODC we need to use the WriteSPN DRS call
we can't do SPN updates via sam writes and replication, as the sam is
read-only
2010-09-29 03:55:04 +00:00
Andrew Tridgell
06022dad70 s4-kerberos: use TZ=GMT when we are invoking krb5 code in helpers
Our helper scripts can fail on Fedora with the PDT timezone (Western
USA). This is the same issue we found with Heimdal earlier today, the
24 second difference between GMT and UTC, but this time in MIT
Kerberos as linked into bind9.

By forcing TZ=GMT in these scripts we avoid the problem

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-29 03:55:04 +00:00
Andrew Tridgell
6237d56027 s4-dns: added --update-list option to samba_dnsupdate
this allows us to use it for RODC netlogon updates
2010-09-27 22:55:05 -07:00
Andrew Tridgell
a40dcd161c s4-dns: use the generated krb5.conf in samba_dnsupdate
this gives one less thing that an admin can get wrong

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 27 02:35:29 UTC 2010 on sn-devel-104
2010-09-27 02:35:29 +00:00
Andrew Tridgell
f3ceec9b1b s4-spn: don't try to do SPN updates as a RODC
we don't have the permissions to do it
2010-09-26 06:29:06 +00:00
Matthieu Patou
c680a42504 upgradeprovision: fix a typo 2010-09-26 06:22:43 +04:00
Matthieu Patou
873bd98904 upgradeprovision: Fix a bug with renamed entries
The SD was not refetched for renamed entries, resulting with a try to
add an additional SD when there was already one.
2010-09-26 06:22:43 +04:00
Matthieu Patou
43274c9071 upgradeprovision: fix a bug with not updated links 2010-09-26 06:22:43 +04:00
Matthieu Patou
76d87b7fb5 s4 upgradeprovision: fix a bug with empty reference objects
Thanks to lukas@eecs.qmul.ac.uk for poiting it to me
2010-09-26 06:22:43 +04:00
Matthieu Patou
3c95d4d313 s4 upgradeprovision: Copy versionNumber if not present it helps to make gpo valid 2010-09-26 06:22:43 +04:00
Andrew Tridgell
8beed3679d s4-dns: fixed the dns_domain_info_type for netlogon DNS calls
w2k8r2 does check this field (WSPP docs need an update)
2010-09-19 13:36:02 -07:00
Andrew Tridgell
6642ae9703 s4-dns: added --all-names option to samba_dnsupdate
this forces the re-registration of all names
2010-09-19 13:36:02 -07:00
Andrew Tridgell
f6fa73bbd3 s4-rodc: added RODC DNS update support to samba_dnsupdate
for DNS updates that have a netlogon equivalent, send via netlogon
2010-09-19 11:29:32 -07:00
Andrew Tridgell
7e729c4f6a s4-dns: use a non-forwardable ticket in samba_dnsupdate
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 16:08:46 +10:00
Matthieu Patou
49321571ea upgradeprovision: avoid working with None objects ... 2010-09-05 12:29:21 +04:00
Matthieu Patou
b153558210 upgradeprovision: do not try to remove/change attribute before the RID Set object is present 2010-09-05 12:29:21 +04:00
Matthieu Patou
13d575d6e3 upgradeprovision: cleanup 2010-09-05 12:29:20 +04:00
Matthieu Patou
1d0815281e s4 upgradeprovision: add dns_update_list if missing 2010-09-05 12:29:20 +04:00
Matthieu Patou
ed51bf5f68 s4 upgradeprovision: exit with a non null return code so that it can be trapped in blackbox tests 2010-08-19 15:59:05 +04:00
Matthieu Patou
a5653bcf83 s4 upgradeprovision: add more attrbutes the ignore list
Also format in a pretty way the int64 ranges
2010-08-19 15:59:05 +04:00
Matthieu Patou
e378d7fd89 s4 upgradeprovision: Deal with bootstrap indexing attribute to avoid useless reindexing 2010-08-19 15:59:05 +04:00
Matthieu Patou
d79a5cc358 s4 upgradeprovision: Add a function for schema reloading
Full schema reloading is needed when we modify exisiting elements that
have attributes that comes from not from the default schema (ie.
openchange schema, user schema ..)
2010-08-19 15:59:04 +04:00
Matthieu Patou
3e49b20cf0 s4 upgradeprovision: Fixes for increment_keyversion
fix
2010-08-19 15:59:04 +04:00
Matthieu Patou
503824b757 s4 upgradeprovision: fix a typo and pass correct parameter to increment_calculated_keyversion 2010-08-19 15:59:04 +04:00
Matthieu Patou
7b41969603 s4 upgradeprovision, fix a typo preventing the ridset to be correctly identified 2010-08-10 00:57:20 +04:00
Matthieu Patou
5a8c77f97b s4: create a simple version of ktpass
This script is intended to be a replacement for the ktutil of Windows.
It's use is for exporting keytab that will be used for kerberized
services.
2010-07-17 17:56:16 +04:00
Matthieu Patou
36b5feceee s4 upgradeprovision: Adapt the list of attribute modified
* isMemberOfPartialAttributeSet is now allowed to be deleted (on schema
 objects)
* attributeDisplayNames is now allowed to be added and modified (used on
  display specifiers)
* spnMapping is now allowed to be altered on Directory Service objects
* minPwdAge is now modified if the previous value was 0

We issue a clear information about the userControl attribute for
administrator to invite the user to modify himself the value.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
7478224189 s4 upgradeprovision: Synchronize the calculated keyversionnumber with the one previously stored
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
0a1b1121c4 s4 upgradeprovision: do not copy RID Set it's automaticaly created by the RID manager
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
2afc2f20b6 s4 upgradeprovision: add function to backup the provision before updating
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
6c51b3a432 s4 upgradeprovision: fix whitespaces
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
fd2eb0dfd0 s4 provision: move update_machine_account_password to helpers
This is to allow reuse of this function and also unit tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
61be498adb s4 upgradeprovision: For SID > 1000 do not copy them, let the system regenerated a new one
This should avoid colliion with newly added objects that use the same
SID as existing users in the upgraded provision.

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-07-08 19:28:42 +02:00
Endi S. Dewata
7cb98a0cdc s4/spnupdate: Fixed spnupdate to use secrets credentials when accessing SamDB.
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-06-28 19:33:47 +02:00
Andrew Tridgell
4cb423f527 s4-python: python is not always in /usr/bin
Using "#!/usr/bin/env python" is more portable. It still isn't ideal
though, as we should really use the python path found at configure
time. We do that in many places already, but some don't.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-24 18:46:57 +10:00
Matthias Dieter Wallnöfer
560620a53d s4:upgradeprovision - fix include order for "ldb"
Patch originally posted on the list by Matthieu Patou.
2010-06-24 10:04:52 +02:00
Matthieu Patou
32f82fbec0 s4 upgradeprovision: fix the logging stuff so that it actually log
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-21 23:11:50 +02:00
Jelmer Vernooij
7b32f65600 testparm: Check netbios name and workgroup characters and length. 2010-06-20 15:04:42 +02:00
Jelmer Vernooij
237ab66f6c selftest: Use scripted testparm. 2010-06-20 14:14:47 +02:00
Jelmer Vernooij
08a3e8b9f4 testparm: Simplify default option handling. 2010-06-20 13:51:39 +02:00
Jelmer Vernooij
f0ab4503d6 testparm: Fix suppress prompt option. 2010-06-20 13:47:36 +02:00
Jelmer Vernooij
c0e9a41f67 testparm: Fix exit value, install. 2010-06-20 13:41:38 +02:00
Jelmer Vernooij
74c66c9a3f s4-python: Implement LoadParm.dump(). 2010-06-20 13:29:35 +02:00
Jelmer Vernooij
f051a8557f testparm: Split up functions that do multiple things. 2010-06-20 13:22:26 +02:00
Jelmer Vernooij
0a07b8ebfe testparm: Convert to Python. 2010-06-20 13:16:30 +02:00
Jelmer Vernooij
8f383fc5c8 s4-python: Remove more unused imports, fix use of sets in upgradehelpers. 2010-06-20 13:15:09 +02:00