The branch, master has been updated
       via  59c1428 s3-spoolss: Use systerm server_info for winreg connection.
       via  1c42bc3 s3-spoolss: Make auth_serversupplied_info const.
       via  bbf2cd5 s3-printing: Make auth_serversupplied_info const.
       via  0215395 s3-msdfs: Make auth_serversupplied_info const.
       via  0d9fa9e s3-rpcint: Make auth_serversupplied_info const.
       via  669213e s3-auth: Added get_server_info_system function.
       via  cd2b9db s3-spoolss: Fixed some build warnings.
      from  3d420ea s4-rodc: cope with missing searchFlags

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 59c14282eb54a60a2b889585c3aeb280742ac14a
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 9 11:22:06 2010 +0200

    s3-spoolss: Use systerm server_info for winreg connection.
    
    This will ensure that we have the rights we need to access the regsitry.

commit 1c42bc3ad48c9019a62f556ff2841df5f5f832d9
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 9 11:21:43 2010 +0200

    s3-spoolss: Make auth_serversupplied_info const.

commit bbf2cd50b04a026750aa5518b590994ba0b4afc5
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 9 11:32:03 2010 +0200

    s3-printing: Make auth_serversupplied_info const.

commit 021539570b4beac81d22edd60c0cf026f2628479
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 9 11:37:49 2010 +0200

    s3-msdfs: Make auth_serversupplied_info const.

commit 0d9fa9e96fd85fab6b51a590612ad2385617f972
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 9 11:35:50 2010 +0200

    s3-rpcint: Make auth_serversupplied_info const.

commit 669213e812340896d5fa5dbfb7e3180255af297a
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 9 11:00:18 2010 +0200

    s3-auth: Added get_server_info_system function.

commit cd2b9db04b7a27a36b68c7eb846aec68830566ef
Author: Andreas Schneider <[email protected]>
Date:   Wed Sep 8 19:39:36 2010 +0200

    s3-spoolss: Fixed some build warnings.

-----------------------------------------------------------------------

Summary of changes:
 source3/auth/auth_util.c                   |    5 +
 source3/include/nt_printing.h              |   16 +-
 source3/include/printing.h                 |   14 +-
 source3/include/proto.h                    |    7 +-
 source3/printing/nt_printing.c             |   12 +-
 source3/printing/printing.c                |   18 +-
 source3/rpc_server/rpc_ncacn_np_internal.c |    6 +-
 source3/rpc_server/srv_spoolss_nt.c        |  302 +++++++++++++++++----------
 source3/rpc_server/srv_spoolss_util.c      |   48 +++---
 source3/rpc_server/srv_spoolss_util.h      |   44 ++--
 source3/smbd/msdfs.c                       |    2 +-
 11 files changed, 279 insertions(+), 195 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 1b4a284..9dbe04f 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -921,6 +921,11 @@ NTSTATUS make_server_info_system(TALLOC_CTX *mem_ctx,
        return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
 }
 
+const struct auth_serversupplied_info *get_server_info_system(void)
+{
+    return system_info;
+}
+
 bool copy_current_user(struct current_user *dst, struct current_user *src)
 {
        gid_t *groups;
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 7ebacc6..f56ddcb 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -237,18 +237,18 @@ WERROR spoolss_map_to_os2_driver(TALLOC_CTX *mem_ctx, 
const char **pdrivername);
 
 const char *get_short_archi(const char *long_archi);
 
-bool print_access_check(struct auth_serversupplied_info *server_info,
+bool print_access_check(const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx, int snum,
                        int access_type);
 
 WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
-                         struct auth_serversupplied_info *server_info,
+                         const struct auth_serversupplied_info *server_info,
                          struct messaging_context *msg_ctx,
                          struct spoolss_PrinterInfo2 *pinfo2,
                          int action);
 
 bool is_printer_published(TALLOC_CTX *mem_ctx,
-                         struct auth_serversupplied_info *server_info,
+                         const struct auth_serversupplied_info *server_info,
                          struct messaging_context *msg_ctx,
                          char *servername, char *printer, struct GUID *guid,
                          struct spoolss_PrinterInfo2 **info2);
@@ -259,14 +259,14 @@ bool driver_info_ctr_to_info8(struct 
spoolss_AddDriverInfoCtr *r,
                              struct spoolss_DriverInfo8 *_info8);
 
 bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
-                          struct auth_serversupplied_info *server_info,
+                          const struct auth_serversupplied_info *server_info,
                           struct messaging_context *msg_ctx,
                           const struct spoolss_DriverInfo8 *r);
 bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
-                                struct auth_serversupplied_info *server_info,
+                                const struct auth_serversupplied_info 
*server_info,
                                 struct messaging_context *msg_ctx,
                                 struct spoolss_DriverInfo8 *r);
-bool delete_driver_files(struct auth_serversupplied_info *server_info,
+bool delete_driver_files(const struct auth_serversupplied_info *server_info,
                         const struct spoolss_DriverInfo8 *r);
 
 WERROR move_driver_to_download_area(struct pipes_struct *p,
@@ -281,12 +281,12 @@ void map_printer_permissions(struct security_descriptor 
*sd);
 
 void map_job_permissions(struct security_descriptor *sd);
 
-bool print_time_access_check(struct auth_serversupplied_info *server_info,
+bool print_time_access_check(const struct auth_serversupplied_info 
*server_info,
                             struct messaging_context *msg_ctx,
                             const char *servicename);
 
 void nt_printer_remove(TALLOC_CTX *mem_ctx,
-                       struct auth_serversupplied_info *server_info,
+                       const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx,
                        const char *printer);
 
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 180f6a0..36726b3 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -126,13 +126,13 @@ bool print_job_set_name(struct tevent_context *ev,
                        struct messaging_context *msg_ctx,
                        const char *sharename, uint32 jobid, const char *name);
 bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t 
jobid, char **name);
-WERROR print_job_delete(struct auth_serversupplied_info *server_info,
+WERROR print_job_delete(const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx,
                        int snum, uint32_t jobid);
-bool print_job_pause(struct auth_serversupplied_info *server_info,
+bool print_job_pause(const struct auth_serversupplied_info *server_info,
                     struct messaging_context *msg_ctx,
                     int snum, uint32 jobid, WERROR *errcode);
-bool print_job_resume(struct auth_serversupplied_info *server_info,
+bool print_job_resume(const struct auth_serversupplied_info *server_info,
                      struct messaging_context *msg_ctx,
                      int snum, uint32 jobid, WERROR *errcode);
 ssize_t print_job_write(struct tevent_context *ev,
@@ -140,7 +140,7 @@ ssize_t print_job_write(struct tevent_context *ev,
                        int snum, uint32 jobid, const char *buf, size_t size);
 int print_queue_length(struct messaging_context *msg_ctx, int snum,
                       print_status_struct *pstatus);
-WERROR print_job_start(struct auth_serversupplied_info *server_info,
+WERROR print_job_start(const struct auth_serversupplied_info *server_info,
                       struct messaging_context *msg_ctx,
                       const char *clientmachine,
                       int snum, const char *docname, const char *filename,
@@ -152,11 +152,11 @@ NTSTATUS print_job_end(struct messaging_context *msg_ctx, 
int snum,
 int print_queue_status(struct messaging_context *msg_ctx, int snum,
                       print_queue_struct **ppqueue,
                       print_status_struct *status);
-WERROR print_queue_pause(struct auth_serversupplied_info *server_info,
+WERROR print_queue_pause(const struct auth_serversupplied_info *server_info,
                         struct messaging_context *msg_ctx, int snum);
-WERROR print_queue_resume(struct auth_serversupplied_info *server_info,
+WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
                          struct messaging_context *msg_ctx, int snum);
-WERROR print_queue_purge(struct auth_serversupplied_info *server_info,
+WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
                         struct messaging_context *msg_ctx, int snum);
 
 #endif /* PRINTING_H_ */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2f82e70..0b54932 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -147,6 +147,7 @@ NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
                                struct auth_serversupplied_info **server_info);
 NTSTATUS make_server_info_system(TALLOC_CTX *mem_ctx,
                                 struct auth_serversupplied_info **server_info);
+const struct auth_serversupplied_info *get_server_info_system(void);
 bool copy_current_user(struct current_user *dst, struct current_user *src);
 struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, const char *domuser,
                             fstring save_username, bool create );
@@ -4167,12 +4168,12 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, 
const char *socket_path,
 struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
                                              const struct ndr_syntax_id 
*syntax,
                                              struct client_address *client_id,
-                                             struct auth_serversupplied_info 
*server_info,
+                                             const struct 
auth_serversupplied_info *server_info,
                                              struct messaging_context 
*msg_ctx);
 NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
                               const struct ndr_interface_table *ndr_table,
                               struct client_address *client_id,
-                              struct auth_serversupplied_info *server_info,
+                              const struct auth_serversupplied_info 
*server_info,
                               struct messaging_context *msg_ctx,
                               struct dcerpc_binding_handle **binding_handle);
 NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
@@ -4927,7 +4928,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
                                connection_struct **pconn,
                                int snum,
                                const char *path,
-                               struct auth_serversupplied_info *server_info,
+                               const struct auth_serversupplied_info 
*server_info,
                                char **poldcwd);
 
 /* The following definitions come from smbd/negprot.c  */
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 97899fd..9f4ede2 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1553,7 +1553,7 @@ bool driver_info_ctr_to_info8(struct 
spoolss_AddDriverInfoCtr *r,
 ****************************************************************************/
 
 bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
-                          struct auth_serversupplied_info *server_info,
+                          const struct auth_serversupplied_info *server_info,
                           struct messaging_context *msg_ctx,
                            const struct spoolss_DriverInfo8 *r)
 {
@@ -1781,7 +1781,7 @@ static bool trim_overlap_drv_files(TALLOC_CTX *mem_ctx,
 ****************************************************************************/
 
 bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
-                                struct auth_serversupplied_info *server_info,
+                                const struct auth_serversupplied_info 
*server_info,
                                 struct messaging_context *msg_ctx,
                                 struct spoolss_DriverInfo8 *info)
 {
@@ -1875,7 +1875,7 @@ static NTSTATUS driver_unlink_internals(connection_struct 
*conn,
   this.
 ****************************************************************************/
 
-bool delete_driver_files(struct auth_serversupplied_info *server_info,
+bool delete_driver_files(const struct auth_serversupplied_info *server_info,
                         const struct spoolss_DriverInfo8 *r)
 {
        int i = 0;
@@ -2064,7 +2064,7 @@ void map_job_permissions(struct security_descriptor *sd)
     3)  "printer admins" (may result in numerous calls to winbind)
 
  ****************************************************************************/
-bool print_access_check(struct auth_serversupplied_info *server_info,
+bool print_access_check(const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx, int snum,
                        int access_type)
 {
@@ -2167,7 +2167,7 @@ bool print_access_check(struct auth_serversupplied_info 
*server_info,
  Check the time parameters allow a print operation.
 *****************************************************************************/
 
-bool print_time_access_check(struct auth_serversupplied_info *server_info,
+bool print_time_access_check(const struct auth_serversupplied_info 
*server_info,
                             struct messaging_context *msg_ctx,
                             const char *servicename)
 {
@@ -2205,7 +2205,7 @@ bool print_time_access_check(struct 
auth_serversupplied_info *server_info,
 }
 
 void nt_printer_remove(TALLOC_CTX *mem_ctx,
-                       struct auth_serversupplied_info *server_info,
+                       const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx,
                        const char *printer)
 {
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index ca6139c..1568aca 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2234,7 +2234,7 @@ static bool print_job_delete1(struct tevent_context *ev,
  Return true if the current user owns the print job.
 ****************************************************************************/
 
-static bool is_owner(struct auth_serversupplied_info *server_info,
+static bool is_owner(const struct auth_serversupplied_info *server_info,
                     const char *servicename,
                     uint32 jobid)
 {
@@ -2250,7 +2250,7 @@ static bool is_owner(struct auth_serversupplied_info 
*server_info,
  Delete a print job.
 ****************************************************************************/
 
-WERROR print_job_delete(struct auth_serversupplied_info *server_info,
+WERROR print_job_delete(const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx,
                        int snum, uint32_t jobid)
 {
@@ -2318,7 +2318,7 @@ pause, or resume print job. User name: %s. Printer name: 
%s.",
  Pause a job.
 ****************************************************************************/
 
-bool print_job_pause(struct auth_serversupplied_info *server_info,
+bool print_job_pause(const struct auth_serversupplied_info *server_info,
                     struct messaging_context *msg_ctx,
                     int snum, uint32 jobid, WERROR *errcode)
 {
@@ -2383,7 +2383,7 @@ pause, or resume print job. User name: %s. Printer name: 
%s.",
  Resume a job.
 ****************************************************************************/
 
-bool print_job_resume(struct auth_serversupplied_info *server_info,
+bool print_job_resume(const struct auth_serversupplied_info *server_info,
                      struct messaging_context *msg_ctx,
                      int snum, uint32 jobid, WERROR *errcode)
 {
@@ -2651,7 +2651,7 @@ static bool add_to_jobs_added(struct tdb_print_db *pdb, 
uint32 jobid)
  Do all checks needed to determine if we can start a job.
 ***************************************************************************/
 
-static WERROR print_job_checks(struct auth_serversupplied_info *server_info,
+static WERROR print_job_checks(const struct auth_serversupplied_info 
*server_info,
                               struct messaging_context *msg_ctx,
                               int snum, int *njobs)
 {
@@ -2777,7 +2777,7 @@ static WERROR print_job_spool_file(int snum, uint32_t 
jobid,
  Start spooling a job - return the jobid.
 ***************************************************************************/
 
-WERROR print_job_start(struct auth_serversupplied_info *server_info,
+WERROR print_job_start(const struct auth_serversupplied_info *server_info,
                       struct messaging_context *msg_ctx,
                       const char *clientmachine,
                       int snum, const char *docname, const char *filename,
@@ -3236,7 +3236,7 @@ int print_queue_status(struct messaging_context *msg_ctx, 
int snum,
  Pause a queue.
 ****************************************************************************/
 
-WERROR print_queue_pause(struct auth_serversupplied_info *server_info,
+WERROR print_queue_pause(const struct auth_serversupplied_info *server_info,
                         struct messaging_context *msg_ctx, int snum)
 {
        int ret;
@@ -3273,7 +3273,7 @@ WERROR print_queue_pause(struct auth_serversupplied_info 
*server_info,
  Resume a queue.
 ****************************************************************************/
 
-WERROR print_queue_resume(struct auth_serversupplied_info *server_info,
+WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
                          struct messaging_context *msg_ctx, int snum)
 {
        int ret;
@@ -3310,7 +3310,7 @@ WERROR print_queue_resume(struct auth_serversupplied_info 
*server_info,
  Purge a queue - implemented by deleting all jobs that we can delete.
 ****************************************************************************/
 
-WERROR print_queue_purge(struct auth_serversupplied_info *server_info,
+WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
                         struct messaging_context *msg_ctx, int snum)
 {
        print_queue_struct *queue;
diff --git a/source3/rpc_server/rpc_ncacn_np_internal.c 
b/source3/rpc_server/rpc_ncacn_np_internal.c
index 3a3f8ca..0cbbf50 100644
--- a/source3/rpc_server/rpc_ncacn_np_internal.c
+++ b/source3/rpc_server/rpc_ncacn_np_internal.c
@@ -116,7 +116,7 @@ static int close_internal_rpc_pipe_hnd(struct pipes_struct 
*p)
 struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
                                              const struct ndr_syntax_id 
*syntax,
                                              struct client_address *client_id,
-                                             struct auth_serversupplied_info 
*server_info,
+                                             const struct 
auth_serversupplied_info *server_info,
                                              struct messaging_context *msg_ctx)
 {
        struct pipes_struct *p;
@@ -429,7 +429,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX 
*mem_ctx,
                        const struct ndr_syntax_id *abstract_syntax,
                        const struct ndr_interface_table *ndr_table,
                        struct client_address *client_id,
-                       struct auth_serversupplied_info *server_info,
+                       const struct auth_serversupplied_info *server_info,
                        struct messaging_context *msg_ctx,
                        struct dcerpc_binding_handle **binding_handle)
 {
@@ -497,7 +497,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX 
*mem_ctx,
 NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
                               const struct ndr_interface_table *ndr_table,
                               struct client_address *client_id,
-                              struct auth_serversupplied_info *server_info,
+                              const struct auth_serversupplied_info 
*server_info,
                               struct messaging_context *msg_ctx,
                               struct dcerpc_binding_handle **binding_handle)
 {
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 34f9643..1ff78dd 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -383,8 +383,11 @@ static WERROR delete_printer_handle(struct pipes_struct 
*p, struct policy_handle
        /* this does not need a become root since the access check has been
           done on the handle already */
 
-       result = winreg_delete_printer_key(p->mem_ctx, p->server_info,
-                                          p->msg_ctx, Printer->sharename, "");
+       result = winreg_delete_printer_key(p->mem_ctx,
+                                          get_server_info_system(),
+                                          p->msg_ctx,
+                                          Printer->sharename,
+                                          "");
        if (!W_ERROR_IS_OK(result)) {
                DEBUG(3,("Error deleting printer %s\n", Printer->sharename));
                return WERR_BADFID;
@@ -473,7 +476,7 @@ static void prune_printername_cache(void)
 ****************************************************************************/
 
 static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
-                                struct auth_serversupplied_info *server_info,
+                                const struct auth_serversupplied_info 
*server_info,
                                 struct messaging_context *msg_ctx,
                                 Printer_entry *Printer,
                                 const char *handlename)
@@ -669,7 +672,9 @@ static bool open_printer_hnd(struct pipes_struct *p, struct 
policy_handle *hnd,
                return false;
        }
 
-       if (!set_printer_hnd_name(p->mem_ctx, p->server_info, p->msg_ctx,
+       if (!set_printer_hnd_name(p->mem_ctx,
+                                 get_server_info_system(),
+                                 p->msg_ctx,
                                  new_printer, name)) {
                close_printer_handle(p, hnd);
                return false;
@@ -1134,7 +1139,10 @@ static void send_notify2_changes( SPOOLSS_NOTIFY_MSG_CTR 
*ctr, uint32_t idx )
                                }
                        }
 
-                       construct_info_data( &notifies[count], msg->type, 
msg->field, id );
+                       construct_info_data(&notifies[count],
+                                           (enum spoolss_NotifyType) msg->type,
+                                           msg->field,
+                                           id);
 
                        switch(msg->type) {
                        case PRINTER_NOTIFY_TYPE:
@@ -1709,7 +1717,9 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
 
                if (!user_ok_token(uidtoname(p->server_info->utok.uid), NULL,
                                   p->server_info->ptok, snum) ||
-                   !print_access_check(p->server_info, p->msg_ctx, snum,
+                   !print_access_check(get_server_info_system(),
+                                       p->msg_ctx,
+                                       snum,
                                        r->in.access_mask)) {
                        DEBUG(3, ("access DENIED for printer open\n"));
                        close_printer_handle(p, r->out.handle);
@@ -1733,7 +1743,7 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
                        ? "PRINTER_ACCESS_ADMINISTER" : "PRINTER_ACCESS_USE" ));
 
                winreg_create_printer(p->mem_ctx,
-                                     p->server_info,
+                                     get_server_info_system(),
                                      p->msg_ctx,
                                      Printer->servername,
                                      lp_const_servicename(snum));
@@ -1825,7 +1835,7 @@ WERROR _spoolss_DeletePrinter(struct pipes_struct *p,
 
        if (get_printer_snum(p, r->in.handle, &snum, NULL)) {
                winreg_delete_printer_key(p->mem_ctx,
-                                         p->server_info,
+                                         get_server_info_system(),
                                          p->msg_ctx,
                                          lp_const_servicename(snum),
                                          "");
@@ -1900,7 +1910,9 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct 
*p,
        if ((version = get_version_id(r->in.architecture)) == -1)
                return WERR_INVALID_ENVIRONMENT;
 
-       status = winreg_get_driver(p->mem_ctx, p->server_info, p->msg_ctx,
+       status = winreg_get_driver(p->mem_ctx,
+                                  get_server_info_system(),
+                                  p->msg_ctx,
                                   r->in.architecture, r->in.driver,
                                   version, &info);
        if (!W_ERROR_IS_OK(status)) {
@@ -1909,7 +1921,8 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct 
*p,
                if ( version == 2 ) {
                        version = 3;
 
-                       status = winreg_get_driver(p->mem_ctx, p->server_info,
+                       status = winreg_get_driver(p->mem_ctx,
+                                                  get_server_info_system(),
                                                   p->msg_ctx,
                                                   r->in.architecture,
                                                   r->in.driver,
@@ -1927,14 +1940,17 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct 
*p,
 
        }
 
-       if (printer_driver_in_use(p->mem_ctx, p->server_info, p->msg_ctx,
+       if (printer_driver_in_use(p->mem_ctx,
+                                 get_server_info_system(),
+                                 p->msg_ctx,
                                  info)) {
                status = WERR_PRINTER_DRIVER_IN_USE;
                goto done;
        }
 
        if (version == 2) {
-               status = winreg_get_driver(p->mem_ctx, p->server_info,
+               status = winreg_get_driver(p->mem_ctx,
+                                          get_server_info_system(),
                                           p->msg_ctx,
                                           r->in.architecture,
                                           r->in.driver, 3, &info_win2k);
@@ -1943,7 +1959,7 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct 
*p,
                        /* remove the Win2k driver first*/
 
                        status = winreg_del_driver(p->mem_ctx,
-                                                  p->server_info,
+                                                  get_server_info_system(),
                                                   p->msg_ctx,
                                                   info_win2k, 3);
                        talloc_free(info_win2k);
@@ -1955,7 +1971,9 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct 
*p,
                }
        }
 
-       status = winreg_del_driver(p->mem_ctx, p->server_info, p->msg_ctx,
+       status = winreg_del_driver(p->mem_ctx,
+                                  get_server_info_system(),
+                                  p->msg_ctx,
                                   info, version);
 
 done:
@@ -2001,9 +2019,13 @@ WERROR _spoolss_DeletePrinterDriverEx(struct 
pipes_struct *p,
        if (r->in.delete_flags & DPD_DELETE_SPECIFIC_VERSION)
                version = r->in.version;
 
-       status = winreg_get_driver(p->mem_ctx, p->server_info,
-                                  p->msg_ctx, r->in.architecture,
-                                  r->in.driver, version, &info);
+       status = winreg_get_driver(p->mem_ctx,
+                                  get_server_info_system(),
+                                  p->msg_ctx,
+                                  r->in.architecture,
+                                  r->in.driver,
+                                  version,
+                                  &info);
        if (!W_ERROR_IS_OK(status)) {
                status = WERR_UNKNOWN_PRINTER_DRIVER;
 
@@ -2019,7 +2041,9 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct 
*p,
                /* try for Win2k driver if "Windows NT x86" */
 
                version = 3;
-               status = winreg_get_driver(info, p->server_info, p->msg_ctx,
+               status = winreg_get_driver(info,
+                                          get_server_info_system(),
+                                          p->msg_ctx,
                                           r->in.architecture,
                                           r->in.driver,
                                           version, &info);
@@ -2029,7 +2053,10 @@ WERROR _spoolss_DeletePrinterDriverEx(struct 
pipes_struct *p,
                }


-- 
Samba Shared Repository

Reply via email to