summaryrefslogtreecommitdiffstats
path: root/source/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
commit77be88668d9669a0aaa331c4bbb0faad978f0990 (patch)
treefdf3581b9a418fa68a473f12a7f57c9f603fd98f /source/python
parentf5a1a3190dc0d4ecdf55b870633a83ee125b816e (diff)
downloadsamba-77be88668d9669a0aaa331c4bbb0faad978f0990.tar.gz
samba-77be88668d9669a0aaa331c4bbb0faad978f0990.tar.xz
samba-77be88668d9669a0aaa331c4bbb0faad978f0990.zip
Raise a ValueError if server name isn't given in UNC format.
Diffstat (limited to 'source/python')
-rw-r--r--source/python/py_lsa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/python/py_lsa.c b/source/python/py_lsa.c
index 0665578e60e..21e6463c5f2 100644
--- a/source/python/py_lsa.c
+++ b/source/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);