r25598: Add missing become_root/unbecome_root around calls of add_aliases.
[samba.git] / source / python / py_samr.c
index a26cd8d132e3eb9a9ec020d0b1341c1804e3ba6b..8f42e879b5fffdffc331d0be078a05cf37f7ad7d 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "python/py_samr.h"
@@ -283,7 +282,7 @@ PyTypeObject samr_user_hnd_type = {
        0,          /*tp_hash */
 };
 
-PyObject *new_samr_user_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+PyObject *new_samr_user_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                   POLICY_HND *pol)
 {
        samr_user_hnd_object *o;
@@ -304,7 +303,7 @@ static void py_samr_connect_hnd_dealloc(PyObject* self)
        PyObject_Del(self);
 }
 
-PyObject *new_samr_domain_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+PyObject *new_samr_domain_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                     POLICY_HND *pol)
 {
        samr_domain_hnd_object *o;
@@ -396,7 +395,7 @@ PyTypeObject samr_connect_hnd_type = {
        0,          /*tp_hash */
 };
 
-PyObject *new_samr_connect_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+PyObject *new_samr_connect_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                      POLICY_HND *pol)
 {
        samr_connect_hnd_object *o;
@@ -569,7 +568,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw)
                goto done;
        }
 
-       ntstatus = rpccli_samr_connect(cli, mem_ctx, desired_access, &hnd);
+       ntstatus = rpccli_samr_connect(cli->pipe_list, mem_ctx, desired_access, &hnd);
 
        if (!NT_STATUS_IS_OK(ntstatus)) {
                cli_shutdown(cli);
@@ -577,7 +576,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw)
                goto done;
        }
 
-       result = new_samr_connect_hnd_object(cli, mem_ctx, &hnd);
+       result = new_samr_connect_hnd_object(cli->pipe_list, mem_ctx, &hnd);
 
 done:
        if (!result) {