1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/python
Tim Beale 5bfad1b2b0 netcmd: Improve error handling of gpo aclcheck as non-admin
Reading the nTSecurityDescriptor attribute over LDAP requires admin
creds. However, if you don't specify admin creds, then you get an error
like this:

bin/samba-tool gpo aclcheck
ERROR(<class 'KeyError'>): uncaught exception - 'No such element'
  File "bin/python/samba/netcmd/__init__.py", line 184, in _run
    return self.run(*args, **kwargs)
  File "bin/python/samba/netcmd/gpo.py", line 1536, in run
    ds_sd_ndr = m['nTSecurityDescriptor'][0]

This patch adds an explicit check/error message to make the problem
clearer.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-01 03:36:17 +01:00
..
examples PY3: change shebang to python3 in misc dirs 2018-12-14 18:00:40 +01:00
samba netcmd: Improve error handling of gpo aclcheck as non-admin 2019-02-01 03:36:17 +01:00
samba_external Move python modules from source4/scripting/python/ to python/. 2013-03-02 03:57:34 +01:00
modules.c python/modules: maintain correct refcount for path items 2019-01-29 13:45:32 +01:00
modules.h Move python modules from source4/scripting/python/ to python/. 2013-03-02 03:57:34 +01:00
py3compat.h python: Add new compat PYARG_STR_UNI format 2019-01-13 00:40:26 +01:00
pyglue.c python: use 'et' as format for ParseTuple with python2 2019-01-13 00:40:26 +01:00
wscript python/wscript: update to handle waf 2.0.4 2018-09-05 06:37:23 +02:00