s3-printing: Make auth_serversupplied_info const.
authorAndreas Schneider <asn@cynapses.org>
Thu, 9 Sep 2010 09:32:03 +0000 (11:32 +0200)
committerAndreas Schneider <asn@samba.org>
Thu, 9 Sep 2010 14:00:08 +0000 (16:00 +0200)
source3/include/nt_printing.h
source3/include/printing.h
source3/printing/nt_printing.c
source3/printing/printing.c

index 7ebacc6985434b7298accb60efc2d5a7e5f8a5be..f56ddcbf67929cea81d8b0b34de0c788f820827c 100644 (file)
@@ -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);
 
index 180f6a0e30910e17b4c3f854ab35706da856b506..36726b342fbaa8c974612b119d9522463dfa5db2 100644 (file)
@@ -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_ */
index 97899fd505c98a8ff6009873c50fc836ef97ba14..9f4ede22bd8c92e0a53757efa4e768dd8e0f78e6 100644 (file)
@@ -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)
 {
index ca6139cad5425ecedadfee9782ff109d1df164ad..1568acac0798eff44dd1de7697d96e916d24dc28 100644 (file)
@@ -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;