]> andersk Git - moira.git/blobdiff - gen/cups-print.pc
Samba queues, browsing changes.
[moira.git] / gen / cups-print.pc
index 7e5ba533b6320db59e7efdb7fd26659ec82f6687..0bad9ecdd73e1537da691927e86da54d0dc9793b 100644 (file)
 #include <string.h>
 
 #include <time.h>
+#ifdef HAVE_KRB4
 #include <krb.h>
+#endif
 #include <krb5.h>
 
 #include "util.h"
 
-
-
 EXEC SQL INCLUDE sqlca;
 
 RCSID("$Header$");
@@ -35,11 +35,12 @@ char *db = "moira/moira";
 
 /* OMG, I hate this, but it's cleaner, I guess? */
 
-const char *alterjob = "<Limit Send-Document Send-URI Hold-Job Release-Job\
- Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription\
- Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job\
+const char *alterjob = "<Limit Hold-Job Release-Job\
+ Restart-Job Purge-Jobs Reprocess-Job Set-Job-Attributes\
  Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>";
-const char *submitjob = "<Limit Create-Job Print-Job Print-URI>";
+const char *submitjob = "<Limit Create-Job Print-Job Print-URI Send-Document\
+ Set-Job-Attributes Send-URI Create-Job-Subscription Renew-Subscription\
+ Cancel-Subscription Get-Notifications CUPS-Move-Job>";
 const char *alterpntr = "<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer\
  CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>";
 const char *lpcpntr = "<Limit Pause-Printer Resume-Printer Enable-Printer\
@@ -338,12 +339,20 @@ void do_host(char *host)
   fprintf(out, "ServerKey /etc/cups/ssl/%s-ipp-key.pem\n", lhost);
   fprintf(out, "ServerName %s\n", lhost);
   fprintf(out, "Krb5Keytab /etc/krb5-ipp.keytab\n");
-  fprintf(out, "Browsing On\n");
-  fprintf(out, "BrowseProtocols cups\n");
+  /* fprintf(out, "Browsing On\n"); */
+  /* fprintf(out, "BrowseProtocols cups\n"); */
 
   /* The other CUPS servers should be aware of the other hosts'
      queues, so we'll let them browse each other. */
+  fprintf(out, "Include cups.local.conf\n");
+  fprintf(out, "Include cups.hosts.conf\n");
+  fprintf(out, "Include cups.locations.conf\n");
+  fprintf(out, "Include cups.policies.conf\n");
+  tarfile_end(tf);
 
+  /* cups.hosts.conf */
+  out = tarfile_start(tf, "/etc/cups/cups.hosts.conf", 0755, 1, 1,
+                     "root", "lp", now);
   EXEC SQL DECLARE csr_cupshosts CURSOR FOR
     SELECT m.name AS cupshosts FROM machine m, printservers ps
     WHERE m.mach_id = ps.mach_id AND ps.kind = 'CUPS';
@@ -361,8 +370,6 @@ void do_host(char *host)
          fprintf(out, "BrowsePoll %s\n", cupshosts);
     }
   EXEC SQL CLOSE csr_cupshosts;
-  fprintf(out, "Include cups.locations.conf\n");
-  fprintf(out, "Include cups.policies.conf\n");
 
   tarfile_end(tf);
 
@@ -404,9 +411,10 @@ void do_host(char *host)
       fprintf (out, "Require user @OWNER @SYSTEM\n");
       printer_user_list(out, "LIST", top_lpc_acl, "Require user");
       fprintf (out, "Order deny,allow\n");
+      fprintf (out, "Allow from all\n");
       fprintf (out, "</Limit>\n");
-      fprintf (out, "AuthType None\n");
       fprintf (out, "%s\n", catchall);
+      fprintf (out, "AuthType None\n");
       fprintf (out, "Order deny,allow\n");
       fprintf (out, "Allow from all\n");
       fprintf (out, "</Limit>\n");
@@ -435,6 +443,7 @@ void do_host(char *host)
       fprintf (out, "Require user @OWNER @SYSTEM\n");
       printer_user_list(out, "LIST", lpc_acl, "Require user");
       fprintf (out, "Order deny,allow\n");
+      fprintf (out, "Allow from all\n");
       fprintf (out, "</Limit>\n");
       fprintf (out, "%s\n", submitjob);
       /* If the printer is Kerberized? */
This page took 0.032987 seconds and 4 git commands to generate.