summaryrefslogtreecommitdiff
path: root/source3/python
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-28 03:14:28 +0000
committerTim Potter <tpot@samba.org>2002-05-28 03:14:28 +0000
commit6aaaa165b7135a845f9fe66c4bc4fe5742d3c7e7 (patch)
treee71033e18a43e9c5e387737d82a33ef9cc850a46 /source3/python
parent6aad72916aff00eb11f747e7fd5a01ac98b56929 (diff)
downloadsamba-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/python')
-rw-r--r--source3/python/py_lsa.c7
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);