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

15 Commits

Author SHA1 Message Date
Jelmer Vernooij
fa332b71dc s4-python: Override SIGINT handler in scripts only.
Override the SIGINT handler in a few select cases only, rather than
doing so in one of the samba Python modules. I've done this where it
matters most; we can add this code to other scripts too if necessary.

This means that importing the 'samba' module from a third party
application does not have side-effects on the state of the signal
handlers.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068
2012-09-25 20:59:09 +02:00
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
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
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
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