~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to source3/librpc/gen_ndr/py_msgsvc.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* Python wrapper functions auto-generated by pidl */
 
3
#include <Python.h>
 
4
#include "includes.h"
 
5
#include <pytalloc.h>
 
6
#include "librpc/rpc/pyrpc.h"
 
7
#include "librpc/rpc/pyrpc_util.h"
 
8
#include "librpc/gen_ndr/ndr_msgsvc.h"
 
9
#include "librpc/gen_ndr/ndr_msgsvc_c.h"
 
10
 
 
11
staticforward PyTypeObject msgsvc_InterfaceType;
 
12
 
 
13
staticforward PyTypeObject msgsvcsend_InterfaceType;
 
14
 
 
15
void initmsgsvc(void);static PyTypeObject *ClientConnection_Type;
 
16
 
 
17
const struct PyNdrRpcMethodDef py_ndr_msgsvc_methods[] = {
 
18
        { NULL }
 
19
};
 
20
 
 
21
static PyObject *interface_msgsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
22
{
 
23
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_msgsvc);
 
24
}
 
25
 
 
26
#define PY_DOC_MSGSVC "Messaging Service"
 
27
static PyTypeObject msgsvc_InterfaceType = {
 
28
        PyObject_HEAD_INIT(NULL) 0,
 
29
        .tp_name = "msgsvc.msgsvc",
 
30
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
31
        .tp_doc = "msgsvc(binding, lp_ctx=None, credentials=None) -> connection\n"
 
32
"\n"
 
33
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
34
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
35
"credentials should be a credentials.Credentials object.\n\n"PY_DOC_MSGSVC,
 
36
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
37
        .tp_new = interface_msgsvc_new,
 
38
};
 
39
 
 
40
 
 
41
const struct PyNdrRpcMethodDef py_ndr_msgsvcsend_methods[] = {
 
42
        { NULL }
 
43
};
 
44
 
 
45
static PyObject *interface_msgsvcsend_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
46
{
 
47
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_msgsvcsend);
 
48
}
 
49
 
 
50
static PyTypeObject msgsvcsend_InterfaceType = {
 
51
        PyObject_HEAD_INIT(NULL) 0,
 
52
        .tp_name = "msgsvc.msgsvcsend",
 
53
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
54
        .tp_doc = "msgsvcsend(binding, lp_ctx=None, credentials=None) -> connection\n"
 
55
"\n"
 
56
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
57
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
58
"credentials should be a credentials.Credentials object.\n\n",
 
59
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
60
        .tp_new = interface_msgsvcsend_new,
 
61
};
 
62
 
 
63
static PyMethodDef msgsvc_methods[] = {
 
64
        { NULL, NULL, 0, NULL }
 
65
};
 
66
 
 
67
void initmsgsvc(void)
 
68
{
 
69
        PyObject *m;
 
70
        PyObject *dep_samba_dcerpc_base;
 
71
 
 
72
        dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
 
73
        if (dep_samba_dcerpc_base == NULL)
 
74
                return;
 
75
 
 
76
        ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
 
77
        if (ClientConnection_Type == NULL)
 
78
                return;
 
79
 
 
80
        msgsvc_InterfaceType.tp_base = ClientConnection_Type;
 
81
 
 
82
        msgsvcsend_InterfaceType.tp_base = ClientConnection_Type;
 
83
 
 
84
        if (PyType_Ready(&msgsvc_InterfaceType) < 0)
 
85
                return;
 
86
        if (PyType_Ready(&msgsvcsend_InterfaceType) < 0)
 
87
                return;
 
88
        if (!PyInterface_AddNdrRpcMethods(&msgsvc_InterfaceType, py_ndr_msgsvc_methods))
 
89
                return;
 
90
 
 
91
        if (!PyInterface_AddNdrRpcMethods(&msgsvcsend_InterfaceType, py_ndr_msgsvcsend_methods))
 
92
                return;
 
93
 
 
94
#ifdef PY_MSGSVC_PATCH
 
95
        PY_MSGSVC_PATCH(&msgsvc_InterfaceType);
 
96
#endif
 
97
#ifdef PY_MSGSVCSEND_PATCH
 
98
        PY_MSGSVCSEND_PATCH(&msgsvcsend_InterfaceType);
 
99
#endif
 
100
 
 
101
        m = Py_InitModule3("msgsvc", msgsvc_methods, "msgsvc DCE/RPC");
 
102
        if (m == NULL)
 
103
                return;
 
104
 
 
105
        Py_INCREF((PyObject *)(void *)&msgsvc_InterfaceType);
 
106
        PyModule_AddObject(m, "msgsvc", (PyObject *)(void *)&msgsvc_InterfaceType);
 
107
        Py_INCREF((PyObject *)(void *)&msgsvcsend_InterfaceType);
 
108
        PyModule_AddObject(m, "msgsvcsend", (PyObject *)(void *)&msgsvcsend_InterfaceType);
 
109
#ifdef PY_MOD_MSGSVC_PATCH
 
110
        PY_MOD_MSGSVC_PATCH(m);
 
111
#endif
 
112
 
 
113
}