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

GCC 3.x has deprecated multi-line string constants.

(This used to be commit 54000fc3b0)
This commit is contained in:
Tim Potter
2003-03-19 11:26:01 +00:00
parent 50e42357ea
commit 043a5337e4
5 changed files with 304 additions and 307 deletions

View File

@ -383,32 +383,32 @@ static PyMethodDef lsa_methods[] = {
{ "setup_logging", (PyCFunction)py_setup_logging, { "setup_logging", (PyCFunction)py_setup_logging,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Set up debug logging. "Set up debug logging.\n"
"\n"
Initialises Samba's debug logging system. One argument is expected which "Initialises Samba's debug logging system. One argument is expected which\n"
is a boolean specifying whether debugging is interactive and sent to stdout "is a boolean specifying whether debugging is interactive and sent to stdout\n"
or logged to a file. "or logged to a file.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.setup_logging(interactive = 1)" }, ">>> spoolss.setup_logging(interactive = 1)" },
{ "get_debuglevel", (PyCFunction)get_debuglevel, { "get_debuglevel", (PyCFunction)get_debuglevel,
METH_VARARGS, METH_VARARGS,
"Set the current debug level. "Set the current debug level.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.get_debuglevel() ">>> spoolss.get_debuglevel()\n"
0" }, "0" },
{ "set_debuglevel", (PyCFunction)set_debuglevel, { "set_debuglevel", (PyCFunction)set_debuglevel,
METH_VARARGS, METH_VARARGS,
"Get the current debug level. "Get the current debug level.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.set_debuglevel(10)" }, ">>> spoolss.set_debuglevel(10)" },
{ NULL } { NULL }
}; };

View File

@ -33,22 +33,22 @@ static PyMethodDef spoolss_methods[] = {
/* Open/close printer handles */ /* Open/close printer handles */
{ "openprinter", (PyCFunction)spoolss_openprinter, METH_VARARGS | METH_KEYWORDS, { "openprinter", (PyCFunction)spoolss_openprinter, METH_VARARGS | METH_KEYWORDS,
"Open a printer by name in UNC format. "Open a printer by name in UNC format.\n"
"\n"
Optionally a dictionary of (domain, username, password) may be given in "Optionally a dictionary of (domain, username, password) may be given in\n"
which case they are used when opening the RPC pipe. An access mask may "which case they are used when opening the RPC pipe. An access mask may\n"
also be given which defaults to MAXIMUM_ALLOWED_ACCESS. "also be given which defaults to MAXIMUM_ALLOWED_ACCESS.\n"
"\n"
Example: "Example:\n"
"\n"
>>> hnd = spoolss.openprinter(\"\\\\\\\\NPSD-PDC2\\\\meanie\")"}, ">>> hnd = spoolss.openprinter(\"\\\\\\\\NPSD-PDC2\\\\meanie\")"},
{ "closeprinter", spoolss_closeprinter, METH_VARARGS, { "closeprinter", spoolss_closeprinter, METH_VARARGS,
"Close a printer handle opened with openprinter or addprinter. "Close a printer handle opened with openprinter or addprinter.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.closeprinter(hnd)"}, ">>> spoolss.closeprinter(hnd)"},
{ "addprinterex", (PyCFunction)spoolss_addprinterex, METH_VARARGS, { "addprinterex", (PyCFunction)spoolss_addprinterex, METH_VARARGS,
"addprinterex()"}, "addprinterex()"},
@ -57,76 +57,77 @@ Example:
{ "enumprinters", (PyCFunction)spoolss_enumprinters, { "enumprinters", (PyCFunction)spoolss_enumprinters,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Enumerate printers on a print server. "Enumerate printers on a print server.\n"
"\n"
Return a list of printers on a print server. The credentials, info level "Return a list of printers on a print server. The credentials, info level\n"
and flags may be specified as keyword arguments. "and flags may be specified as keyword arguments.\n"
"\n"
Example: "Example:\n"
"\n"
>>> print spoolss.enumprinters(\"\\\\\\\\npsd-pdc2\") ">>> print spoolss.enumprinters(\"\\\\\\\\npsd-pdc2\")\n"
[{'comment': 'i am a comment', 'printer_name': 'meanie', 'flags': 8388608, "[{'comment': 'i am a comment', 'printer_name': 'meanie', 'flags': 8388608, \n"
'description': 'meanie,Generic / Text Only,i am a location'}, " 'description': 'meanie,Generic / Text Only,i am a location'}, \n"
{'comment': '', 'printer_name': 'fileprint', 'flags': 8388608, " {'comment': '', 'printer_name': 'fileprint', 'flags': 8388608, \n"
'description': 'fileprint,Generic / Text Only,'}]"}, " 'description': 'fileprint,Generic / Text Only,'}]"},
{ "enumports", (PyCFunction)spoolss_enumports, { "enumports", (PyCFunction)spoolss_enumports,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Enumerate ports on a print server. "Enumerate ports on a print server.\n"
"\n"
Return a list of ports on a print server. "Return a list of ports on a print server.\n"
"\n"
Example: "Example:\n"
"\n"
>>> print spoolss.enumports(\"\\\\\\\\npsd-pdc2\") ">>> print spoolss.enumports(\"\\\\\\\\npsd-pdc2\")\n"
[{'name': 'LPT1:'}, {'name': 'LPT2:'}, {'name': 'COM1:'}, {'name': 'COM2:'}, "[{'name': 'LPT1:'}, {'name': 'LPT2:'}, {'name': 'COM1:'}, \n"
{'name': 'FILE:'}, {'name': '\\\\nautilus1\\zpekt3r'}]"}, "{'name': 'COM2:'}, {'name': 'FILE:'}, {'name': '\\\\nautilus1\\zpekt3r'}]"},
{ "enumprinterdrivers", (PyCFunction)spoolss_enumprinterdrivers, { "enumprinterdrivers", (PyCFunction)spoolss_enumprinterdrivers,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Enumerate printer drivers on a print server. "Enumerate printer drivers on a print server.\n"
"\n"
"Return a list of printer drivers."},
Return a list of printer drivers."},
/* Miscellaneous other commands */ /* Miscellaneous other commands */
{ "getprinterdriverdir", (PyCFunction)spoolss_getprinterdriverdir, { "getprinterdriverdir", (PyCFunction)spoolss_getprinterdriverdir,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Return printer driver directory. "Return printer driver directory.\n"
"\n"
Return the printer driver directory for a given architecture. The "Return the printer driver directory for a given architecture. The\n"
architecture defaults to \"Windows NT x86\"."}, "architecture defaults to \"Windows NT x86\"."},
/* Other stuff - this should really go into a samba config module /* Other stuff - this should really go into a samba config module
but for the moment let's leave it here. */ but for the moment let's leave it here. */
{ "setup_logging", (PyCFunction)py_setup_logging, { "setup_logging", (PyCFunction)py_setup_logging,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Set up debug logging. "Set up debug logging.\n"
"\n"
Initialises Samba's debug logging system. One argument is expected which "Initialises Samba's debug logging system. One argument is expected which\n"
is a boolean specifying whether debugging is interactive and sent to stdout "is a boolean specifying whether debugging is interactive and sent to stdout\n"
or logged to a file. "or logged to a file.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.setup_logging(interactive = 1)" }, ">>> spoolss.setup_logging(interactive = 1)" },
{ "get_debuglevel", (PyCFunction)get_debuglevel, { "get_debuglevel", (PyCFunction)get_debuglevel,
METH_VARARGS, METH_VARARGS,
"Set the current debug level. "Set the current debug level.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.get_debuglevel() ">>> spoolss.get_debuglevel()\n"
0" }, "0" },
{ "set_debuglevel", (PyCFunction)set_debuglevel, { "set_debuglevel", (PyCFunction)set_debuglevel,
METH_VARARGS, METH_VARARGS,
"Get the current debug level. "Get the current debug level.\n"
"\n"
Example: "Example:\n"
"\n"
>>> spoolss.set_debuglevel(10)" }, ">>> spoolss.set_debuglevel(10)" },
/* Printer driver routines */ /* Printer driver routines */
@ -157,16 +158,16 @@ static PyMethodDef spoolss_hnd_methods[] = {
{ "getprinter", (PyCFunction)spoolss_hnd_getprinter, { "getprinter", (PyCFunction)spoolss_hnd_getprinter,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Get printer information. "Get printer information.\n"
"\n"
Return a dictionary of print information. The info level defaults to 1. "Return a dictionary of print information. The info level defaults to 1.\n"
"\n"
Example: "Example:\n"
"\n"
>>> hnd.getprinter() ">>> hnd.getprinter()\n"
{'comment': 'i am a comment', 'printer_name': '\\\\NPSD-PDC2\\meanie', "{'comment': 'i am a comment', 'printer_name': '\\\\NPSD-PDC2\\meanie',\n"
'description': '\\\\NPSD-PDC2\\meanie,Generic / Text Only,i am a location', " 'description': '\\\\NPSD-PDC2\\meanie,Generic / Text Only,i am a location',\n"
'flags': 8388608}"}, " 'flags': 8388608}"},
{ "setprinter", (PyCFunction)spoolss_hnd_setprinter, { "setprinter", (PyCFunction)spoolss_hnd_setprinter,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
@ -176,24 +177,24 @@ Example:
{ "getprinterdriver", (PyCFunction)spoolss_hnd_getprinterdriver, { "getprinterdriver", (PyCFunction)spoolss_hnd_getprinterdriver,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Return printer driver information. "Return printer driver information.\n"
"\n"
Return a dictionary of printer driver information for the printer driver "Return a dictionary of printer driver information for the printer driver\n"
bound to this printer."}, "bound to this printer."},
/* Forms */ /* Forms */
{ "enumforms", (PyCFunction)spoolss_hnd_enumforms, { "enumforms", (PyCFunction)spoolss_hnd_enumforms,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Enumerate supported forms. "Enumerate supported forms.\n"
"\n"
Return a list of forms supported by this printer or print server."}, "Return a list of forms supported by this printer or print server."},
{ "setform", (PyCFunction)spoolss_hnd_setform, { "setform", (PyCFunction)spoolss_hnd_setform,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Set form data. "Set form data.\n"
"\n"
Set the form given by the dictionary argument."}, "Set the form given by the dictionary argument."},
{ "addform", (PyCFunction)spoolss_hnd_addform, { "addform", (PyCFunction)spoolss_hnd_addform,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,

View File

@ -158,32 +158,32 @@ static PyMethodDef srvsvc_methods[] = {
{ "setup_logging", (PyCFunction)py_setup_logging, { "setup_logging", (PyCFunction)py_setup_logging,
METH_VARARGS | METH_KEYWORDS, METH_VARARGS | METH_KEYWORDS,
"Set up debug logging. "Set up debug logging.\n"
"\n"
Initialises Samba's debug logging system. One argument is expected which "Initialises Samba's debug logging system. One argument is expected which\n"
is a boolean specifying whether debugging is interactive and sent to stdout "is a boolean specifying whether debugging is interactive and sent to stdout\n"
or logged to a file. "or logged to a file.\n"
"\n"
Example: "Example:\n"
"\n"
>>> srvsvc.setup_logging(interactive = 1)" }, ">>> srvsvc.setup_logging(interactive = 1)" },
{ "get_debuglevel", (PyCFunction)get_debuglevel, { "get_debuglevel", (PyCFunction)get_debuglevel,
METH_VARARGS, METH_VARARGS,
"Set the current debug level. "Set the current debug level.\n"
"\n"
Example: "Example:\n"
"\n"
>>> srvsvc.get_debuglevel() ">>> srvsvc.get_debuglevel()\n"
0" }, "0" },
{ "set_debuglevel", (PyCFunction)set_debuglevel, { "set_debuglevel", (PyCFunction)set_debuglevel,
METH_VARARGS, METH_VARARGS,
"Get the current debug level. "Get the current debug level.\n"
"\n"
Example: "Example:\n"
"\n"
>>> srvsvc.set_debuglevel(10)" }, ">>> srvsvc.set_debuglevel(10)" },
{ NULL } { NULL }
}; };

View File

@ -66,102 +66,98 @@ static PyObject *pytdbpack_bad_type(char ch,
PyObject *val_obj); PyObject *val_obj);
static const char * pytdbpack_docstring = static const char * pytdbpack_docstring =
"Convert between Python values and Samba binary encodings. "Convert between Python values and Samba binary encodings.\n"
"\n"
This module is conceptually similar to the standard 'struct' module, but it "This module is conceptually similar to the standard 'struct' module, but it\n"
uses both a different binary format and a different description string. "uses both a different binary format and a different description string.\n"
"\n"
Samba's encoding is based on that used inside DCE-RPC and SMB: a "Samba's encoding is based on that used inside DCE-RPC and SMB: a\n"
little-endian, unpadded, non-self-describing binary format. It is intended "little-endian, unpadded, non-self-describing binary format. It is intended\n"
that these functions be as similar as possible to the routines in Samba's "that these functions be as similar as possible to the routines in Samba's\n"
tdb/tdbutil module, with appropriate adjustments for Python datatypes. "tdb/tdbutil module, with appropriate adjustments for Python datatypes.\n"
"\n"
Python strings are used to specify the format of data to be packed or "Python strings are used to specify the format of data to be packed or\n"
unpacked. "unpacked.\n"
"\n"
String encodings are implied by the database format: they may be either DOS "String encodings are implied by the database format: they may be either DOS\n"
codepage (currently hardcoded to 850), or Unix codepage (currently hardcoded "codepage (currently hardcoded to 850), or Unix codepage (currently hardcoded\n"
to be the same as the default Python encoding). "to be the same as the default Python encoding).\n"
"\n"
tdbpack format strings: "tdbpack format strings:\n"
"\n"
'f': NUL-terminated string in codepage iso8859-1 " 'f': NUL-terminated string in codepage iso8859-1\n"
" \n"
'P': same as 'f' " 'P': same as 'f'\n"
"\n"
'F': NUL-terminated string in iso-8859-1 " 'F': NUL-terminated string in iso-8859-1\n"
"\n"
'd': 4 byte little-endian unsigned number " 'd': 4 byte little-endian unsigned number\n"
"\n"
'w': 2 byte little-endian unsigned number " 'w': 2 byte little-endian unsigned number\n"
"\n"
'P': \"Pointer\" value -- in the subset of DCERPC used by Samba, this is " 'P': \"Pointer\" value -- in the subset of DCERPC used by Samba, this is\n"
really just an \"exists\" or \"does not exist\" flag. The boolean " really just an \"exists\" or \"does not exist\" flag. The boolean\n"
value of the Python object is used. " value of the Python object is used.\n"
" \n"
'B': 4-byte LE length, followed by that many bytes of binary data. " 'B': 4-byte LE length, followed by that many bytes of binary data.\n"
Corresponds to a Python integer giving the length, followed by a byte " Corresponds to a Python integer giving the length, followed by a byte\n"
string of the appropriate length. " string of the appropriate length.\n"
"\n"
'$': Special flag indicating that the preceding format code should be " '$': Special flag indicating that the preceding format code should be\n"
repeated while data remains. This is only supported for unpacking. " repeated while data remains. This is only supported for unpacking.\n"
"\n"
Every code corresponds to a single Python object, except 'B' which " Every code corresponds to a single Python object, except 'B' which\n"
corresponds to two values (length and contents), and '$', which produces " corresponds to two values (length and contents), and '$', which produces\n"
however many make sense. " however many make sense.\n";
";
static char const pytdbpack_doc[] = static char const pytdbpack_doc[] =
"pack(format, values) -> buffer "pack(format, values) -> buffer\n"
Pack Python objects into Samba binary format according to format string. "Pack Python objects into Samba binary format according to format string.\n"
"\n"
arguments: "arguments:\n"
format -- string of tdbpack format characters " format -- string of tdbpack format characters\n"
values -- sequence of value objects corresponding 1:1 to format characters " values -- sequence of value objects corresponding 1:1 to format characters\n"
"\n"
returns: "returns:\n"
buffer -- string containing packed data " buffer -- string containing packed data\n"
"\n"
raises: "raises:\n"
IndexError -- if there are too few values for the format " IndexError -- if there are too few values for the format\n"
ValueError -- if any of the format characters is illegal " ValueError -- if any of the format characters is illegal\n"
TypeError -- if the format is not a string, or values is not a sequence, " TypeError -- if the format is not a string, or values is not a sequence,\n"
or any of the values is of the wrong type for the corresponding " or any of the values is of the wrong type for the corresponding\n"
format character " format character\n"
"\n"
notes: "notes:\n"
For historical reasons, it is not an error to pass more values than are consumed " For historical reasons, it is not an error to pass more values than are consumed\n"
by the format. " by the format.\n";
";
static char const pytdbunpack_doc[] = static char const pytdbunpack_doc[] =
"unpack(format, buffer) -> (values, rest) "unpack(format, buffer) -> (values, rest)\n"
Unpack Samba binary data according to format string. "Unpack Samba binary data according to format string.\n"
"\n"
arguments: "arguments:\n"
format -- string of tdbpack characters " format -- string of tdbpack characters\n"
buffer -- string of packed binary data " buffer -- string of packed binary data\n"
"\n"
returns: "returns:\n"
2-tuple of: " 2-tuple of:\n"
values -- sequence of values corresponding 1:1 to format characters " values -- sequence of values corresponding 1:1 to format characters\n"
rest -- string containing data that was not decoded, or '' if the " rest -- string containing data that was not decoded, or '' if the\n"
whole string was consumed " whole string was consumed\n"
"\n"
raises: "raises:\n"
IndexError -- if there is insufficient data in the buffer for the " IndexError -- if there is insufficient data in the buffer for the\n"
format (or if the data is corrupt and contains a variable-length " format (or if the data is corrupt and contains a variable-length\n"
field extending past the end) " field extending past the end)\n"
ValueError -- if any of the format characters is illegal " ValueError -- if any of the format characters is illegal\n"
"\n"
notes: "notes:\n"
Because unconsumed data is returned, you can feed it back in to the " Because unconsumed data is returned, you can feed it back in to the\n"
unpacker to extract further fields. Alternatively, if you wish to modify " unpacker to extract further fields. Alternatively, if you wish to modify\n"
some fields near the start of the data, you may be able to save time by " some fields near the start of the data, you may be able to save time by\n"
only unpacking and repacking the necessary part. " only unpacking and repacking the necessary part.\n";
";
const char *pytdb_dos_encoding = "cp850"; const char *pytdb_dos_encoding = "cp850";

View File

@ -585,136 +585,136 @@ static PyMethodDef winbind_methods[] = {
/* Name <-> SID conversion */ /* Name <-> SID conversion */
{ "name_to_sid", (PyCFunction)py_name_to_sid, METH_VARARGS, { "name_to_sid", (PyCFunction)py_name_to_sid, METH_VARARGS,
"name_to_sid(s) -> string "name_to_sid(s) -> string\n"
"\n"
Return the SID for a name. "Return the SID for a name.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.name_to_sid('FOO/Administrator') ">>> winbind.name_to_sid('FOO/Administrator')\n"
'S-1-5-21-406022937-1377575209-526660263-500' " }, "'S-1-5-21-406022937-1377575209-526660263-500' " },
{ "sid_to_name", (PyCFunction)py_sid_to_name, METH_VARARGS, { "sid_to_name", (PyCFunction)py_sid_to_name, METH_VARARGS,
"sid_to_name(s) -> string "sid_to_name(s) -> string\n"
"\n"
Return the name for a SID. "Return the name for a SID.\n"
"\n"
Example: "Example:\n"
"\n"
>>> import winbind ">>> import winbind\n"
>>> winbind.sid_to_name('S-1-5-21-406022937-1377575209-526660263-500') ">>> winbind.sid_to_name('S-1-5-21-406022937-1377575209-526660263-500')\n"
'FOO/Administrator' " }, "'FOO/Administrator' " },
/* Enumerate users/groups */ /* Enumerate users/groups */
{ "enum_domain_users", (PyCFunction)py_enum_domain_users, METH_VARARGS, { "enum_domain_users", (PyCFunction)py_enum_domain_users, METH_VARARGS,
"enum_domain_users() -> list of strings "enum_domain_users() -> list of strings\n"
"\n"
Return a list of domain users. "Return a list of domain users.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.enum_domain_users() ">>> winbind.enum_domain_users()\n"
['FOO/Administrator', 'FOO/anna', 'FOO/Anne Elk', 'FOO/build', "['FOO/Administrator', 'FOO/anna', 'FOO/Anne Elk', 'FOO/build', \n"
'FOO/foo', 'FOO/foo2', 'FOO/foo3', 'FOO/Guest', 'FOO/user1', "'FOO/foo', 'FOO/foo2', 'FOO/foo3', 'FOO/Guest', 'FOO/user1', \n"
'FOO/whoops-ptang'] " }, "'FOO/whoops-ptang'] " },
{ "enum_domain_groups", (PyCFunction)py_enum_domain_groups, { "enum_domain_groups", (PyCFunction)py_enum_domain_groups,
METH_VARARGS, METH_VARARGS,
"enum_domain_groups() -> list of strings "enum_domain_groups() -> list of strings\n"
"\n"
Return a list of domain groups. "Return a list of domain groups.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.enum_domain_groups() ">>> winbind.enum_domain_groups()\n"
['FOO/cows', 'FOO/Domain Admins', 'FOO/Domain Guests', "['FOO/cows', 'FOO/Domain Admins', 'FOO/Domain Guests', \n"
'FOO/Domain Users'] " }, "'FOO/Domain Users'] " },
/* ID mapping */ /* ID mapping */
{ "uid_to_sid", (PyCFunction)py_uid_to_sid, METH_VARARGS, { "uid_to_sid", (PyCFunction)py_uid_to_sid, METH_VARARGS,
"uid_to_sid(int) -> string "uid_to_sid(int) -> string\n"
"\n"
Return the SID for a UNIX uid. "Return the SID for a UNIX uid.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.uid_to_sid(10000) ">>> winbind.uid_to_sid(10000) \n"
'S-1-5-21-406022937-1377575209-526660263-500' " }, "'S-1-5-21-406022937-1377575209-526660263-500' " },
{ "gid_to_sid", (PyCFunction)py_gid_to_sid, METH_VARARGS, { "gid_to_sid", (PyCFunction)py_gid_to_sid, METH_VARARGS,
"gid_to_sid(int) -> string "gid_to_sid(int) -> string\n"
"\n"
Return the UNIX gid for a SID. "Return the UNIX gid for a SID.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.gid_to_sid(10001) ">>> winbind.gid_to_sid(10001)\n"
'S-1-5-21-406022937-1377575209-526660263-512' " }, "'S-1-5-21-406022937-1377575209-526660263-512' " },
{ "sid_to_uid", (PyCFunction)py_sid_to_uid, METH_VARARGS, { "sid_to_uid", (PyCFunction)py_sid_to_uid, METH_VARARGS,
"sid_to_uid(string) -> int "sid_to_uid(string) -> int\n"
"\n"
Return the UNIX uid for a SID. "Return the UNIX uid for a SID.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.sid_to_uid('S-1-5-21-406022937-1377575209-526660263-500') ">>> winbind.sid_to_uid('S-1-5-21-406022937-1377575209-526660263-500')\n"
10000 " }, "10000 " },
{ "sid_to_gid", (PyCFunction)py_sid_to_gid, METH_VARARGS, { "sid_to_gid", (PyCFunction)py_sid_to_gid, METH_VARARGS,
"sid_to_gid(string) -> int "sid_to_gid(string) -> int\n"
"\n"
Return the UNIX gid corresponding to a SID. "Return the UNIX gid corresponding to a SID.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.sid_to_gid('S-1-5-21-406022937-1377575209-526660263-512') ">>> winbind.sid_to_gid('S-1-5-21-406022937-1377575209-526660263-512')\n"
10001 " }, "10001 " },
/* Miscellaneous */ /* Miscellaneous */
{ "check_secret", (PyCFunction)py_check_secret, METH_VARARGS, { "check_secret", (PyCFunction)py_check_secret, METH_VARARGS,
"check_secret() -> int "check_secret() -> int\n"
"\n"
Check the machine trust account password. The NT status is returned "Check the machine trust account password. The NT status is returned\n"
with zero indicating success. " }, "with zero indicating success. " },
{ "enum_trust_dom", (PyCFunction)py_enum_trust_dom, METH_VARARGS, { "enum_trust_dom", (PyCFunction)py_enum_trust_dom, METH_VARARGS,
"enum_trust_dom() -> list of strings "enum_trust_dom() -> list of strings\n"
"\n"
Return a list of trusted domains. The domain the server is a member "Return a list of trusted domains. The domain the server is a member \n"
of is not included. "of is not included.\n"
"\n"
Example: "Example:\n"
"\n"
>>> winbind.enum_trust_dom() ">>> winbind.enum_trust_dom()\n"
['NPSD-TEST2', 'SP2NDOM'] " }, "['NPSD-TEST2', 'SP2NDOM'] " },
/* PAM authorisation functions */ /* PAM authorisation functions */
{ "auth_plaintext", (PyCFunction)py_auth_plaintext, METH_VARARGS, { "auth_plaintext", (PyCFunction)py_auth_plaintext, METH_VARARGS,
"auth_plaintext(s, s) -> int "auth_plaintext(s, s) -> int\n"
"\n"
Authenticate a username and password using plaintext authentication. "Authenticate a username and password using plaintext authentication.\n"
The NT status code is returned with zero indicating success." }, "The NT status code is returned with zero indicating success." },
{ "auth_crap", (PyCFunction)py_auth_crap, METH_VARARGS, { "auth_crap", (PyCFunction)py_auth_crap, METH_VARARGS,
"auth_crap(s, s) -> int "auth_crap(s, s) -> int\n"
"\n"
Authenticate a username and password using the challenge/response "Authenticate a username and password using the challenge/response\n"
protocol. The NT status code is returned with zero indicating "protocol. The NT status code is returned with zero indicating\n"
success." }, "success." },
#if 0 /* Include when smbd_auth merged to HEAD */ #if 0 /* Include when smbd_auth merged to HEAD */
{ "auth_smbd", (PyCFunction)py_auth_crap, METH_VARARGS, { "auth_smbd", (PyCFunction)py_auth_crap, METH_VARARGS,
"auth_smbd(s, s) -> int "auth_smbd(s, s) -> int\n"
"\n"
Authenticate a username and password using the challenge/response "Authenticate a username and password using the challenge/response\n"
protocol but using the domain secret to prove we are root. The NT "protocol but using the domain secret to prove we are root. The NT \n"
status code is returned with zero indicating success." }, "status code is returned with zero indicating success." },
#endif #endif