The Samba-Bugzilla – Attachment 11611 Details for
Bug 11613
Samba-tool fsmo errors out if no fSMORoleOwner attribute found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
make samba-tool fsmo print error message if no fSMORoleOwner attribute found
0003-samba-tool-fsmo.py-throws-an-uncaught-exception-if-n.patch (text/plain), 1.07 KB, created by
Rowland Penny
on 2015-11-23 18:58:33 UTC
(
hide
)
Description:
make samba-tool fsmo print error message if no fSMORoleOwner attribute found
Filename:
MIME Type:
Creator:
Rowland Penny
Created:
2015-11-23 18:58:33 UTC
Size:
1.07 KB
patch
obsolete
>From 77b383be3d4dfb983ebb8ca13436788ca20c8e9a Mon Sep 17 00:00:00 2001 >From: Rowland Penny <repenny241155@gmail.com> >Date: Mon, 23 Nov 2015 18:40:19 +0000 >Subject: [PATCH 3/3] samba-tool: fsmo.py throws an uncaught exception if no >fSMORoleOwner attribute > >This will fix bug 11613 where a user got the uncaught exception when trying >to seize an FSMO role that didn't have the required attribute. > >Signed-off-by: Rowland Penny <repenny241155@gmail.com> >--- > python/samba/netcmd/fsmo.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/python/samba/netcmd/fsmo.py b/python/samba/netcmd/fsmo.py >index 0b4488f..a5c2818 100644 >--- a/python/samba/netcmd/fsmo.py >+++ b/python/samba/netcmd/fsmo.py >@@ -38,7 +38,8 @@ def get_fsmo_roleowner(samdb, roledn): > """ > res = samdb.search(roledn, > scope=ldb.SCOPE_BASE, attrs=["fSMORoleOwner"]) >- assert len(res) == 1 >+ if len(res) == 0: >+ raise Exception('"%s" does not have a FSMO roleowner' % roledn) > master_owner = res[0]["fSMORoleOwner"][0] > return master_owner > >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11613
:
11611
|
11675
|
12155
|
12156