]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Remove unused py_reparse_symlink_get
authorVolker Lendecke <vl@samba.org>
Thu, 4 Jul 2024 11:48:37 +0000 (13:48 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 5 Jul 2024 23:42:46 +0000 (23:42 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/py_reparse_symlink.c

index 25be77d132e12f006ba1b491b43412b8d2e40cc9..d28a8fd8b93fb7d647aed75d7f5c9b0aaddcda71 100644 (file)
@@ -197,51 +197,6 @@ static PyObject *py_reparse_symlink_put(PyObject *module, PyObject *args)
        return result;
 }
 
-static PyObject *py_reparse_symlink_get(PyObject *module, PyObject *args)
-{
-       char *buf = NULL;
-       Py_ssize_t buflen;
-       struct reparse_data_buffer *syml = NULL;
-       struct symlink_reparse_struct *lnk = NULL;
-       PyObject *result = NULL;
-       NTSTATUS status;
-       bool ok;
-
-       ok = PyArg_ParseTuple(args, PYARG_BYTES_LEN ":get", &buf, &buflen);
-       if (!ok) {
-               return NULL;
-       }
-
-       syml = talloc(NULL, struct reparse_data_buffer);
-       if (syml == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       status = reparse_data_buffer_parse(syml, syml, (uint8_t *)buf, buflen);
-       if (!NT_STATUS_IS_OK(status)) {
-               TALLOC_FREE(syml);
-               PyErr_SetNTSTATUS(status);
-               return NULL;
-       }
-
-       if (syml->tag != IO_REPARSE_TAG_SYMLINK) {
-               TALLOC_FREE(syml);
-               PyErr_SetNTSTATUS(NT_STATUS_INVALID_NETWORK_RESPONSE);
-               return NULL;
-       }
-       lnk = &syml->parsed.lnk;
-
-       result = Py_BuildValue("ssII",
-                              lnk->substitute_name,
-                              lnk->print_name,
-                              (unsigned)lnk->unparsed_path_length,
-                              (unsigned)lnk->flags);
-
-       TALLOC_FREE(syml);
-       return result;
-}
-
 static PyMethodDef py_reparse_symlink_methods[] = {
        { "put",
          PY_DISCARD_FUNC_SIG(PyCFunction, py_reparse_put),
@@ -255,10 +210,6 @@ static PyMethodDef py_reparse_symlink_methods[] = {
          PY_DISCARD_FUNC_SIG(PyCFunction, py_reparse_symlink_put),
          METH_VARARGS,
          "Create a reparse symlink blob"},
-       { "symlink_get",
-         PY_DISCARD_FUNC_SIG(PyCFunction, py_reparse_symlink_get),
-         METH_VARARGS,
-         "Parse a reparse symlink blob"},
        {0},
 };