r25598: Add missing become_root/unbecome_root around calls of add_aliases.
[samba.git] / source / python / py_spoolss_printers.c
index 50c19fcf0451db16b13a22059d001c21c5ade6ca..306475800774105ca3f203c752024f2951ef2d89 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_spoolss.h"
@@ -69,7 +68,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw)
        }
 
        werror = rpccli_spoolss_open_printer_ex(
-               cli, mem_ctx, unc_name, "", desired_access, server, 
+               cli->pipe_list, mem_ctx, unc_name, "", desired_access, server, 
                "", &hnd);
 
        if (!W_ERROR_IS_OK(werror)) {
@@ -327,7 +326,7 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw)
        /* Call rpc function */
        
        werror = rpccli_spoolss_enum_printers(
-               cli, mem_ctx, name, flags, level, &num_printers, &ctr);
+               cli->pipe_list, mem_ctx, name, flags, level, &num_printers, &ctr);
 
        if (!W_ERROR_IS_OK(werror)) {
                PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
@@ -448,7 +447,7 @@ PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw)
 
        ctr.printers_2 = &info2;
 
-       werror = rpccli_spoolss_addprinterex(cli, mem_ctx, 2, &ctr);
+       werror = rpccli_spoolss_addprinterex(cli->pipe_list, mem_ctx, 2, &ctr);
 
        Py_INCREF(Py_None);
        result = Py_None;