mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
pylibsmb: Add "have_posix" function
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
b9eff7b90c
commit
0bd31c71ab
@ -1751,6 +1751,17 @@ static PyObject *py_smb_chkpath(struct py_cli_state *self, PyObject *args)
|
|||||||
return PyBool_FromLong(dir_exists);
|
return PyBool_FromLong(dir_exists);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *py_smb_have_posix(struct py_cli_state *self,
|
||||||
|
PyObject *Py_UNUSED(ignored))
|
||||||
|
{
|
||||||
|
bool posix = smbXcli_conn_have_posix(self->cli->conn);
|
||||||
|
|
||||||
|
if (posix) {
|
||||||
|
Py_RETURN_TRUE;
|
||||||
|
}
|
||||||
|
Py_RETURN_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *py_smb_get_sd(struct py_cli_state *self, PyObject *args)
|
static PyObject *py_smb_get_sd(struct py_cli_state *self, PyObject *args)
|
||||||
{
|
{
|
||||||
int fnum;
|
int fnum;
|
||||||
@ -1879,6 +1890,12 @@ static PyMethodDef py_cli_state_methods[] = {
|
|||||||
{ "set_sd", (PyCFunction)py_smb_set_sd, METH_VARARGS,
|
{ "set_sd", (PyCFunction)py_smb_set_sd, METH_VARARGS,
|
||||||
"set_sd(fnum, security_descriptor[, security_info=0]) -> None\n\n"
|
"set_sd(fnum, security_descriptor[, security_info=0]) -> None\n\n"
|
||||||
"\t\tSet security descriptor for opened file." },
|
"\t\tSet security descriptor for opened file." },
|
||||||
|
{ "have_posix",
|
||||||
|
(PyCFunction)py_smb_have_posix,
|
||||||
|
METH_NOARGS,
|
||||||
|
"have_posix() -> True/False\n\n"
|
||||||
|
"\t\tReturn if the server has posix extensions"
|
||||||
|
},
|
||||||
{ NULL, NULL, 0, NULL }
|
{ NULL, NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user