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 | 77be88668d9669a0aaa331c4bbb0faad978f0990 (patch) | |
tree | fdf3581b9a418fa68a473f12a7f57c9f603fd98f /source/python | |
parent | f5a1a3190dc0d4ecdf55b870633a83ee125b816e (diff) | |
download | samba-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.c | 7 |
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); |