#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$");
/* 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\
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';
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);
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");
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? */