1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

74681 Commits

Author SHA1 Message Date
Andrew Tridgell
114377a91f s4-dsdb: added dsdb_delete() function
this gives us a delete function that takes the standard set of dsdb
flags

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:36 +10:00
Andrew Tridgell
a36af1a501 pyldb: use dn.is_child_of() instead of dn.compare_base()
the compare_base() C API doesn't really fit well in python, as it
returns 0 for true. Better to have a boolean function for the python
interface.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:36 +10:00
Matthieu Patou
9117a2fa3c samba_backup: check that directory really exists 2011-07-21 11:44:35 +10:00
Matthieu Patou
fa194c33b2 tests: Add alpha13 dumped provision 2011-07-21 11:44:35 +10:00
Matthieu Patou
72ca5c39c9 s4-dsdb: Use controls provided during the request while searching for object to delete
If the parent request specify the show_deleted control we must use it in
order to be able to see the deleted objects.

Also we just allow to trusted connections with the system account to
remove deleted objects, others receive an unwilling to perform.
2011-07-21 11:44:35 +10:00
Matthieu Patou
6362c9c30d s4-dsdb: check group membership only for non deleted objects
Group membership has been already removed on deleted objects so there is
no mean doing something on this kind of object.
2011-07-21 11:44:34 +10:00
Andrew Tridgell
76b165778d s4-dsdb: change the samba3sam test to add the show_deleted module
this is needed now that the samldb module adds the show deleted
control

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:34 +10:00
Matthieu Patou
3f6df9f9e3 pyldb: add unit test for ldbDn.compare_base 2011-07-21 11:44:34 +10:00
Matthieu Patou
521556ceed ldb-python: add a function to Dn object to compare the Dn with a base DN 2011-07-21 11:44:34 +10:00
Matthieu Patou
930fa1ee46 update/add my copyright 2011-07-21 11:44:33 +10:00
Matthieu Patou
9a1dd24ced s4-dsdb: In rootdse add extended dn info on all values for a given attribute
And not only on the fist value as it was the case up to this changeset.
2011-07-21 11:44:33 +10:00
Matthieu Patou
245f4b22f4 s4-dsdb: add dsdb_module_extended function similar to other dsdb_module_* functions 2011-07-21 11:44:33 +10:00
Matthieu Patou
b1ffe82fac s4-schema: add systemFlags to dsdb classes objects 2011-07-21 11:44:33 +10:00
Andrew Tridgell
88df1da2b2 s4-test: don't fix broken objects during dbcheck test
this leaves the database as-is, which makes it easier to examine the
problem
2011-07-21 11:44:33 +10:00
Andrew Tridgell
bba7dc5092 dbcheck: test the --reindex option
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:32 +10:00
Andrew Tridgell
190ec87964 s4-test: added dbcheck run to test suite
This should catch corruption that happens during a test run

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:32 +10:00
Andrew Tridgell
a8cba72119 samba-tool: nicer error in passwordsettings with no settings
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:32 +10:00
Andrew Tridgell
bfd94a1515 samba-tool: testparm doesn't take any credentials
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:32 +10:00
Andrew Tridgell
7d399376b8 samba-tool: use 'exportkeytab' instead of 'dumpkeys'
a 'keytab' is a particular format known to administrators, whereas
'keys' is a bit too vague

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:31 +10:00
Giampaolo Lauria
6e7b8aaf1d samba-tool: Fix __doc_ in base classes
Changed prog to samba-tool as prog is only meaningful in Parser

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:31 +10:00
Giampaolo Lauria
5f5eb1b003 samba-tool: removed synopsis code in base class
As it is not always possible to determine the usage of a command solely based on the list of required and optional args, it is best
to have the subclasses always define it, rather than displaying an incorrect usage statement. Currently, all commands are subclassing the synopsis.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:31 +10:00
Giampaolo Lauria
452e50919e samba-tool: Fixed bugs to determine min and max # of allowed arguments
Fixed the bugs in the code to determine both the min and the max # of allowed arguments
Changed the argument suffix convention from "*" to "+" to represent one or more arguments as:
 1. It follows the Regular expression convention ("*" means 0 or more)
 2. It is what was missing in terms of functionality
NB Currently, no command is using the "*/+", but it is a good thing to have to help out the validation of the args if/when in the future
we have such need

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:31 +10:00
Giampaolo Lauria
f03a059814 samba-tool: Improved --help functionality
Added a new --help msg
Return an error when no subcommand is specified

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:30 +10:00
Giampaolo Lauria
a2e2c130b0 samba-tool: fixed __doc__ in base classes
Replaced the "net" word with %prog in all instances

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:30 +10:00
Giampaolo Lauria
903ec440c4 samba-tool: Fix error handling in SuperCommand class
Created show_command_error method to handle errors in SuperCommand
Removed statement in SuperCommand to raise exception

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:30 +10:00
Giampaolo Lauria
8e0a860561 samba-tool: improved Option list for all user commands
Added metavar values for -H and added some default values for other options

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:30 +10:00
Giampaolo Lauria
7c8b53a49e samba-tool: added error handling for the user command
Caught exception whenever possible, added new check for newpassword to make sure it contains some chars

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:30 +10:00
Giampaolo Lauria
a10e231b3b samba-tool: fixed drs commands synopsis
Added [options] as needed

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 11:44:29 +10:00
Andrew Tridgell
57b796d435 samba-tool: fixed samba-tool user syntax
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:29 +10:00
Giampaolo Lauria
f1a079f8dd samba-tool: fixed synopsis on user commands
Fixed all synopsis to contain [options], filter, and username

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
c9bf7022fd samba-tool: fixed synopsis on all "user" commands
Added [options] where needed, fixed others where filter or username was needed, renamed name to username

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
f6fa868489 samba-tool: moved takes_optiongroups definition to Command base class
The option groups should be defined at the Command base class level as they are in common across all samba-tool commands.
Major move advantages:
1. more OOP approach
2. enforcing consistency across commands
3. avoiding the need of declaring for every new command

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
1dfcb019d2 samba-tool: removed the assignment to parser.prog
The prog should only be set if we want it to be different than the name of the program that executed it. I think that for better portability we should not set it and let it default to samba-tool.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
35d534b026 samba-tool: fixed prog name in samba-tool
Changed the prog name from net to samba-tool so that the usage statement is now correct

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
df6fae2f13 samba-tool: update vampire.py message
The update was necessary to reflect the move from join to domain join as part of the object-action work

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
b8b20f7a46 samba-tool: removed join as it has been replaced by domain join
This is part of the samba-tool work to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
2cca4a44fe samba-tool: moved join to domain join
This is part of the samba-tool work to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:24 +10:00
Giampaolo Lauria
9f32f86018 samba-tool: updated test suite for the new domain dumpkeys option
The test suite has been changed to reflect the move from export to "domain dumpkeys" to reflect the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
8f274af3f8 samba-tool: removed export as it has been moved to domain dumpkeys
The functionality of export has been moved to domain dumpkeys to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
c049b14dc1 samba-tool: moved export to domain dumpkeys
This is part of the samba-tool work to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
eb259a676d samba-tool: updated test suite to reflect the move from domainlevel to domain level
The test suite needs to reflect the change from domailevel to "domain level" to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
0cef2bff9c samba-tool: removed domainlevel as it has been moved to domain level
The functionality of domainlevel has been moved the "domain level" to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
2d4988c3d7 samba-tool: moved domainlevel to domain level
This is part of the samba-tool work to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
e573037ac5 samba-tool: removed machinepw as it has been moved to domain machinepassword
The functionality of machinepwd has been moved to "domain machinepassword" to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
41b2b7e160 samba-tool: moved machinepw to domain machinepassword
This is part of the samba-tool work to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
8c7718ac16 samba-tool: update test suite for the new domain object
Changed test suite to reflect the changes from setpassword to "domain setpassword" to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
34f7492b1e samba-tool: removed pwsettings
pwsettings functionality has been moved to user passwordsettings to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:22 +10:00
Giampaolo Lauria
e5255f0920 samba-tool: created domain object, moved pwsettings to user passwordsettings
This is part of the samba-tool work to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:22 +10:00
Giampaolo Lauria
c4a92292c1 samba-tool: update test suite for add setpassword
The test suite needs to change from setpassword to "user setpassword" to reflect the new cmd syntax

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:22 +10:00
Giampaolo Lauria
5720143e86 samba-tool: removed setpassword.py
The functionality in setppasword has now been moved to "user setpassword" to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:22 +10:00