diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-11-29 12:47:40 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-11-29 09:20:54 +0100 |
commit | 2bff209128b85bd870ad36fa00ffcc92edbbab08 (patch) | |
tree | 751e775ca78eda99455f88f9e8057611150f76c5 /source4/libnet/py_net.c | |
parent | 8eef716598fa30b216ba144c74bcf5dfcfa870fd (diff) | |
download | samba-2bff209128b85bd870ad36fa00ffcc92edbbab08.tar.gz samba-2bff209128b85bd870ad36fa00ffcc92edbbab08.tar.bz2 samba-2bff209128b85bd870ad36fa00ffcc92edbbab08.zip |
s4-samba-tool: Add --principal argument to samba-tool domain exportkeytab
This allows only a particular principal to be exported to the keytab.
This is useful when setting up unix servers in a Samba controlled
domain.
Based on a request by Gémes Géza <geza@kzsdabas.hu>
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov 29 09:20:55 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/libnet/py_net.c')
-rw-r--r-- | source4/libnet/py_net.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 7c90572e12..cf37ccc380 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -188,11 +188,13 @@ static PyObject *py_net_export_keytab(py_net_Object *self, PyObject *args, PyObj { struct libnet_export_keytab r; TALLOC_CTX *mem_ctx; - const char *kwnames[] = { "keytab", NULL }; + const char *kwnames[] = { "keytab", "principal", NULL }; NTSTATUS status; + r.in.principal = NULL; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:export_keytab", discard_const_p(char *, kwnames), - &r.in.keytab_name)) { + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z:export_keytab", discard_const_p(char *, kwnames), + &r.in.keytab_name, + &r.in.principal)) { return NULL; } |