1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-02 01:49:29 +03:00

samba-tool {user,group,computer,contact} show: avoid base64 encoded strings if possible

Be more user friendly and use clear text argument strings if possible.

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Björn Baumbach
2019-11-25 14:13:37 +01:00
committed by Andrew Bartlett
parent 0b04d9f2ec
commit 6d1a0eb8d1
4 changed files with 8 additions and 13 deletions

View File

@ -36,6 +36,7 @@ from samba.auth import system_session
from samba.samdb import SamDB
from samba.compat import get_bytes
from subprocess import check_call, CalledProcessError
from . import common
from samba import (
credentials,
@ -457,8 +458,6 @@ class cmd_computer_edit(Command):
def run(self, computername, credopts=None, sambaopts=None, versionopts=None,
H=None, editor=None):
from . import common
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
samdb = SamDB(url=H, session_info=system_session(),
@ -639,7 +638,7 @@ attribute.
samaccountname)
for msg in res:
computer_ldif = samdb.write_ldif(msg, ldb.CHANGETYPE_NONE)
computer_ldif = common.get_ldif_for_editor(samdb, msg)
self.outf.write(computer_ldif)