1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

Raise a ValueError if server name isn't given in UNC format.

This commit is contained in:
Tim Potter -
parent f5a1a3190d
commit 77be88668d

View File

@ -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);