diff options
author | Tim Potter <tpot@samba.org> | 2002-05-28 03:14:28 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-05-28 03:14:28 +0000 |
commit | 6aaaa165b7135a845f9fe66c4bc4fe5742d3c7e7 (patch) | |
tree | e71033e18a43e9c5e387737d82a33ef9cc850a46 /source3 | |
parent | 6aad72916aff00eb11f747e7fd5a01ac98b56929 (diff) | |
download | samba-6aaaa165b7135a845f9fe66c4bc4fe5742d3c7e7.tar.gz samba-6aaaa165b7135a845f9fe66c4bc4fe5742d3c7e7.tar.bz2 samba-6aaaa165b7135a845f9fe66c4bc4fe5742d3c7e7.zip |
Raise a ValueError if server name isn't given in UNC format.
(This used to be commit 77be88668d9669a0aaa331c4bbb0faad978f0990)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/python/py_lsa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/python/py_lsa.c b/source3/python/py_lsa.c index 0665578e60..21e6463c5f 100644 --- a/source3/python/py_lsa.c +++ b/source3/python/py_lsa.c @@ -71,6 +71,13 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args, return NULL; } + if (server[0] != '\\' || server[1] != '\\') { + PyErr_SetString(PyExc_ValueError, "UNC name required"); + return NULL; + } + + server += 2; + if (!(cli = open_pipe_creds(server, creds, PIPE_LSARPC, &errstr))) { PyErr_SetString(lsa_error, errstr); free(errstr); |