Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| d35c99205a |
+70
-1
@@ -1,6 +1,75 @@
|
||||
CHANGES.txt - 2009-08-07
|
||||
CHANGES.txt - 2009-11-09
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS V1.4.2
|
||||
|
||||
- SECURITY: The CUPS web interface was vulnerable to several XSS and
|
||||
HTTP header/body attacks via attribute injection (STR #3367,
|
||||
STR #3401)
|
||||
- Fixed localization errors (STR #3359, STR #3372, STR #3380, STR #3387)
|
||||
- The documentation for classes.conf and printers.conf did not provide
|
||||
the correct instructions for manual changes (STR #3351)
|
||||
- The scheduler did not always rebuild printer cache files when the
|
||||
driver was changed (STR #3356)
|
||||
- The documentation makefile failed to install localizations when using
|
||||
newer versions of Bash (STR #3360)
|
||||
- The configure script did not use the --with-xinetd value for the
|
||||
default LPD configuration path (STR #3347)
|
||||
- The configure script incorrectly required glib for DBUS support
|
||||
(STR #3346)
|
||||
- The cupstestppd program incorrectly reported filters with bad
|
||||
permisssions as missing (STR #3363)
|
||||
- The cups.desktop file used the wrong locale names (STR #3358)
|
||||
- cupsSideChannelRead() did not return an error for short reads.
|
||||
- The installed PAM configuration file did not use the correct options
|
||||
with the pam_unix2 module (STR #3313)
|
||||
- The scheduler did not preserve default options that contained special
|
||||
characters (STR #3340)
|
||||
- The scheduler did not remove old pre-filters when updating a printer
|
||||
driver (STR #3342)
|
||||
- The HP/GL-2 filter did not check for early end-of-file (STR #3319)
|
||||
- The USB backend did not compile on some platforms (STR #3332)
|
||||
- cupsSideChannelSNMPWalk() could go into an infinite loop with broken
|
||||
SNMP implementations.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4.1
|
||||
|
||||
- Documention fixes (STR #3296)
|
||||
- SNMP supply levels and states were wrong for some printers.
|
||||
- The IPP backend did not update the auth-info-required value.
|
||||
- The libusb-based USB backend would hang at the end of the job
|
||||
(STR #3315, STR #3318)
|
||||
- DNS-SD registrations for raw queues had an empty "ty" key (STR #3299)
|
||||
- The JPEG and BMP MIME type rules were broken (STR #3284)
|
||||
- cupsGetNamedDest returned the default printer when the named
|
||||
destination did not exist (STR #3285)
|
||||
- The JobKillDelay was not triggered for canceled jobs (STR #3292)
|
||||
- The PPD compiler could get in an infinite loop (STR #3293)
|
||||
- The configure check for dns-sd.h was broken (STR #3297)
|
||||
- The "Query Printer for Default Options" page did not go away if the
|
||||
query job was held (STR #3302)
|
||||
- Boolean options did not show up as selected in the web interface
|
||||
(STR #3303)
|
||||
- The scheduler did not cache or report driver information files
|
||||
correctly, leading to a variety of issues (STR #3283, STR #3297,
|
||||
STR #3305)
|
||||
- cupsDoIORequest() did not abort on permanent errors (STR #3311)
|
||||
- Modifying a class in the web interface did not work (STR #3312)
|
||||
- BrowseLocalProtocols could be cleared when changing the sharing
|
||||
setting (STR #3287)
|
||||
- The scheduler could return an empty supported document format
|
||||
(STR #3308)
|
||||
- The PPD compiler generated invalid PPD files when the locale used
|
||||
something other than "." for the decimal point (STR #3300)
|
||||
- The IPP backend did not handle some non-comforming IPP printer
|
||||
implementations (STR #3262)
|
||||
- The scheduler leaked three file descriptors to each job filter
|
||||
(STR #3263)
|
||||
- The scheduler now uses a default CUPS-Get-Devices timeout of 15
|
||||
seconds (STR #3307)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4.0
|
||||
|
||||
- Localization updates (STR #3223, STR #3246, STR #3248, STR #3250)
|
||||
|
||||
@@ -276,16 +276,16 @@ extern int backendGetDeviceID(int fd, char *device_id,
|
||||
extern int backendGetMakeModel(const char *device_id,
|
||||
char *make_model,
|
||||
int make_model_size);
|
||||
extern void backendNetworkSideCB(int print_fd, int device_fd,
|
||||
extern int backendNetworkSideCB(int print_fd, int device_fd,
|
||||
int snmp_fd, http_addr_t *addr,
|
||||
int use_bc);
|
||||
extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd,
|
||||
http_addr_t *addr, int use_bc,
|
||||
void (*side_cb)(int print_fd,
|
||||
int device_fd,
|
||||
int snmp_fd,
|
||||
http_addr_t *addr,
|
||||
int use_bc));
|
||||
int (*side_cb)(int print_fd,
|
||||
int device_fd,
|
||||
int snmp_fd,
|
||||
http_addr_t *addr,
|
||||
int use_bc));
|
||||
extern int backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
|
||||
int *page_count,
|
||||
int *printer_state);
|
||||
|
||||
+46
-20
@@ -45,6 +45,8 @@
|
||||
|
||||
static char *password = NULL; /* Password for device URI */
|
||||
static int password_tries = 0; /* Password tries */
|
||||
static const char *auth_info_required = "none";
|
||||
/* New auth-info-required value */
|
||||
#ifdef __APPLE__
|
||||
static char pstmpname[1024] = ""; /* Temporary PostScript file name */
|
||||
#endif /* __APPLE__ */
|
||||
@@ -1049,16 +1051,21 @@ main(int argc, /* I - Number of command-line args */
|
||||
_cupsLangPrintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
|
||||
cupsLastErrorString());
|
||||
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED)
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n",
|
||||
httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE));
|
||||
|
||||
/*
|
||||
* Normal authentication goes through the password callback, which sets
|
||||
* auth_info_required to "username,password". Kerberos goes directly
|
||||
* through GSSAPI, so look for Negotiate in the WWW-Authenticate header
|
||||
* here and set auth_info_required as needed...
|
||||
*/
|
||||
|
||||
if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
|
||||
"Negotiate", 9))
|
||||
fputs("ATTR: auth-info-required=negotiate\n", stderr);
|
||||
else
|
||||
fputs("ATTR: auth-info-required=username,password\n", stderr);
|
||||
auth_info_required = "negotiate";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1239,6 +1246,19 @@ main(int argc, /* I - Number of command-line args */
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* If the printer does not return a job-state attribute, it does not
|
||||
* conform to the IPP specification - break out immediately and fail
|
||||
* the job...
|
||||
*/
|
||||
|
||||
fputs("DEBUG: No job-state available from printer - stopping queue.\n",
|
||||
stderr);
|
||||
ipp_status = IPP_INTERNAL_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ippDelete(response);
|
||||
@@ -1283,6 +1303,15 @@ main(int argc, /* I - Number of command-line args */
|
||||
page_count > start_count)
|
||||
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
/*
|
||||
* See if we used Kerberos at all...
|
||||
*/
|
||||
|
||||
if (http->gssctx)
|
||||
auth_info_required = "negotiate";
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
/*
|
||||
* Free memory...
|
||||
*/
|
||||
@@ -1315,8 +1344,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Return the queue status...
|
||||
*/
|
||||
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED)
|
||||
fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required);
|
||||
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
|
||||
return (CUPS_BACKEND_AUTH_REQUIRED);
|
||||
else if (ipp_status == IPP_INTERNAL_ERROR)
|
||||
return (CUPS_BACKEND_STOP);
|
||||
else if (ipp_status > IPP_OK_CONFLICT)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
else
|
||||
@@ -1517,6 +1550,12 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
|
||||
{
|
||||
(void)prompt;
|
||||
|
||||
/*
|
||||
* Remember that we need to authenticate...
|
||||
*/
|
||||
|
||||
auth_info_required = "username,password";
|
||||
|
||||
if (password && *password && password_tries < 3)
|
||||
{
|
||||
password_tries ++;
|
||||
@@ -1526,23 +1565,10 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
|
||||
else
|
||||
{
|
||||
/*
|
||||
* If there is no password set in the device URI, return the
|
||||
* "authentication required" exit code...
|
||||
* Give up after 3 tries or if we don't have a password to begin with...
|
||||
*/
|
||||
|
||||
if (tmpfilename[0])
|
||||
unlink(tmpfilename);
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (pstmpname[0])
|
||||
unlink(pstmpname);
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
fputs("ATTR: auth-info-required=username,password\n", stderr);
|
||||
|
||||
exit(CUPS_BACKEND_AUTH_REQUIRED);
|
||||
|
||||
return (NULL); /* Eliminate compiler warning */
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-6
@@ -61,7 +61,7 @@ backendCheckSideChannel(
|
||||
* 'backendNetworkSideCB()' - Handle common network side-channel commands.
|
||||
*/
|
||||
|
||||
void
|
||||
int /* O - -1 on error, 0 on success */
|
||||
backendNetworkSideCB(
|
||||
int print_fd, /* I - Print file or -1 */
|
||||
int device_fd, /* I - Device file or -1 */
|
||||
@@ -79,10 +79,7 @@ backendNetworkSideCB(
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
return (-1);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -284,7 +281,7 @@ backendNetworkSideCB(
|
||||
break;
|
||||
}
|
||||
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-10
@@ -1278,7 +1278,7 @@ int papCancelRequest(int sockfd, u_short tid)
|
||||
* 'sidechannel_request()' - Handle side-channel requests.
|
||||
*/
|
||||
|
||||
static void
|
||||
static int
|
||||
sidechannel_request()
|
||||
{
|
||||
cups_sc_command_t command; /* Request command */
|
||||
@@ -1289,32 +1289,29 @@ sidechannel_request()
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
{
|
||||
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
|
||||
return;
|
||||
}
|
||||
return (-1);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
case CUPS_SC_CMD_GET_BIDI: /* Is the connection bidirectional? */
|
||||
data[0] = 1;
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0));
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_STATE: /* Return device state */
|
||||
data[0] = CUPS_SC_STATE_ONLINE;
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0));
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */
|
||||
case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */
|
||||
case CUPS_SC_CMD_GET_DEVICE_ID: /* Return IEEE-1284 device ID */
|
||||
default:
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
|
||||
NULL, 0, 1.0);
|
||||
return (cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
|
||||
NULL, 0, 1.0));
|
||||
break;
|
||||
}
|
||||
return;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
*/
|
||||
|
||||
static void list_devices(void);
|
||||
static void side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
static int side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
http_addr_t *addr, int use_bc);
|
||||
|
||||
|
||||
@@ -615,7 +615,7 @@ list_devices(void)
|
||||
* 'side_cb()' - Handle side-channel requests...
|
||||
*/
|
||||
|
||||
static void
|
||||
static int /* O - 0 on success, -1 on error */
|
||||
side_cb(int print_fd, /* I - Print file */
|
||||
int device_fd, /* I - Device file */
|
||||
int snmp_fd, /* I - SNMP socket (unused) */
|
||||
@@ -634,10 +634,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
return (-1);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -680,7 +677,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
}
|
||||
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -147,7 +147,7 @@ backendRunLoop(
|
||||
int snmp_fd, /* I - SNMP socket or -1 if none */
|
||||
http_addr_t *addr, /* I - Address of device */
|
||||
int use_bc, /* I - Use back-channel? */
|
||||
void (*side_cb)(int, int, int, http_addr_t *, int))
|
||||
int (*side_cb)(int, int, int, http_addr_t *, int))
|
||||
/* I - Side-channel callback */
|
||||
{
|
||||
int nfds; /* Maximum file descriptor value + 1 */
|
||||
@@ -274,7 +274,8 @@ backendRunLoop(
|
||||
* loop since it may have read from print_fd...
|
||||
*/
|
||||
|
||||
(*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc);
|
||||
if ((*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc))
|
||||
side_cb = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+9
-11
@@ -84,7 +84,7 @@
|
||||
*/
|
||||
|
||||
static void list_devices(void);
|
||||
static void side_cb(int print_fd, int device_fd, int use_bc);
|
||||
static int side_cb(int print_fd, int device_fd, int use_bc);
|
||||
|
||||
|
||||
/*
|
||||
@@ -109,7 +109,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
sep; /* Option separator */
|
||||
int port; /* Port number (not used) */
|
||||
int copies; /* Number of copies to print */
|
||||
int print_fd, /* Print file */
|
||||
int side_eof = 0, /* Saw EOF on side-channel? */
|
||||
print_fd, /* Print file */
|
||||
device_fd; /* Serial device */
|
||||
int nfds; /* Maximum file descriptor value + 1 */
|
||||
fd_set input, /* Input set for reading */
|
||||
@@ -558,7 +559,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
if (!print_bytes)
|
||||
FD_SET(print_fd, &input);
|
||||
FD_SET(device_fd, &input);
|
||||
if (!print_bytes)
|
||||
if (!print_bytes && !side_eof)
|
||||
FD_SET(CUPS_SC_FD, &input);
|
||||
|
||||
FD_ZERO(&output);
|
||||
@@ -579,7 +580,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* loop since it may have read from print_fd...
|
||||
*/
|
||||
|
||||
side_cb(print_fd, device_fd, 1);
|
||||
if (side_cb(print_fd, device_fd, 1))
|
||||
side_eof = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1278,7 +1280,7 @@ list_devices(void)
|
||||
* 'side_cb()' - Handle side-channel requests...
|
||||
*/
|
||||
|
||||
static void
|
||||
static int /* O - 0 on success, -1 on error */
|
||||
side_cb(int print_fd, /* I - Print file */
|
||||
int device_fd, /* I - Device file */
|
||||
int use_bc) /* I - Using back-channel? */
|
||||
@@ -1292,11 +1294,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
{
|
||||
_cupsLangPuts(stderr,
|
||||
_("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
return (-1);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -1323,7 +1321,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
}
|
||||
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -229,8 +229,11 @@ backendSNMPSupplies(
|
||||
packet.object_type != CUPS_ASN1_OCTET_STRING)
|
||||
return (-1);
|
||||
|
||||
new_state = (packet.object_value.string.bytes[0] << 8) |
|
||||
packet.object_value.string.bytes[1];
|
||||
if (packet.object_value.string.num_bytes == 2)
|
||||
new_state = (packet.object_value.string.bytes[0] << 8) |
|
||||
packet.object_value.string.bytes[1];
|
||||
else
|
||||
new_state = 0;
|
||||
|
||||
if (current_state < 0)
|
||||
change_state = 0xffff;
|
||||
|
||||
+13
-20
@@ -292,9 +292,8 @@ static void status_timer_cb(CFRunLoopTimerRef timer, void *info);
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static pid_t child_pid; /* Child PID */
|
||||
static void run_legacy_backend(int argc, char *argv[], int fd); /* Starts child backend process running as a ppc executable */
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
static int job_canceled = 0; /* Was the job canceled? */
|
||||
static void sigterm_handler(int sig); /* SIGTERM handler */
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
|
||||
#ifdef PARSE_PS_ERRORS
|
||||
static const char *next_line (const char *buffer);
|
||||
@@ -461,9 +460,9 @@ print_device(const char *uri, /* I - Device URI */
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
|
||||
/*
|
||||
* Now that we are "connected" to the port, catch SIGTERM so that we
|
||||
* Now that we are "connected" to the port, ignore SIGTERM so that we
|
||||
* can finish out any page data the driver sends (e.g. to eject the
|
||||
* current page... Only catch SIGTERM if we are printing data from
|
||||
* current page... Only ignore SIGTERM if we are printing data from
|
||||
* stdin (otherwise you can't cancel raw jobs...)
|
||||
*/
|
||||
|
||||
@@ -475,7 +474,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
memset(&action, 0, sizeof(action));
|
||||
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_handler = sigterm_handler;
|
||||
action.sa_handler = SIG_IGN;
|
||||
sigaction(SIGTERM, &action, NULL);
|
||||
}
|
||||
|
||||
@@ -698,7 +697,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
else if (iostatus == kIOReturnAborted)
|
||||
{
|
||||
fputs("DEBUG: Got return aborted during write!\n", stderr);
|
||||
fputs("DEBUG: Got USB return aborted during write!\n", stderr);
|
||||
|
||||
IOReturn err = (*g.classdriver)->Abort(g.classdriver);
|
||||
fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n", err);
|
||||
@@ -725,7 +724,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n",
|
||||
err);
|
||||
|
||||
status = job_canceled ? CUPS_BACKEND_FAILED : CUPS_BACKEND_STOP;
|
||||
status = CUPS_BACKEND_FAILED;
|
||||
break;
|
||||
}
|
||||
else if (bytes > 0)
|
||||
@@ -898,11 +897,11 @@ static void *read_thread(void *reference)
|
||||
#endif
|
||||
}
|
||||
else if (readstatus == kIOUSBTransactionTimeout)
|
||||
fputs("DEBUG: Got USB transaction timeout during write!\n", stderr);
|
||||
fputs("DEBUG: Got USB transaction timeout during read!\n", stderr);
|
||||
else if (readstatus == kIOUSBPipeStalled)
|
||||
fputs("DEBUG: Got USB pipe stalled during read!\n", stderr);
|
||||
else if (readstatus == kIOReturnAborted)
|
||||
fputs("DEBUG: Got return aborted during read!\n", stderr);
|
||||
fputs("DEBUG: Got USB return aborted during read!\n", stderr);
|
||||
|
||||
/*
|
||||
* Make sure this loop executes no more than once every 250 miliseconds...
|
||||
@@ -944,7 +943,7 @@ sidechannel_thread(void *reference)
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
continue;
|
||||
break;
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -2020,8 +2019,6 @@ static void run_legacy_backend(int argc,
|
||||
|
||||
exit(exitstatus);
|
||||
}
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
|
||||
|
||||
/*
|
||||
* 'sigterm_handler()' - SIGTERM handler.
|
||||
@@ -2030,7 +2027,8 @@ static void run_legacy_backend(int argc,
|
||||
static void
|
||||
sigterm_handler(int sig) /* I - Signal */
|
||||
{
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/* If we started a child process pass the signal on to it...
|
||||
*/
|
||||
if (child_pid)
|
||||
{
|
||||
/*
|
||||
@@ -2052,15 +2050,10 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
exit(CUPS_BACKEND_STOP);
|
||||
}
|
||||
}
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
|
||||
/*
|
||||
* Otherwise just flag that the job has been canceled...
|
||||
*/
|
||||
|
||||
job_canceled = 1;
|
||||
}
|
||||
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
|
||||
|
||||
#ifdef PARSE_PS_ERRORS
|
||||
/*
|
||||
|
||||
+18
-7
@@ -158,7 +158,16 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
while (poll(pfds, 2, -1) > 0)
|
||||
{
|
||||
if (pfds[0].revents & POLLIN)
|
||||
/*
|
||||
* CUPS STR #3318: USB process hangs on end-of-file, making further
|
||||
* printing impossible
|
||||
*
|
||||
* From a strict interpretation of POSIX poll(), POLLHUP should never be
|
||||
* set without POLLIN, since POLLIN is the event you request. That said,
|
||||
* it appears that some versions of Linux break this.
|
||||
*/
|
||||
|
||||
if (pfds[0].revents & (POLLIN | POLLHUP))
|
||||
{
|
||||
if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0)
|
||||
{
|
||||
@@ -178,8 +187,13 @@ print_device(const char *uri, /* I - Device URI */
|
||||
break;
|
||||
}
|
||||
|
||||
if (pfds[1].revents & POLLIN)
|
||||
tbytes += side_cb(printer, print_fd);
|
||||
if (pfds[1].revents & (POLLIN | POLLHUP))
|
||||
{
|
||||
if ((bytes = side_cb(printer, print_fd)) < 0)
|
||||
pfds[1].events = 0; /* Filter has gone away... */
|
||||
else
|
||||
tbytes += bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -745,10 +759,7 @@ side_cb(usb_printer_t *printer, /* I - Printer */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return (0);
|
||||
}
|
||||
return (-1);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
static int open_device(const char *uri, int *use_bc);
|
||||
static void side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
static int side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
http_addr_t *addr, int use_bc);
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ open_device(const char *uri, /* I - Device URI */
|
||||
* 'side_cb()' - Handle side-channel requests...
|
||||
*/
|
||||
|
||||
static void
|
||||
static int /* O - 0 on success, -1 on error */
|
||||
side_cb(int print_fd, /* I - Print file */
|
||||
int device_fd, /* I - Device file */
|
||||
int snmp_fd, /* I - SNMP socket (unused) */
|
||||
@@ -579,10 +579,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
return (-1);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -625,7 +622,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
}
|
||||
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+91
-4
@@ -122,6 +122,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "admin");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* See if we have form data...
|
||||
@@ -191,7 +192,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
}
|
||||
else if (op && !strcmp(op, "redirect"))
|
||||
{
|
||||
const char *url; /* Redirection URL... */
|
||||
const char *url; /* Redirection URL... */
|
||||
char prefix[1024]; /* URL prefix */
|
||||
|
||||
|
||||
@@ -205,7 +206,50 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
fprintf(stderr, "DEBUG: redirecting with prefix %s!\n", prefix);
|
||||
|
||||
if ((url = cgiGetVariable("URL")) != NULL)
|
||||
printf("Location: %s%s\n\n", prefix, url);
|
||||
{
|
||||
char encoded[1024], /* Encoded URL string */
|
||||
*ptr; /* Pointer into encoded string */
|
||||
|
||||
|
||||
ptr = encoded;
|
||||
if (*url != '/')
|
||||
*ptr++ = '/';
|
||||
|
||||
for (; *url && ptr < (encoded + sizeof(encoded) - 4); url ++)
|
||||
{
|
||||
if (strchr("%@&+ <>#=", *url) || *url < ' ' || *url & 128)
|
||||
{
|
||||
/*
|
||||
* Percent-encode this character; safe because we have at least 4
|
||||
* bytes left in the array...
|
||||
*/
|
||||
|
||||
sprintf(ptr, "%%%02X", *url & 255);
|
||||
ptr += 3;
|
||||
}
|
||||
else
|
||||
*ptr++ = *url;
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
if (*url)
|
||||
{
|
||||
/*
|
||||
* URL was too long, just redirect to the admin page...
|
||||
*/
|
||||
|
||||
printf("Location: %s/admin\n\n", prefix);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* URL is OK, redirect there...
|
||||
*/
|
||||
|
||||
printf("Location: %s%s\n\n", prefix, encoded);
|
||||
}
|
||||
}
|
||||
else
|
||||
printf("Location: %s/admin\n\n", prefix);
|
||||
}
|
||||
@@ -345,6 +389,31 @@ do_add_rss_subscription(http_t *http) /* I - HTTP connection */
|
||||
* and classes and (re)show the add page...
|
||||
*/
|
||||
|
||||
if (cgiGetVariable("EVENT_JOB_CREATED"))
|
||||
cgiSetVariable("EVENT_JOB_CREATED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_JOB_COMPLETED"))
|
||||
cgiSetVariable("EVENT_JOB_COMPLETED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_JOB_STOPPED"))
|
||||
cgiSetVariable("EVENT_JOB_STOPPED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_JOB_CONFIG_CHANGED"))
|
||||
cgiSetVariable("EVENT_JOB_CONFIG_CHANGED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_STOPPED"))
|
||||
cgiSetVariable("EVENT_PRINTER_STOPPED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_ADDED"))
|
||||
cgiSetVariable("EVENT_PRINTER_ADDED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_MODIFIED"))
|
||||
cgiSetVariable("EVENT_PRINTER_MODIFIED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_DELETED"))
|
||||
cgiSetVariable("EVENT_PRINTER_DELETED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_STARTED"))
|
||||
cgiSetVariable("EVENT_SERVER_STARTED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_STOPPED"))
|
||||
cgiSetVariable("EVENT_SERVER_STOPPED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_RESTARTED"))
|
||||
cgiSetVariable("EVENT_SERVER_RESTARTED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_AUDIT"))
|
||||
cgiSetVariable("EVENT_SERVER_AUDIT", "CHECKED");
|
||||
|
||||
request = ippNewRequest(CUPS_GET_PRINTERS);
|
||||
response = cupsDoRequest(http, request, "/");
|
||||
|
||||
@@ -467,6 +536,7 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
ipp_attribute_t *attr; /* member-uris attribute */
|
||||
char uri[HTTP_MAX_URI]; /* Device or printer URI */
|
||||
const char *name, /* Pointer to class name */
|
||||
*op, /* Operation name */
|
||||
*ptr; /* Pointer to CGI variable */
|
||||
const char *title; /* Title of page */
|
||||
static const char * const pattrs[] = /* Requested printer attributes */
|
||||
@@ -478,6 +548,7 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
title = cgiText(modify ? _("Modify Class") : _("Add Class"));
|
||||
op = cgiGetVariable("OP");
|
||||
name = cgiGetVariable("PRINTER_NAME");
|
||||
|
||||
if (cgiGetVariable("PRINTER_LOCATION") == NULL)
|
||||
@@ -502,6 +573,12 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
* Do the request and get back a response...
|
||||
*/
|
||||
|
||||
cgiClearVariables();
|
||||
if (op)
|
||||
cgiSetVariable("OP", op);
|
||||
if (name)
|
||||
cgiSetVariable("PRINTER_NAME", name);
|
||||
|
||||
if ((response = cupsDoRequest(http, request, "/")) != NULL)
|
||||
{
|
||||
/*
|
||||
@@ -634,6 +711,15 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!name)
|
||||
{
|
||||
cgiStartHTML(title);
|
||||
cgiSetVariable("ERROR", cgiText(_("Missing form variable!")));
|
||||
cgiCopyTemplateLang("error.tmpl");
|
||||
cgiEndHTML();
|
||||
return;
|
||||
}
|
||||
|
||||
for (ptr = name; *ptr; ptr ++)
|
||||
if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#')
|
||||
break;
|
||||
@@ -668,8 +754,7 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
request = ippNewRequest(CUPS_ADD_CLASS);
|
||||
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
|
||||
"localhost", 0, "/classes/%s",
|
||||
cgiGetVariable("PRINTER_NAME"));
|
||||
"localhost", 0, "/classes/%s", name);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
@@ -2613,7 +2698,9 @@ do_menu(http_t *http) /* I - HTTP connection */
|
||||
if ((val = cupsGetOption("DefaultAuthType", num_settings,
|
||||
settings)) != NULL && !strcasecmp(val, "Negotiate"))
|
||||
cgiSetVariable("KERBEROS", "CHECKED");
|
||||
else
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cgiSetVariable("KERBEROS", "");
|
||||
|
||||
#ifdef HAVE_DNSSD
|
||||
cgiSetVariable("HAVE_DNSSD", "1");
|
||||
|
||||
@@ -54,6 +54,7 @@ typedef struct cgi_file_s /**** Uploaded file data ****/
|
||||
extern void cgiAbort(const char *title, const char *stylesheet,
|
||||
const char *format, ...);
|
||||
extern int cgiCheckVariables(const char *names);
|
||||
extern void cgiClearVariables(void);
|
||||
extern void *cgiCompileSearch(const char *query);
|
||||
extern void cgiCopyTemplateFile(FILE *out, const char *tmpl);
|
||||
extern void cgiCopyTemplateLang(const char *tmpl);
|
||||
|
||||
@@ -72,6 +72,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "classes");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* See if we are displaying a printer or all classes...
|
||||
|
||||
+9
-2
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Online help CGI for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007-2009 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -63,6 +63,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "help");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* Load the help index...
|
||||
@@ -102,7 +103,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
for (i = 0; i < argc; i ++)
|
||||
fprintf(stderr, "argv[%d]=\"%s\"\n", i, argv[i]);
|
||||
fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
|
||||
|
||||
if ((helpfile = getenv("PATH_INFO")) != NULL)
|
||||
{
|
||||
@@ -182,6 +183,12 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
topic = cgiGetVariable("TOPIC");
|
||||
si = helpSearchIndex(hi, query, topic, helpfile);
|
||||
|
||||
cgiClearVariables();
|
||||
if (query)
|
||||
cgiSetVariable("QUERY", query);
|
||||
if (topic)
|
||||
cgiSetVariable("TOPIC", topic);
|
||||
|
||||
fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",
|
||||
query ? query : "(null)", topic ? topic : "(null)");
|
||||
|
||||
|
||||
+28
-11
@@ -650,7 +650,8 @@ cgiPrintCommand(http_t *http, /* I - Connection to server */
|
||||
cgiSetIPPVars(response, NULL, NULL, NULL, 0);
|
||||
|
||||
attr = ippFindAttribute(response, "job-state", IPP_TAG_ENUM);
|
||||
if (!attr || attr->values[0].integer >= IPP_JOB_STOPPED)
|
||||
if (!attr || attr->values[0].integer >= IPP_JOB_STOPPED ||
|
||||
attr->values[0].integer == IPP_JOB_HELD)
|
||||
{
|
||||
ippDelete(response);
|
||||
break;
|
||||
@@ -1397,7 +1398,9 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
int ascending, /* Order of jobs (0 = descending) */
|
||||
first, /* First job to show */
|
||||
count; /* Number of jobs */
|
||||
const char *var; /* Form variable */
|
||||
const char *var, /* Form variable */
|
||||
*query, /* Query string */
|
||||
*section; /* Section in web interface */
|
||||
void *search; /* Search data */
|
||||
char url[1024], /* Printer URI */
|
||||
val[1024]; /* Form variable */
|
||||
@@ -1441,11 +1444,14 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
* Get a list of matching job objects.
|
||||
*/
|
||||
|
||||
if ((var = cgiGetVariable("QUERY")) != NULL &&
|
||||
if ((query = cgiGetVariable("QUERY")) != NULL &&
|
||||
!cgiGetVariable("CLEAR"))
|
||||
search = cgiCompileSearch(var);
|
||||
search = cgiCompileSearch(query);
|
||||
else
|
||||
{
|
||||
query = NULL;
|
||||
search = NULL;
|
||||
}
|
||||
|
||||
jobs = cgiGetIPPObjects(response, search);
|
||||
count = cupsArrayCount(jobs);
|
||||
@@ -1470,16 +1476,27 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
if (first < 0)
|
||||
first = 0;
|
||||
|
||||
sprintf(val, "%d", count);
|
||||
cgiSetVariable("TOTAL", val);
|
||||
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL)
|
||||
ascending = !strcasecmp(var, "asc");
|
||||
else
|
||||
{
|
||||
ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
|
||||
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
|
||||
}
|
||||
|
||||
section = cgiGetVariable("SECTION");
|
||||
|
||||
cgiClearVariables();
|
||||
|
||||
if (query)
|
||||
cgiSetVariable("QUERY", query);
|
||||
|
||||
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
|
||||
|
||||
cgiSetVariable("SECTION", section);
|
||||
|
||||
sprintf(val, "%d", count);
|
||||
cgiSetVariable("TOTAL", val);
|
||||
|
||||
if (which_jobs)
|
||||
cgiSetVariable("WHICH_JOBS", which_jobs);
|
||||
|
||||
if (ascending)
|
||||
{
|
||||
@@ -1501,7 +1518,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
*/
|
||||
|
||||
if (dest)
|
||||
snprintf(val, sizeof(val), "/%s/%s", cgiGetVariable("SECTION"), dest);
|
||||
snprintf(val, sizeof(val), "/%s/%s", section, dest);
|
||||
else
|
||||
strlcpy(val, "/jobs/", sizeof(val));
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "jobs");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* Connect to the HTTP server...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
_cgiCheckVariables
|
||||
_cgiClearVariables
|
||||
_cgiCompileSearch
|
||||
_cgiCopyTemplateFile
|
||||
_cgiCopyTemplateLang
|
||||
|
||||
@@ -73,6 +73,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "printers");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* See if we are displaying a printer or all printers...
|
||||
|
||||
@@ -675,6 +675,8 @@ cgi_puts(const char *s, /* I - String to output */
|
||||
fputs(">", out);
|
||||
else if (*s == '\"')
|
||||
fputs(""", out);
|
||||
else if (*s == '\'')
|
||||
fputs("'", out);
|
||||
else if (*s == '&')
|
||||
fputs("&", out);
|
||||
else
|
||||
@@ -695,7 +697,7 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
{
|
||||
while (*s)
|
||||
{
|
||||
if (strchr("%&+ <>#=", *s) || *s & 128)
|
||||
if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128)
|
||||
fprintf(out, "%%%02X", *s & 255);
|
||||
else
|
||||
putc(*s, out);
|
||||
|
||||
+35
-9
@@ -15,6 +15,7 @@
|
||||
* Contents:
|
||||
*
|
||||
* cgiCheckVariables() - Check for the presence of "required" variables.
|
||||
* cgiClearVariables() - Clear all form variables.
|
||||
* cgiGetArray() - Get an element from a form array...
|
||||
* cgiGetFile() - Get the file (if any) that was submitted in the form.
|
||||
* cgiGetSize() - Get the size of a form array value.
|
||||
@@ -134,6 +135,31 @@ cgiCheckVariables(const char *names) /* I - Variables to look for */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cgiClearVariables()' - Clear all form variables.
|
||||
*/
|
||||
|
||||
void
|
||||
cgiClearVariables(void)
|
||||
{
|
||||
int i, j; /* Looping vars */
|
||||
_cgi_var_t *v; /* Current variable */
|
||||
|
||||
|
||||
for (v = form_vars, i = form_count; i > 0; v ++, i --)
|
||||
{
|
||||
_cupsStrFree(v->name);
|
||||
for (j = 0; j < v->nvalues; j ++)
|
||||
if (v->values[j])
|
||||
_cupsStrFree(v->values[j]);
|
||||
}
|
||||
|
||||
form_count = 0;
|
||||
|
||||
cgi_unlink_file();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cgiGetArray()' - Get an element from a form array...
|
||||
*/
|
||||
@@ -151,7 +177,7 @@ cgiGetArray(const char *name, /* I - Name of array variable */
|
||||
if (element < 0 || element >= var->nvalues)
|
||||
return (NULL);
|
||||
|
||||
return (var->values[element]);
|
||||
return (_cupsStrRetain(var->values[element]));
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +232,7 @@ cgiGetVariable(const char *name) /* I - Name of variable */
|
||||
var->values[var->nvalues - 1]));
|
||||
#endif /* DEBUG */
|
||||
|
||||
return ((var == NULL) ? NULL : var->values[var->nvalues - 1]);
|
||||
return ((var == NULL) ? NULL : _cupsStrRetain(var->values[var->nvalues - 1]));
|
||||
}
|
||||
|
||||
|
||||
@@ -337,9 +363,9 @@ cgiSetArray(const char *name, /* I - Name of variable */
|
||||
var->nvalues = element + 1;
|
||||
}
|
||||
else if (var->values[element])
|
||||
free((char *)var->values[element]);
|
||||
_cupsStrFree((char *)var->values[element]);
|
||||
|
||||
var->values[element] = strdup(value);
|
||||
var->values[element] = _cupsStrAlloc(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,7 +410,7 @@ cgiSetSize(const char *name, /* I - Name of variable */
|
||||
{
|
||||
for (i = size; i < var->nvalues; i ++)
|
||||
if (var->values[i])
|
||||
free((void *)(var->values[i]));
|
||||
_cupsStrFree((void *)(var->values[i]));
|
||||
}
|
||||
|
||||
var->nvalues = size;
|
||||
@@ -417,9 +443,9 @@ cgiSetVariable(const char *name, /* I - Name of variable */
|
||||
{
|
||||
for (i = 0; i < var->nvalues; i ++)
|
||||
if (var->values[i])
|
||||
free((char *)var->values[i]);
|
||||
_cupsStrFree((char *)var->values[i]);
|
||||
|
||||
var->values[0] = strdup(value);
|
||||
var->values[0] = _cupsStrAlloc(value);
|
||||
var->nvalues = 1;
|
||||
}
|
||||
}
|
||||
@@ -465,10 +491,10 @@ cgi_add_variable(const char *name, /* I - Variable name */
|
||||
if ((var->values = calloc(element + 1, sizeof(char *))) == NULL)
|
||||
return;
|
||||
|
||||
var->name = strdup(name);
|
||||
var->name = _cupsStrAlloc(name);
|
||||
var->nvalues = element + 1;
|
||||
var->avalues = element + 1;
|
||||
var->values[element] = strdup(value);
|
||||
var->values[element] = _cupsStrAlloc(value);
|
||||
|
||||
form_count ++;
|
||||
}
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ install-data:
|
||||
done
|
||||
-if test x$(PAMDIR) != x; then \
|
||||
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
|
||||
if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \
|
||||
if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
|
||||
$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Sample configuration file for the Common UNIX Printing System (CUPS)
|
||||
# scheduler. See "man cupsd.conf" for a complete description of this
|
||||
# file.
|
||||
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
|
||||
# complete description of this file.
|
||||
#
|
||||
|
||||
# Log general information in error_log - change "@CUPS_LOG_LEVEL@" to "debug"
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.types 8652 2009-05-16 23:48:35Z mike $"
|
||||
# "$Id: mime.types 8783 2009-08-28 17:51:05Z mike $"
|
||||
#
|
||||
# MIME types file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -95,7 +95,7 @@ application/vnd.hp-HPGL hpgl \
|
||||
|
||||
image/gif gif string(0,GIF87a) string(0,GIF89a)
|
||||
image/png png string(0,<89>PNG)
|
||||
image/jpeg jpeg jpg jpe string(0,<FFD8FF>) &&\
|
||||
image/jpeg jpeg jpg jpe string(0,<FFD8FF>) +\
|
||||
(char(3,0xe0) char(3,0xe1) char(3,0xe2) char(3,0xe3)\
|
||||
char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
|
||||
char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
|
||||
@@ -114,7 +114,7 @@ image/x-sun-raster ras string(0,<59a66a95>)
|
||||
|
||||
#image/fpx fpx
|
||||
image/x-alias pix short(8,8) short(8,24)
|
||||
image/x-bitmap bmp string(0,BM) && !printable(2,14)
|
||||
image/x-bitmap bmp string(0,BM) + !printable(2,14)
|
||||
image/x-icon ico
|
||||
|
||||
########################################################################
|
||||
@@ -177,5 +177,5 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
|
||||
application/octet-stream
|
||||
|
||||
#
|
||||
# End of "$Id: mime.types 8652 2009-05-16 23:48:35Z mike $".
|
||||
# End of "$Id: mime.types 8783 2009-08-28 17:51:05Z mike $".
|
||||
#
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#%PAM-1.0
|
||||
auth required pam_unix.so shadow nodelay nullok
|
||||
account required pam_unix.so
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
auth required @PAMMOD@ nullok shadow
|
||||
auth required @PAMMODAUTH@
|
||||
account required @PAMMOD@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 8708 2009-06-12 04:16:02Z mike $"
|
||||
dnl "$Id: cups-common.m4 8841 2009-10-07 16:24:25Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION="1.4.0"
|
||||
CUPS_VERSION="1.4.2"
|
||||
CUPS_REVISION=""
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -266,11 +266,6 @@ if test "x$enable_dbus" != xno; then
|
||||
dbus_message_iter_init_append,
|
||||
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
|
||||
`$PKGCONFIG --libs dbus-1`)
|
||||
if $PKGCONFIG --exists glib-2.0 && $PKGCONFIG --exists dbus-glib-1; then
|
||||
DBUS_NOTIFIER="dbus"
|
||||
DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs glib-2.0` `$PKGCONFIG --libs dbus-glib-1` `$PKGCONFIG --libs dbus-1`"
|
||||
CFLAGS="$CFLAGS `$PKGCONFIG --cflags glib-2.0`"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
@@ -289,7 +284,6 @@ LEGACY_BACKENDS="parallel scsi"
|
||||
|
||||
case $uname in
|
||||
Darwin*)
|
||||
# FONTS=""
|
||||
LEGACY_BACKENDS=""
|
||||
BACKLIBS="$BACKLIBS -framework IOKit"
|
||||
CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration -weak_framework ApplicationServices"
|
||||
@@ -355,5 +349,5 @@ AC_SUBST(FONTS)
|
||||
AC_SUBST(LEGACY_BACKENDS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 8708 2009-06-12 04:16:02Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 8841 2009-10-07 16:24:25Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 8344 2009-02-10 17:05:35Z mike $"
|
||||
dnl "$Id: cups-defaults.m4 8841 2009-10-07 16:24:25Z mike $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for the Common UNIX Printing System
|
||||
dnl (CUPS).
|
||||
@@ -325,8 +325,8 @@ if test x$default_lpdconfigfile != xno; then
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
|
||||
;;
|
||||
*)
|
||||
if test -d /etc/xinetd.d; then
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd:///etc/xinetd.d/cups-lpd"
|
||||
if test "x$XINETD" != x; then
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
|
||||
else
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE=""
|
||||
fi
|
||||
@@ -435,5 +435,5 @@ AC_SUBST(BANNERTOPS)
|
||||
AC_SUBST(TEXTTOPS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 8344 2009-02-10 17:05:35Z mike $".
|
||||
dnl End of "$Id: cups-defaults.m4 8841 2009-10-07 16:24:25Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-dnssd.m4 8344 2009-02-10 17:05:35Z mike $"
|
||||
dnl "$Id: cups-dnssd.m4 8789 2009-08-28 22:54:34Z mike $"
|
||||
dnl
|
||||
dnl DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -43,7 +43,7 @@ if test x$enable_dnssd != xno; then
|
||||
AC_MSG_CHECKING(for current version of dns_sd library)
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS -ldns_sd"
|
||||
AC_TRY_COMPILE([#include <dns_sd.h],
|
||||
AC_TRY_COMPILE([#include <dns_sd.h>],
|
||||
[int constant = kDNSServiceFlagsShareConnection;
|
||||
unsigned char txtRecord[100];
|
||||
uint8_t valueLen;
|
||||
@@ -64,5 +64,5 @@ AC_SUBST(DNSSDLIBS)
|
||||
AC_SUBST(DNSSD_BACKEND)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-dnssd.m4 8344 2009-02-10 17:05:35Z mike $".
|
||||
dnl End of "$Id: cups-dnssd.m4 8789 2009-08-28 22:54:34Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-pam.m4 8344 2009-02-10 17:05:35Z mike $"
|
||||
dnl "$Id: cups-pam.m4 8825 2009-09-22 21:53:31Z mike $"
|
||||
dnl
|
||||
dnl PAM stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -22,9 +22,10 @@ if test $uname = AIX; then
|
||||
fi
|
||||
|
||||
PAMDIR=""
|
||||
PAMFILE=""
|
||||
PAMFILE="pam.std"
|
||||
PAMLIBS=""
|
||||
PAMMOD="pam_unknown.so"
|
||||
PAMMODAUTH="pam_unknown.so"
|
||||
|
||||
if test x$enable_pam != xno; then
|
||||
SAVELIBS="$LIBS"
|
||||
@@ -60,7 +61,7 @@ if test x$enable_pam != xno; then
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin, MacOS X
|
||||
# Darwin/Mac OS X
|
||||
if test "x$with_pam_module" != x; then
|
||||
PAMFILE="pam.$with_pam_module"
|
||||
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
|
||||
@@ -70,26 +71,22 @@ if test x$enable_pam != xno; then
|
||||
fi
|
||||
;;
|
||||
|
||||
IRIX)
|
||||
# SGI IRIX
|
||||
PAMFILE="pam.irix"
|
||||
;;
|
||||
|
||||
*)
|
||||
# All others; this test might need to be updated
|
||||
# as Linux distributors move things around...
|
||||
if test "x$with_pam_module" != x; then
|
||||
PAMMOD="pam_${with_pam_module}.so"
|
||||
else
|
||||
for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do
|
||||
if test -f /lib/security/$mod; then
|
||||
PAMMOD="$mod"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
elif test -f /lib/security/pam_unix2.so; then
|
||||
PAMMOD="pam_unix2.so"
|
||||
elif test -f /lib/security/pam_unix.so; then
|
||||
PAMMOD="pam_unix.so"
|
||||
fi
|
||||
|
||||
PAMFILE="pam.std"
|
||||
if test "x$PAMMOD" = xpam_unix.so; then
|
||||
PAMMODAUTH="$PAMMOD shadow nodelay"
|
||||
else
|
||||
PAMMODAUTH="$PAMMOD nodelay"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -98,7 +95,8 @@ AC_SUBST(PAMDIR)
|
||||
AC_SUBST(PAMFILE)
|
||||
AC_SUBST(PAMLIBS)
|
||||
AC_SUBST(PAMMOD)
|
||||
AC_SUBST(PAMMODAUTH)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-pam.m4 8344 2009-02-10 17:05:35Z mike $".
|
||||
dnl End of "$Id: cups-pam.m4 8825 2009-09-22 21:53:31Z mike $".
|
||||
dnl
|
||||
|
||||
+1
-1
@@ -1553,7 +1553,7 @@ _cupsAdminSetServerSettings(
|
||||
const char *remotep = cupsGetOption("BrowseRemoteProtocols",
|
||||
num_settings, settings);
|
||||
|
||||
if (!localp)
|
||||
if (!localp || !localp[0])
|
||||
localp = cupsGetOption("BrowseLocalProtocols", cupsd_num_settings,
|
||||
cupsd_settings);
|
||||
|
||||
|
||||
+2
-2
@@ -59,10 +59,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0400
|
||||
# define CUPS_VERSION 1.0402
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 4
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
# define CUPS_VERSION_PATCH 2
|
||||
|
||||
# define CUPS_BC_FD 3 /* Back-channel file descriptor for select/poll */
|
||||
# define CUPS_DATE_ANY (time_t)-1
|
||||
|
||||
+2
-2
@@ -557,7 +557,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
* configuration file does not exist. Find out the real default.
|
||||
*/
|
||||
|
||||
if (!cups_get_sdests(http, CUPS_GET_DEFAULT, name, 0, &dest))
|
||||
if (!cups_get_sdests(http, CUPS_GET_DEFAULT, NULL, 0, &dest))
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1800,7 +1800,7 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
|
||||
"requesting-user-name", NULL, cupsUser());
|
||||
|
||||
if (name)
|
||||
if (name && op != CUPS_GET_DEFAULT)
|
||||
{
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
|
||||
"localhost", ippPort(), "/printers/%s", name);
|
||||
|
||||
+3
-1
@@ -266,7 +266,9 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
|
||||
DEBUG_printf(("2cupsDoIORequest: status=%d", status));
|
||||
|
||||
if (status == HTTP_FORBIDDEN || status >= HTTP_SERVER_ERROR)
|
||||
if (status >= HTTP_BAD_REQUEST &&
|
||||
status != HTTP_UNAUTHORIZED &&
|
||||
status != HTTP_UPGRADE_REQUIRED)
|
||||
{
|
||||
httpFlush(http);
|
||||
_cupsSetHTTPError(status);
|
||||
|
||||
+21
-1
@@ -191,9 +191,23 @@ cupsSideChannelRead(
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("1cupsSideChannelRead: Read error: %s", strerror(errno)));
|
||||
*command = CUPS_SC_CMD_NONE;
|
||||
*status = CUPS_SC_STATUS_IO_ERROR;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Watch for EOF or too few bytes...
|
||||
*/
|
||||
|
||||
if (bytes < 4)
|
||||
{
|
||||
DEBUG_printf(("1cupsSideChannelRead: Short read of %d bytes", bytes));
|
||||
*command = CUPS_SC_CMD_NONE;
|
||||
*status = CUPS_SC_STATUS_BAD_MESSAGE;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate the command code in the message...
|
||||
*/
|
||||
@@ -202,6 +216,8 @@ cupsSideChannelRead(
|
||||
buffer[0] > CUPS_SC_CMD_SNMP_GET_NEXT)
|
||||
{
|
||||
DEBUG_printf(("1cupsSideChannelRead: Bad command %d!", buffer[0]));
|
||||
*command = CUPS_SC_CMD_NONE;
|
||||
*status = CUPS_SC_STATUS_BAD_MESSAGE;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -379,6 +395,7 @@ cupsSideChannelSNMPWalk(
|
||||
real_oidlen, /* Length of returned OID string */
|
||||
oidlen; /* Length of first OID */
|
||||
const char *current_oid; /* Current OID */
|
||||
char last_oid[2048]; /* Last OID */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsSideChannelSNMPWalk(oid=\"%s\", timeout=%.3f, cb=%p, "
|
||||
@@ -397,6 +414,7 @@ cupsSideChannelSNMPWalk(
|
||||
|
||||
current_oid = oid;
|
||||
oidlen = (int)strlen(oid);
|
||||
last_oid[0] = '\0';
|
||||
|
||||
do
|
||||
{
|
||||
@@ -422,7 +440,8 @@ cupsSideChannelSNMPWalk(
|
||||
* Parse the response of the form "oid\0value"...
|
||||
*/
|
||||
|
||||
if (strncmp(real_data, oid, oidlen) || real_data[oidlen] != '.')
|
||||
if (strncmp(real_data, oid, oidlen) || real_data[oidlen] != '.' ||
|
||||
!strcmp(real_data, last_oid))
|
||||
{
|
||||
/*
|
||||
* Done with this set of OIDs...
|
||||
@@ -448,6 +467,7 @@ cupsSideChannelSNMPWalk(
|
||||
*/
|
||||
|
||||
current_oid = real_data;
|
||||
strlcpy(last_oid, current_oid, sizeof(last_oid));
|
||||
}
|
||||
}
|
||||
while (status == CUPS_SC_STATUS_OK);
|
||||
|
||||
@@ -55,6 +55,7 @@ typedef enum cups_sc_bidi_e cups_sc_bidi_t;
|
||||
|
||||
enum cups_sc_command_e /**** Request command codes ****/
|
||||
{
|
||||
CUPS_SC_CMD_NONE = 0, /* No command @private@ */
|
||||
CUPS_SC_CMD_SOFT_RESET = 1, /* Do a soft reset */
|
||||
CUPS_SC_CMD_DRAIN_OUTPUT = 2, /* Drain all pending output */
|
||||
CUPS_SC_CMD_GET_BIDI = 3, /* Return bidirectional capabilities */
|
||||
|
||||
+10
-4
@@ -608,6 +608,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
int count = 0; /* Number of OIDs found */
|
||||
int request_id = 0; /* Current request ID */
|
||||
cups_snmp_t packet; /* Current response packet */
|
||||
int lastoid[CUPS_SNMP_MAX_OID];
|
||||
/* Last OID we got */
|
||||
|
||||
|
||||
/*
|
||||
@@ -631,14 +633,15 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
*/
|
||||
|
||||
_cupsSNMPCopyOID(packet.object_name, prefix, CUPS_SNMP_MAX_OID);
|
||||
lastoid[0] = -1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
request_id ++;
|
||||
|
||||
if (!_cupsSNMPWrite(fd, address, version, community,
|
||||
CUPS_ASN1_GET_NEXT_REQUEST, request_id,
|
||||
packet.object_name))
|
||||
CUPS_ASN1_GET_NEXT_REQUEST, request_id,
|
||||
packet.object_name))
|
||||
{
|
||||
DEBUG_puts("5_cupsSNMPWalk: Returning -1");
|
||||
|
||||
@@ -652,7 +655,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!_cupsSNMPIsOIDPrefixed(&packet, prefix))
|
||||
if (!_cupsSNMPIsOIDPrefixed(&packet, prefix) ||
|
||||
_cupsSNMPIsOID(&packet, lastoid))
|
||||
{
|
||||
DEBUG_printf(("5_cupsSNMPWalk: Returning %d", count));
|
||||
|
||||
@@ -666,6 +670,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
return (count > 0 ? count : -1);
|
||||
}
|
||||
|
||||
_cupsSNMPCopyOID(lastoid, packet.object_name, CUPS_SNMP_MAX_OID);
|
||||
|
||||
count ++;
|
||||
|
||||
(*cb)(&packet, data);
|
||||
@@ -1280,7 +1286,7 @@ asn1_get_integer(
|
||||
int value; /* Integer value */
|
||||
|
||||
|
||||
for (value = 0;
|
||||
for (value = (**buffer & 0x80) ? -1 : 0;
|
||||
length > 0 && *buffer < bufend;
|
||||
length --, (*buffer) ++)
|
||||
value = (value << 8) | **buffer;
|
||||
|
||||
+30
-30
@@ -7,33 +7,33 @@ Terminal=false
|
||||
Type=Application
|
||||
Name=Manage Printing
|
||||
Comment=CUPS Web Interface
|
||||
Name[de.UTF-8]=Druckerverwaltung
|
||||
Comment[de.UTF-8]=CUPS Webinterface
|
||||
Name[en_US.UTF-8]=Manage Printing
|
||||
Comment[en_US.UTF-8]=CUPS Web Interface
|
||||
Name[es.UTF-8]=Administrar impresión
|
||||
Comment[es.UTF-8]=Interfaz Web de CUPS
|
||||
Name[et.UTF-8]=Trükkimise haldur
|
||||
Comment[et.UTF-8]=CUPS-i veebiliides
|
||||
Name[eu.UTF-8]=Kudeatu inprimaketak
|
||||
Comment[eu.UTF-8]=CUPSen web interfazea
|
||||
Name[fr.UTF-8]=Gestionnaire d'impression
|
||||
Comment[fr.UTF-8]=Interface Web de CUPS
|
||||
Name[he.UTF-8]=נהל הדפסות
|
||||
Comment[he.UTF-8]=ממשק דפדפן של CUPS
|
||||
Name[id.UTF-8]=Manajemen Pencetakan
|
||||
Comment[id.UTF-8]=Antarmuka Web CUPS
|
||||
Name[it.UTF-8]=Gestione stampa
|
||||
Comment[it.UTF-8]=Interfaccia web di CUPS
|
||||
Name[ja.UTF-8]=印刷の管理
|
||||
Comment[ja.UTF-8]=CUPS Web インタフェース
|
||||
Name[pl.UTF-8]=Zarządzanie drukowaniem
|
||||
Comment[pl.UTF-8]=Interfejs WWW CUPS
|
||||
Name[ru.UTF-8]=Настройка печати
|
||||
Comment[ru.UTF-8]=Настройка CUPS
|
||||
Name[sv.UTF-8]=Hantera skrivare
|
||||
Comment[sv.UTF-8]=CUPS webb-gränssnitt
|
||||
Name[zh.UTF-8]=打印机管理
|
||||
Comment[zh.UTF-8]=CUPS网页界面
|
||||
Name[zh_TW.UTF-8]=印表管理
|
||||
Comment[zh_TW.UTF-8]=CUPS 網頁介面
|
||||
Name[de]=Druckerverwaltung
|
||||
Comment[de]=CUPS Webinterface
|
||||
Name[en_US]=Manage Printing
|
||||
Comment[en_US]=CUPS Web Interface
|
||||
Name[es]=Administrar impresión
|
||||
Comment[es]=Interfaz Web de CUPS
|
||||
Name[et]=Trükkimise haldur
|
||||
Comment[et]=CUPS-i veebiliides
|
||||
Name[eu]=Kudeatu inprimaketak
|
||||
Comment[eu]=CUPSen web interfazea
|
||||
Name[fr]=Gestionnaire d'impression
|
||||
Comment[fr]=Interface Web de CUPS
|
||||
Name[he]=נהל הדפסות
|
||||
Comment[he]=ממשק דפדפן של CUPS
|
||||
Name[id]=Manajemen Pencetakan
|
||||
Comment[id]=Antarmuka Web CUPS
|
||||
Name[it]=Gestione stampa
|
||||
Comment[it]=Interfaccia web di CUPS
|
||||
Name[ja]=印刷の管理
|
||||
Comment[ja]=CUPS Web インタフェース
|
||||
Name[pl]=Zarządzanie drukowaniem
|
||||
Comment[pl]=Interfejs WWW CUPS
|
||||
Name[ru]=Настройка печати
|
||||
Comment[ru]=Настройка CUPS
|
||||
Name[sv]=Hantera skrivare
|
||||
Comment[sv]=CUPS webb-gränssnitt
|
||||
Name[zh]=打印机管理
|
||||
Comment[zh]=CUPS网页界面
|
||||
Name[zh_TW]=印表管理
|
||||
Comment[zh_TW]=CUPS 網頁介面
|
||||
|
||||
+2
-2
@@ -190,8 +190,8 @@ install-languages:
|
||||
for lang in $(LANGUAGES); do \
|
||||
if test -d $$lang; then \
|
||||
$(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang; \
|
||||
$(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang; \
|
||||
test -f $$lang/cups.css && $(INSTALL_MAN) $$lang/cups.css $(DOCDIR)/$$lang; \
|
||||
$(INSTALL_DATA) $$lang/index.html $(DOCDIR)/$$lang; \
|
||||
$(INSTALL_DATA) $$lang/cups.css $(DOCDIR)/$$lang >/dev/null 2>&1 || true; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Verwaltung </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Klassen </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> On-Line Hilfe </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Auftrüge </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Aufträge </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Drucker </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
|
||||
@@ -21,8 +21,8 @@ can be modified using your favorite text editor, you should
|
||||
normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
|
||||
command, web interface, or any of the available GUIs to manage
|
||||
your classes instead. If you do choose to edit this file
|
||||
manually, you will need to restart the scheduler to make them
|
||||
active.</P>
|
||||
manually, you will need to stop the scheduler first, make your
|
||||
changes, and then start the scheduler to make them active.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
|
||||
|
||||
@@ -380,10 +380,10 @@ least 100 files.</p>
|
||||
inclusion in a driver. The name with optional user text defines
|
||||
the name for the media size and is used with the <a
|
||||
href='#MediaSize'><code>MediaSize</code></a> directive to associate
|
||||
the media size with the driver. The name may only contain
|
||||
letters, numbers, and the underscore and may not exceed 40
|
||||
characters in length. The user text, if supplied, may not exceed
|
||||
80 characters in length.</p>
|
||||
the media size with the driver. The name may contain up to 40 ASCII
|
||||
characters within the range of decimal 33 to decimal 126 inclusive,
|
||||
except for the characters comma (44), slash (47) and colon (58).
|
||||
The user text, if supplied, may not exceed 80 bytes in length.</p>
|
||||
|
||||
<p>The width and length define the dimensions of the media. Each
|
||||
number is optionally followed by one of the following unit
|
||||
@@ -459,17 +459,15 @@ Attribute fooProfile "Photo/Photographic Profile" "photopro.icc"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Attribute</code> directive creates a PPD attribute. The
|
||||
name is any combination of letters, numbers, and the underscore
|
||||
and can be up to 40 characters in length.</p>
|
||||
name may contain up to 40 ASCII characters within the range of decimal
|
||||
33 to decimal 126 inclusive, except for the characters comma (44),
|
||||
slash (47) and colon (58).</p>
|
||||
|
||||
<p>The selector can be the empty string (<code>""</code>), a keyword
|
||||
consisting of up to 40 letters, numbers, and the underscore, or
|
||||
a string composed of a keyword and user text of up to 80
|
||||
characters.</p>
|
||||
<p>The selector can be the empty string (<code>""</code>) or text of up
|
||||
to 80 bytes.</p>
|
||||
|
||||
<p>The value is any string or number; the string may contain
|
||||
multiple lines, however no one line may exceed 255
|
||||
characters.</p>
|
||||
<p>The value is any string or number; the string may contain multiple
|
||||
lines, however no one line may exceed 255 bytes.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -495,14 +493,15 @@ Choice "False/No" "<</cupsCompression 0>>setpagedevice"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Choice</code> directive adds a single choice to the
|
||||
current option. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
current option. The name may contain up to 40 ASCII characters within
|
||||
the range of decimal 33 to decimal 126 inclusive, except for the
|
||||
characters comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
<p>If provided, the text can be any string up to 80 bytes
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The code is any string and may contain multiple lines,
|
||||
however no one line may exceed 255 characters.</p>
|
||||
however no one line may exceed 255 bytes.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -568,11 +567,12 @@ ColorModel CMYK cmyk chunky 0
|
||||
|
||||
<p>The <code>ColorModel</code> directive is a convenience directive
|
||||
which creates a ColorModel option and choice for the current
|
||||
printer driver. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
printer driver. The name may contain up to 40 ASCII characters within
|
||||
the range of decimal 33 to decimal 126 inclusive, except for the
|
||||
characters comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The colorspace argument is one of the standard colorspace
|
||||
keywords defined later in this appendix in the section titled,
|
||||
@@ -698,7 +698,7 @@ MA 02111 USA"
|
||||
<p>The <code>Copyright</code> directive adds text comments to the
|
||||
top of a PPD file, typically for use in copyright notices. The
|
||||
text argument can contain multiple lines of text, but no line
|
||||
may exceed 255 characters.</p>
|
||||
may exceed 255 bytes.</p>
|
||||
|
||||
|
||||
<h2 class="title"><a name='CustomMedia'>CustomMedia</a></h2>
|
||||
@@ -730,11 +730,12 @@ CustomMedia "A4/A4 - 210x297mm" 210mm 297mm 12 12 12 12
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>CustomMedia</code> directive adds a custom media size to
|
||||
the driver. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
the driver. The name may contain up to 40 ASCII characters within the
|
||||
range of decimal 33 to decimal 126 inclusive, except for the characters
|
||||
comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The width and length arguments specify the dimensions of the
|
||||
media as defined for the <a href="#_media"><code>#media</code></a>
|
||||
@@ -747,7 +748,7 @@ printable margins of the media.</p>
|
||||
PostScript commands to run for the <code>PageSize</code> and
|
||||
<code>PageRegion</code> options, respectively. The commands can
|
||||
contain multiple lines, however no line may be more than 255
|
||||
characters in length.</p>
|
||||
bytes in length.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -823,11 +824,12 @@ therefore the darkness of the print.</p>
|
||||
the Dymo driver from 0 (lowest) to 3 (highest), with 2
|
||||
representing the normal setting.</p>
|
||||
|
||||
<p>The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length.</p>
|
||||
<p>The name may contain up to 40 ASCII characters within the range of
|
||||
decimal 33 to decimal 126 inclusive, except for the characters comma
|
||||
(44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1044,14 +1046,15 @@ Finishing "Glossy/Photo Overcoat"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Finishing</code> directive adds a choice to the
|
||||
<code>cupsFinishing</code> option. The name is any combination of
|
||||
letters, numbers, and the underscore and can be up to 40
|
||||
characters in length. The name is stored in the
|
||||
<code>OutputType</code> attribute in the PostScript page device
|
||||
dictionary.</p>
|
||||
<code>cupsFinishing</code> option. The name may contain up to 40 ASCII
|
||||
characters within the range of decimal 33 to decimal 126 inclusive,
|
||||
except for the characters comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The name is stored in the <code>OutputType</code> attribute in the
|
||||
PostScript page device dictionary.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1091,8 +1094,7 @@ Font Unicode-Foo Expert "(2.0)" Adobe-Identity ROM
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Font</code> directive defines a "device font" for the
|
||||
current printer driver. The name is the PostScript font
|
||||
name.</p>
|
||||
current printer driver. The name is the PostScript font name.</p>
|
||||
|
||||
<p>The encoding is the default encoding of the font, usually
|
||||
<code>Standard</code>, <code>Expert</code>, or <code>Special</code>, as
|
||||
@@ -1139,14 +1141,16 @@ Group "Special/Vendor Options"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Group</code> directive specifies the group for new
|
||||
<code>Option</code> directives. The name is any combination of
|
||||
letters, numbers, and the underscore and can be up to 40
|
||||
characters in length. The names <code>General</code> and
|
||||
<code>InstallableOptions</code> are predefined for the standard
|
||||
Adobe UI keywords and for installable options, respectively.</p>
|
||||
<code>Option</code> directives. The name may contain up to 40 ASCII
|
||||
characters within the range of decimal 33 to decimal 126 inclusive,
|
||||
except for the characters comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 40 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 40 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The names <code>General</code> and <code>InstallableOptions</code>
|
||||
are predefined for the standard Adobe UI keywords and for installable
|
||||
options, respectively.</p>
|
||||
|
||||
<center><table width='80%' border='1' bgcolor='#cccccc' cellpadding='5' cellspacing='0'>
|
||||
<tr>
|
||||
@@ -1154,8 +1158,8 @@ in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<p>Because of certain API binary compatibility issues,
|
||||
CUPS limits the length of PPD group translation strings
|
||||
(text) to 40 characters, while the PPD specification
|
||||
allows for up to 80 characters.</p>
|
||||
(text) to 40 bytes, while the PPD specification
|
||||
allows for up to 80 bytes.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1229,11 +1233,12 @@ from 0 to 2<sup>32</sup>-1 specifying the value that is placed
|
||||
in the <code>MediaPosition</code> attribute in the PostScript page
|
||||
device dictionary.</p>
|
||||
|
||||
<p>The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length.</p>
|
||||
<p>The name may contain up to 40 ASCII characters within the range of
|
||||
decimal 33 to decimal 126 inclusive, except for the characters comma
|
||||
(44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1271,11 +1276,12 @@ Installable "Option1/Duplexer Installed"
|
||||
|
||||
<p>The <code>Installable</code> directive adds a new boolean option
|
||||
to the <code>InstallableOptions</code> group with a default value of
|
||||
<code>False</code>. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
<code>False</code>. The name may contain up to 40 ASCII characters
|
||||
within the range of decimal 33 to decimal 126 inclusive, except for
|
||||
the characters comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
|
||||
<h2 class="title"><a name='LocAttribute'>LocAttribute</a></h2>
|
||||
@@ -1295,17 +1301,15 @@ LocAttribute fooProfile "Photo/Photographic Profile" "photopro.icc"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>LocAttribute</code> directive creates a localized PPD
|
||||
attribute. The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length.</p>
|
||||
attribute. The name may contain up to 40 ASCII characters within the
|
||||
range of decimal 33 to decimal 126 inclusive, except for the characters
|
||||
comma (44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>The selector can be the empty string (<code>""</code>), a keyword
|
||||
consisting of up to 40 letters, numbers, and the underscore, or
|
||||
a string composed of a keyword and user text of up to 80
|
||||
characters.</p>
|
||||
<p>The selector can be the empty string (<code>""</code>) or text of up
|
||||
to 80 bytes.</p>
|
||||
|
||||
<p>The value is any string or number; the string may contain
|
||||
multiple lines, however no one line may exceed 255
|
||||
characters.</p>
|
||||
<p>The value is any string or number; the string may contain multiple
|
||||
lines, however no one line may exceed 255 bytes.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1458,13 +1462,15 @@ from 0 to 2<sup>32</sup>-1 specifying the value that is placed
|
||||
in the <code>cupsMediaType</code> attribute in the PostScript page
|
||||
device dictionary.</p>
|
||||
|
||||
<p>The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length. The name is
|
||||
placed in the <code>MediaType</code> attribute in the PostScript
|
||||
page device dictionary.</p>
|
||||
<p>The name may contain up to 40 ASCII characters within the range of
|
||||
decimal 33 to decimal 126 inclusive, except for the characters comma
|
||||
(44), slash (47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The name is placed in the <code>MediaType</code> attribute in the
|
||||
PostScript page device dictionary.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1532,7 +1538,7 @@ name is any string of letters, numbers, spaces, and the
|
||||
characters ".", "/", "-", and "+" and should not begin with the
|
||||
manufacturer name since the PPD compiler will add this
|
||||
automatically for you. The maximum length of the name string is
|
||||
31 characters to conform to the Adobe limits on the length of
|
||||
31 bytes to conform to the Adobe limits on the length of
|
||||
<code>ShortNickName</code>.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
@@ -1598,11 +1604,12 @@ Option "fooFinish/Finishing Option" PickOne DocumentSetup 10
|
||||
|
||||
<p>The <code>Option</code> directive creates a new option in the
|
||||
current group, by default the <code>General</code> group. The name
|
||||
is any combination of letters, numbers, and the underscore and
|
||||
can be up to 40 characters in length.</p>
|
||||
may contain up to 40 ASCII characters within the range of decimal 33
|
||||
to decimal 126 inclusive, except for the characters comma (44), slash
|
||||
(47) and colon (58).</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The type argument is one of the following keywords:</p>
|
||||
|
||||
@@ -1749,8 +1756,8 @@ for asymmetric resolutions. The <code>HHH</code> and <code>VVV</code> in
|
||||
the examples represent the horizontal and vertical resolutions
|
||||
which must be positive integer values.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ and can be modified using your favorite text editor, you should
|
||||
normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
|
||||
command, web interface, or any of the available GUIs to manage
|
||||
your printers instead. If you do choose to edit this file
|
||||
manually, you will need to restart the scheduler to make them
|
||||
active.</P>
|
||||
manually, you will need to stop the scheduler first, make your
|
||||
changes, and then start the scheduler to make them active.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
"$Id: spec-ipp.html 8680 2009-05-22 23:53:11Z mike $"
|
||||
"$Id: spec-ipp.html 8816 2009-09-14 21:41:50Z mike $"
|
||||
|
||||
CUPS IPP specification for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -558,7 +558,7 @@ job as well.
|
||||
<h4>Cancel-Job Request</h4>
|
||||
|
||||
<p>The following groups of attributes are supplied as part of the
|
||||
Set-Job-Attributes request:
|
||||
Cancel-Job request:
|
||||
|
||||
<p>Group 1: Operation Attributes
|
||||
|
||||
@@ -632,6 +632,17 @@ Purge-Jobs request:
|
||||
<dd>The client MUST supply a URI for the specified printer or
|
||||
"ipp://.../printers" for all printers and classes.
|
||||
|
||||
<dt><span class="info">CUPS 1.2/Mac OS X 10.5</span>"requesting-user-name" (name(MAX)):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to specify whose jobs
|
||||
jobs are purged or canceled.
|
||||
|
||||
<dt><span class="info">CUPS 1.2/Mac OS X 10.5</span>"my-jobs" (boolean):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to specify that only
|
||||
the jobs owned by the requesting user are purged or canceled. The
|
||||
default is false.
|
||||
|
||||
<dt><span class="info">CUPS 1.2/Mac OS X 10.5</span>"purge-jobs" (boolean):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to specify
|
||||
@@ -1603,8 +1614,8 @@ CUPS-Get-Devices request:
|
||||
|
||||
<dt>"timeout" (integer (1:MAX)) :<span class='info'>CUPS 1.4/Mac OS X 10.6</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute limiting the number of
|
||||
devices that are returned.
|
||||
<dd>The client OPTIONALLY supplies this attribute to limit the duration
|
||||
of the lookup. The default timeout is 15 seconds.
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ ParseCommand(FILE *fp, /* I - File to read from */
|
||||
if (!strcasecmp(name, "LB"))
|
||||
{
|
||||
bufptr = buf;
|
||||
while ((ch = getc(fp)) != StringTerminator)
|
||||
while ((ch = getc(fp)) != StringTerminator && ch != EOF)
|
||||
if (bufptr < (buf + sizeof(buf) - 1))
|
||||
*bufptr++ = ch;
|
||||
*bufptr = '\0';
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: lprm.man 8421 2009-03-09 21:59:55Z mike $"
|
||||
.\" "$Id: lprm.man 8801 2009-08-29 06:05:14Z mike $"
|
||||
.\"
|
||||
.\" lprm man page for the Common UNIX Printing System (CUPS).
|
||||
.\"
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH lprm 1 "CUPS" "12 February 2006" "Apple Inc."
|
||||
.TH lprm 1 "CUPS" "28 August 2009" "Apple Inc."
|
||||
.SH NAME
|
||||
lprm \- cancel print jobs
|
||||
.SH SYNOPSIS
|
||||
@@ -49,7 +49,7 @@ Specifies an alternate username.
|
||||
.TP 5
|
||||
-h server[:port]
|
||||
.br
|
||||
Specifies and alternate server.
|
||||
Specifies an alternate server.
|
||||
.SH COMPATIBILITY
|
||||
The CUPS version of \fIlprm\fR is compatible with the standard
|
||||
Berkeley \fIlprm\fR command.
|
||||
@@ -61,5 +61,5 @@ http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2009 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: lprm.man 8421 2009-03-09 21:59:55Z mike $".
|
||||
.\" End of "$Id: lprm.man 8801 2009-08-29 06:05:14Z mike $".
|
||||
.\"
|
||||
|
||||
+72
-23
@@ -554,6 +554,8 @@ ppdcDriver::write_ppd_file(
|
||||
else if (type != PPDC_DRIVER_PS)
|
||||
cupsFilePrintf(fp, "*TTRasterizer: Type42%s", lf);
|
||||
|
||||
struct lconv *loc = localeconv();
|
||||
|
||||
if (attrs->count)
|
||||
{
|
||||
// Write driver-defined attributes...
|
||||
@@ -679,16 +681,23 @@ ppdcDriver::write_ppd_file(
|
||||
for (p = (ppdcProfile *)profiles->first();
|
||||
p;
|
||||
p = (ppdcProfile *)profiles->next())
|
||||
{
|
||||
char density[255], gamma[255], profile[9][255];
|
||||
|
||||
_cupsStrFormatd(density, density + sizeof(density), p->density, loc);
|
||||
_cupsStrFormatd(gamma, gamma + sizeof(gamma), p->gamma, loc);
|
||||
|
||||
for (int i = 0; i < 9; i ++)
|
||||
_cupsStrFormatd(profile[i], profile[i] + sizeof(profile[0]),
|
||||
p->profile[i], loc);
|
||||
|
||||
cupsFilePrintf(fp,
|
||||
"*cupsColorProfile %s/%s: \"%.3f %.3f %.3f %.3f %.3f %.3f "
|
||||
"%.3f %.3f %.3f %.3f %.3f\"%s",
|
||||
p->resolution->value, p->media_type->value,
|
||||
p->density, p->gamma,
|
||||
p->profile[0], p->profile[1],
|
||||
p->profile[2], p->profile[3],
|
||||
p->profile[4], p->profile[5],
|
||||
p->profile[6], p->profile[7],
|
||||
p->profile[8], lf);
|
||||
"*cupsColorProfile %s/%s: \"%s %s %s %s %s %s %s %s %s %s "
|
||||
"%s\"%s", p->resolution->value, p->media_type->value,
|
||||
density, gamma, profile[0], profile[1], profile[2],
|
||||
profile[3], profile[4], profile[5], profile[6], profile[7],
|
||||
profile[8], lf);
|
||||
}
|
||||
}
|
||||
|
||||
if (locales)
|
||||
@@ -871,13 +880,21 @@ ppdcDriver::write_ppd_file(
|
||||
cupsFilePrintf(fp, "*DefaultImageableArea: %s%s",
|
||||
default_size ? default_size->value : "Letter", lf);
|
||||
|
||||
char left[255], right[255], bottom[255], top[255];
|
||||
|
||||
for (m = (ppdcMediaSize *)sizes->first();
|
||||
m;
|
||||
m = (ppdcMediaSize *)sizes->next())
|
||||
cupsFilePrintf(fp, "*ImageableArea %s/%s: \"%.2f %.2f %.2f %.2f\"%s",
|
||||
{
|
||||
_cupsStrFormatd(left, left + sizeof(left), m->left, loc);
|
||||
_cupsStrFormatd(bottom, bottom + sizeof(bottom), m->bottom, loc);
|
||||
_cupsStrFormatd(right, right + sizeof(right), m->width - m->right, loc);
|
||||
_cupsStrFormatd(top, top + sizeof(top), m->length - m->top, loc);
|
||||
|
||||
cupsFilePrintf(fp, "*ImageableArea %s/%s: \"%s %s %s %s\"%s",
|
||||
m->name->value, catalog->find_message(m->text->value),
|
||||
m->left, m->bottom, m->width - m->right, m->length - m->top,
|
||||
lf);
|
||||
left, bottom, right, top, lf);
|
||||
}
|
||||
|
||||
if ((a = find_attr("?ImageableArea", NULL)) != NULL)
|
||||
{
|
||||
@@ -892,12 +909,19 @@ ppdcDriver::write_ppd_file(
|
||||
cupsFilePrintf(fp, "*DefaultPaperDimension: %s%s",
|
||||
default_size ? default_size->value : "Letter", lf);
|
||||
|
||||
char width[255], length[255];
|
||||
|
||||
for (m = (ppdcMediaSize *)sizes->first();
|
||||
m;
|
||||
m = (ppdcMediaSize *)sizes->next())
|
||||
cupsFilePrintf(fp, "*PaperDimension %s/%s: \"%.2f %.2f\"%s",
|
||||
{
|
||||
_cupsStrFormatd(width, width + sizeof(width), m->width, loc);
|
||||
_cupsStrFormatd(length, length + sizeof(length), m->length, loc);
|
||||
|
||||
cupsFilePrintf(fp, "*PaperDimension %s/%s: \"%s %s\"%s",
|
||||
m->name->value, catalog->find_message(m->text->value),
|
||||
m->width, m->length, lf);
|
||||
width, length, lf);
|
||||
}
|
||||
|
||||
if ((a = find_attr("?PaperDimension", NULL)) != NULL)
|
||||
{
|
||||
@@ -911,10 +935,18 @@ ppdcDriver::write_ppd_file(
|
||||
// Custom size support...
|
||||
if (variable_paper_size)
|
||||
{
|
||||
cupsFilePrintf(fp, "*MaxMediaWidth: \"%.2f\"%s", max_width, lf);
|
||||
cupsFilePrintf(fp, "*MaxMediaHeight: \"%.2f\"%s", max_length, lf);
|
||||
cupsFilePrintf(fp, "*HWMargins: %.2f %.2f %.2f %.2f\n",
|
||||
left_margin, bottom_margin, right_margin, top_margin);
|
||||
_cupsStrFormatd(width, width + sizeof(width), max_width, loc);
|
||||
_cupsStrFormatd(length, length + sizeof(length), max_length, loc);
|
||||
|
||||
_cupsStrFormatd(left, left + sizeof(left), left_margin, loc);
|
||||
_cupsStrFormatd(bottom, bottom + sizeof(bottom), bottom_margin, loc);
|
||||
_cupsStrFormatd(right, right + sizeof(right), right_margin, loc);
|
||||
_cupsStrFormatd(top, top + sizeof(top), top_margin, loc);
|
||||
|
||||
cupsFilePrintf(fp, "*MaxMediaWidth: \"%s\"%s", width, lf);
|
||||
cupsFilePrintf(fp, "*MaxMediaHeight: \"%s\"%s", length, lf);
|
||||
cupsFilePrintf(fp, "*HWMargins: %s %s %s %s%s", left, bottom, right, top,
|
||||
lf);
|
||||
|
||||
if (custom_size_code && custom_size_code->value)
|
||||
{
|
||||
@@ -934,15 +966,29 @@ ppdcDriver::write_ppd_file(
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize Width: %s%s", a->value->value,
|
||||
lf);
|
||||
else
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize Width: 1 points %.2f %.2f%s",
|
||||
min_width, max_width, lf);
|
||||
{
|
||||
char width0[255];
|
||||
|
||||
_cupsStrFormatd(width0, width0 + sizeof(width0), min_width, loc);
|
||||
_cupsStrFormatd(width, width + sizeof(width), max_width, loc);
|
||||
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize Width: 1 points %s %s%s",
|
||||
width0, width, lf);
|
||||
}
|
||||
|
||||
if ((a = find_attr("ParamCustomPageSize", "Height")) != NULL)
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize Height: %s%s", a->value->value,
|
||||
lf);
|
||||
else
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize Height: 2 points %.2f %.2f%s",
|
||||
min_length, max_length, lf);
|
||||
{
|
||||
char length0[255];
|
||||
|
||||
_cupsStrFormatd(length0, length0 + sizeof(length0), min_length, loc);
|
||||
_cupsStrFormatd(length, length + sizeof(length), max_length, loc);
|
||||
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize Height: 2 points %s %s%s",
|
||||
length0, length, lf);
|
||||
}
|
||||
|
||||
if ((a = find_attr("ParamCustomPageSize", "WidthOffset")) != NULL)
|
||||
cupsFilePrintf(fp, "*ParamCustomPageSize WidthOffset: %s%s",
|
||||
@@ -1000,7 +1046,10 @@ ppdcDriver::write_ppd_file(
|
||||
break;
|
||||
}
|
||||
|
||||
cupsFilePrintf(fp, "*OrderDependency: %.1f ", o->order);
|
||||
char order[255];
|
||||
_cupsStrFormatd(order, order + sizeof(order), o->order, loc);
|
||||
|
||||
cupsFilePrintf(fp, "*OrderDependency: %s ", order);
|
||||
switch (o->section)
|
||||
{
|
||||
default :
|
||||
|
||||
@@ -1321,7 +1321,7 @@ ppdcSource::get_integer(const char *v) // I - Value string
|
||||
while (*v && *v != ')')
|
||||
{
|
||||
// Skip leading whitespace...
|
||||
while (*v && isspace(*v & 255));
|
||||
while (*v && isspace(*v & 255))
|
||||
v ++;
|
||||
|
||||
if (!*v || *v == ')')
|
||||
|
||||
@@ -728,6 +728,7 @@ cupsdSaveAllClasses(void)
|
||||
|
||||
cupsFilePuts(fp, "# Class configuration file for " CUPS_SVERSION "\n");
|
||||
cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
|
||||
cupsFilePuts(fp, "# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING\n");
|
||||
|
||||
/*
|
||||
* Write each local class known to the system...
|
||||
|
||||
@@ -328,7 +328,8 @@ cat_drv(const char *name, /* I - PPD name */
|
||||
*pc_file_name++ = '\0';
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (!strncmp(resource, "/Library/Printers/PPDs.drv/", 27))
|
||||
if (!strncmp(resource, "/Library/Printers/PPDs/Contents/Resources/", 42) ||
|
||||
!strncmp(resource, "/System/Library/Printers/PPDs/Contents/Resources/", 49))
|
||||
strlcpy(filename, resource, sizeof(filename));
|
||||
else
|
||||
#endif // __APPLE__
|
||||
@@ -1493,13 +1494,21 @@ load_ppds(const char *d, /* I - Actual directory */
|
||||
ppd->record.size == dent->fileinfo.st_size &&
|
||||
ppd->record.mtime == dent->fileinfo.st_mtime)
|
||||
{
|
||||
do
|
||||
{
|
||||
ppd->found = 1;
|
||||
}
|
||||
while ((ppd = (ppd_info_t *)cupsArrayNext(PPDsByName)) != NULL &&
|
||||
/*
|
||||
* Rewind to the first entry for this file...
|
||||
*/
|
||||
|
||||
while ((ppd = (ppd_info_t *)cupsArrayPrev(PPDsByName)) != NULL &&
|
||||
!strcmp(ppd->record.filename, name));
|
||||
|
||||
/*
|
||||
* Then mark all of the matches for this file as found...
|
||||
*/
|
||||
|
||||
while ((ppd = (ppd_info_t *)cupsArrayNext(PPDsByName)) != NULL &&
|
||||
!strcmp(ppd->record.filename, name))
|
||||
ppd->found = 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1904,7 +1913,8 @@ load_drv(const char *filename, /* I - Actual filename */
|
||||
*cups_fax, // cupsFax attribute
|
||||
*nick_name; // NickName attribute
|
||||
ppdcFilter *filter; // Current filter
|
||||
bool product_found; // Found product?
|
||||
ppd_info_t *ppd; // Current PPD
|
||||
int products_found; // Number of products found
|
||||
char uri[1024], // Driver URI
|
||||
make_model[1024]; // Make and model
|
||||
int type; // Driver type
|
||||
@@ -1929,7 +1939,7 @@ load_drv(const char *filename, /* I - Actual filename */
|
||||
* Add a dummy entry for the file...
|
||||
*/
|
||||
|
||||
add_ppd(filename, filename, "", "", "", "", "", "", mtime, size, 0,
|
||||
add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0,
|
||||
PPD_TYPE_DRV, "drv");
|
||||
ChangedPPD = 1;
|
||||
|
||||
@@ -1981,22 +1991,28 @@ load_drv(const char *filename, /* I - Actual filename */
|
||||
type = PPD_TYPE_PDF;
|
||||
}
|
||||
|
||||
for (product = (ppdcAttr *)d->attrs->first(), product_found = false;
|
||||
for (product = (ppdcAttr *)d->attrs->first(), products_found = 0;
|
||||
product;
|
||||
product = (ppdcAttr *)d->attrs->next())
|
||||
if (!strcmp(product->name->value, "Product"))
|
||||
{
|
||||
product_found = true;
|
||||
if (!products_found)
|
||||
ppd = add_ppd(name, uri, "en", d->manufacturer->value, make_model,
|
||||
device_id ? device_id->value->value : "",
|
||||
product->value->value,
|
||||
ps_version ? ps_version->value->value : "(3010) 0",
|
||||
mtime, size, d->model_number, type, "drv");
|
||||
else if (products_found < PPD_MAX_PROD)
|
||||
strlcpy(ppd->record.products[products_found], product->value->value,
|
||||
sizeof(ppd->record.products[0]));
|
||||
else
|
||||
break;
|
||||
|
||||
add_ppd(filename, uri, "en", d->manufacturer->value, make_model,
|
||||
device_id ? device_id->value->value : "",
|
||||
product->value->value,
|
||||
ps_version ? ps_version->value->value : "(3010) 0",
|
||||
mtime, size, d->model_number, type, "drv");
|
||||
products_found ++;
|
||||
}
|
||||
|
||||
if (!product_found)
|
||||
add_ppd(filename, uri, "en", d->manufacturer->value, make_model,
|
||||
if (!products_found)
|
||||
add_ppd(name, uri, "en", d->manufacturer->value, make_model,
|
||||
device_id ? device_id->value->value : "",
|
||||
d->model_name->value,
|
||||
ps_version ? ps_version->value->value : "(3010) 0",
|
||||
|
||||
@@ -1558,8 +1558,11 @@ cupsdStartBrowsing(void)
|
||||
* Add the master connection to the select list...
|
||||
*/
|
||||
|
||||
cupsdAddSelect(DNSServiceRefSockFD(DNSSDRef),
|
||||
(cupsd_selfunc_t)dnssdUpdate, NULL, NULL);
|
||||
int fd = DNSServiceRefSockFD(DNSSDRef);
|
||||
|
||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
cupsdAddSelect(fd, (cupsd_selfunc_t)dnssdUpdate, NULL, NULL);
|
||||
|
||||
/*
|
||||
* Then get the port we use for registrations. If we are not listening
|
||||
@@ -2369,7 +2372,7 @@ dnssdBuildTxtRecord(
|
||||
(p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
|
||||
|
||||
keyvalue[i ][0] = "ty";
|
||||
keyvalue[i++][1] = p->make_model;
|
||||
keyvalue[i++][1] = p->make_model ? p->make_model : "Unknown";
|
||||
|
||||
if (p->location && *p->location != '\0')
|
||||
{
|
||||
|
||||
+36
-26
@@ -2324,8 +2324,9 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
dstfile[1024]; /* Destination Script/PPD file */
|
||||
int modify; /* Non-zero if we are modifying */
|
||||
char newname[IPP_MAX_NAME]; /* New printer name */
|
||||
int need_restart_job; /* Need to restart job? */
|
||||
int set_device_uri, /* Did we set the device URI? */
|
||||
int changed_driver, /* Changed the PPD/interface script? */
|
||||
need_restart_job, /* Need to restart job? */
|
||||
set_device_uri, /* Did we set the device URI? */
|
||||
set_port_monitor; /* Did we set the port monitor? */
|
||||
|
||||
|
||||
@@ -2469,6 +2470,7 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
* Look for attributes and copy them over as needed...
|
||||
*/
|
||||
|
||||
changed_driver = 0;
|
||||
need_restart_job = 0;
|
||||
|
||||
if ((attr = ippFindAttribute(con->request, "printer-location",
|
||||
@@ -2722,6 +2724,7 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
if (con->filename)
|
||||
{
|
||||
need_restart_job = 1;
|
||||
changed_driver = 1;
|
||||
|
||||
strlcpy(srcfile, con->filename, sizeof(srcfile));
|
||||
|
||||
@@ -2792,18 +2795,6 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG,
|
||||
"Copied PPD file successfully!");
|
||||
chmod(dstfile, 0644);
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* (Re)register color profiles...
|
||||
*/
|
||||
|
||||
if (!RunUser)
|
||||
{
|
||||
apple_unregister_profiles(printer);
|
||||
apple_register_profiles(printer);
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2820,6 +2811,7 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
IPP_TAG_NAME)) != NULL)
|
||||
{
|
||||
need_restart_job = 1;
|
||||
changed_driver = 1;
|
||||
|
||||
if (!strcmp(attr->values[0].string.text, "raw"))
|
||||
{
|
||||
@@ -2857,19 +2849,33 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG,
|
||||
"Copied PPD file successfully!");
|
||||
chmod(dstfile, 0644);
|
||||
}
|
||||
}
|
||||
|
||||
if (changed_driver)
|
||||
{
|
||||
/*
|
||||
* If we changed the PPD/interface script, then remove the printer's cache
|
||||
* file...
|
||||
*/
|
||||
|
||||
char cache_name[1024]; /* Cache filename for printer attrs */
|
||||
|
||||
snprintf(cache_name, sizeof(cache_name), "%s/%s.ipp", CacheDir,
|
||||
printer->name);
|
||||
unlink(cache_name);
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* (Re)register color profiles...
|
||||
*/
|
||||
/*
|
||||
* (Re)register color profiles...
|
||||
*/
|
||||
|
||||
if (!RunUser)
|
||||
{
|
||||
apple_unregister_profiles(printer);
|
||||
apple_register_profiles(printer);
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
if (!RunUser)
|
||||
{
|
||||
apple_unregister_profiles(printer);
|
||||
apple_register_profiles(printer);
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6556,7 +6562,7 @@ get_devices(cupsd_client_t *con) /* I - Client connection */
|
||||
"%d+%d+%d+%d+%s%s%s%s%s",
|
||||
con->request->request.op.request_id,
|
||||
limit ? limit->values[0].integer : 0,
|
||||
timeout ? timeout->values[0].integer : 10,
|
||||
timeout ? timeout->values[0].integer : 15,
|
||||
(int)User,
|
||||
requested_str,
|
||||
exclude_str[0] ? "%20" : "", exclude_str,
|
||||
@@ -8470,7 +8476,9 @@ ppd_parse_line(const char *line, /* I - Line */
|
||||
* Read the option name...
|
||||
*/
|
||||
|
||||
for (line += 8, olen --; isalnum(*line & 255); line ++)
|
||||
for (line += 8, olen --;
|
||||
*line > ' ' && *line < 0x7f && *line != ':' && *line != '/';
|
||||
line ++)
|
||||
if (olen > 0)
|
||||
{
|
||||
*option++ = *line;
|
||||
@@ -8498,7 +8506,9 @@ ppd_parse_line(const char *line, /* I - Line */
|
||||
while (isspace(*line & 255))
|
||||
line ++;
|
||||
|
||||
for (clen --; isalnum(*line & 255); line ++)
|
||||
for (clen --;
|
||||
*line > ' ' && *line < 0x7f && *line != ':' && *line != '/';
|
||||
line ++)
|
||||
if (clen > 0)
|
||||
{
|
||||
*choice++ = *line;
|
||||
|
||||
+26
-6
@@ -2297,18 +2297,33 @@ cupsdSetJobState(
|
||||
case IPP_JOB_ABORTED :
|
||||
case IPP_JOB_CANCELED :
|
||||
case IPP_JOB_COMPLETED :
|
||||
if (newstate == IPP_JOB_CANCELED)
|
||||
{
|
||||
/*
|
||||
* Remove the job from the active list if there are no processes still
|
||||
* running for it...
|
||||
*/
|
||||
|
||||
for (i = 0; job->filters[i] < 0; i++);
|
||||
|
||||
if (!job->filters[i] && job->backend <= 0)
|
||||
cupsArrayRemove(ActiveJobs, job);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Otherwise just remove the job from the active list immediately...
|
||||
*/
|
||||
|
||||
cupsArrayRemove(ActiveJobs, job);
|
||||
}
|
||||
|
||||
/*
|
||||
* Expire job subscriptions since the job is now "completed"...
|
||||
*/
|
||||
|
||||
cupsdExpireSubscriptions(NULL, job);
|
||||
|
||||
/*
|
||||
* Remove the job from the active list...
|
||||
*/
|
||||
|
||||
cupsArrayRemove(ActiveJobs, job);
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* If we are going to sleep and the PrintingJobs count is now 0, allow the
|
||||
@@ -3848,6 +3863,11 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
fcntl(job->side_pipes[1], F_SETFL,
|
||||
fcntl(job->side_pipes[1], F_GETFL) | O_NONBLOCK);
|
||||
|
||||
fcntl(job->side_pipes[0], F_SETFD,
|
||||
fcntl(job->side_pipes[0], F_GETFD) | FD_CLOEXEC);
|
||||
fcntl(job->side_pipes[1], F_SETFD,
|
||||
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
/*
|
||||
* Now start the first file in the job...
|
||||
*/
|
||||
|
||||
@@ -1793,6 +1793,18 @@ process_children(void)
|
||||
cupsdContinueJob(job);
|
||||
}
|
||||
}
|
||||
else if (job->state_value == IPP_JOB_CANCELED)
|
||||
{
|
||||
/*
|
||||
* Remove the job from the active list if there are no processes still
|
||||
* running for it...
|
||||
*/
|
||||
|
||||
for (i = 0; job->filters[i] < 0; i++);
|
||||
|
||||
if (!job->filters[i] && job->backend <= 0)
|
||||
cupsArrayRemove(ActiveJobs, job);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1518,6 +1518,7 @@ cupsdSaveAllPrinters(void)
|
||||
|
||||
cupsFilePuts(fp, "# Printer configuration file for " CUPS_SVERSION "\n");
|
||||
cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
|
||||
cupsFilePuts(fp, "# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING\n");
|
||||
|
||||
/*
|
||||
* Write each local printer known to the system...
|
||||
@@ -3699,10 +3700,6 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
|
||||
p->name, mimetype);
|
||||
}
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2,
|
||||
"add_printer_formats: %s: %d supported types",
|
||||
p->name, cupsArrayCount(p->filetypes) + 1);
|
||||
|
||||
/*
|
||||
* Add the file formats that can be filtered...
|
||||
*/
|
||||
@@ -3713,9 +3710,13 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
|
||||
else
|
||||
i = 0;
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2,
|
||||
"add_printer_formats: %s: %d supported types",
|
||||
p->name, cupsArrayCount(p->filetypes) + i);
|
||||
|
||||
attr = ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
|
||||
"document-format-supported",
|
||||
cupsArrayCount(p->filetypes) + 1, NULL, NULL);
|
||||
cupsArrayCount(p->filetypes) + i, NULL, NULL);
|
||||
|
||||
if (i)
|
||||
attr->values[0].string.text = _cupsStrAlloc("application/octet-stream");
|
||||
@@ -3834,7 +3835,7 @@ delete_printer_filters(
|
||||
for (filter = mimeFirstFilter(MimeDatabase);
|
||||
filter;
|
||||
filter = mimeNextFilter(MimeDatabase))
|
||||
if (filter->dst == p->filetype)
|
||||
if (filter->dst == p->filetype || filter->dst == p->prefiltertype)
|
||||
{
|
||||
/*
|
||||
* Delete the current filter...
|
||||
|
||||
+169
-25
@@ -100,6 +100,17 @@ enum
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* File permissions...
|
||||
*/
|
||||
|
||||
#define MODE_WRITE 0002 /* Other write */
|
||||
#define MODE_MASK 0555 /* Owner/group/other read+exec/search */
|
||||
#define MODE_DATAFILE 0444 /* Owner/group/other read */
|
||||
#define MODE_DIRECTORY 0555 /* Owner/group/other read+search */
|
||||
#define MODE_PROGRAM 0555 /* Owner/group/other read+exec */
|
||||
|
||||
|
||||
/*
|
||||
* Standard Adobe media keywords (must remain sorted)...
|
||||
*/
|
||||
@@ -357,7 +368,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
root = argv[i];
|
||||
break;
|
||||
|
||||
case 'W' : /* Turn errors into warnings */
|
||||
case 'W' : /* Turn errors into warnings */
|
||||
i ++;
|
||||
|
||||
if (i >= argc)
|
||||
@@ -1387,18 +1398,18 @@ main(int argc, /* I - Number of command-line args */
|
||||
{
|
||||
check_basics(argv[i]);
|
||||
|
||||
if (warn & WARN_CONSTRAINTS)
|
||||
errors = check_constraints(ppd, errors, verbose, 1);
|
||||
|
||||
if (warn & WARN_DEFAULTS)
|
||||
errors = check_defaults(ppd, errors, verbose, 1);
|
||||
|
||||
if (warn & WARN_PROFILES)
|
||||
errors = check_profiles(ppd, root, errors, verbose, 1);
|
||||
if (warn & WARN_CONSTRAINTS)
|
||||
errors = check_constraints(ppd, errors, verbose, 1);
|
||||
|
||||
if (warn & WARN_FILTERS)
|
||||
errors = check_filters(ppd, root, errors, verbose, 1);
|
||||
|
||||
if (warn & WARN_PROFILES)
|
||||
errors = check_profiles(ppd, root, errors, verbose, 1);
|
||||
|
||||
if (warn & WARN_SIZES)
|
||||
errors = check_sizes(ppd, errors, verbose, 1);
|
||||
else
|
||||
@@ -2411,6 +2422,7 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
pathprog[1024]; /* Complete path to program/filter */
|
||||
int cost; /* Cost of filter */
|
||||
const char *prefix; /* WARN/FAIL prefix */
|
||||
struct stat fileinfo; /* File information */
|
||||
|
||||
|
||||
prefix = warn ? " WARN " : "**FAIL**";
|
||||
@@ -2452,14 +2464,28 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
program);
|
||||
}
|
||||
|
||||
if (access(pathprog, X_OK))
|
||||
if (stat(pathprog, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing cupsFilter "
|
||||
"file \"%s\"\n"), prefix, program);
|
||||
"file \"%s\"\n"), prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_PROGRAM)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on cupsFilter "
|
||||
"file \"%s\"\n"), prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
@@ -2523,18 +2549,33 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
program);
|
||||
}
|
||||
|
||||
if (access(pathprog, X_OK))
|
||||
if (stat(pathprog, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing cupsPreFilter "
|
||||
"file \"%s\"\n"), prefix, program);
|
||||
"file \"%s\"\n"), prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_PROGRAM)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"cupsPreFilter file \"%s\"\n"), prefix,
|
||||
pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else
|
||||
errors = valid_path("cupsPreFilter", pathprog, errors, verbose, warn);
|
||||
}
|
||||
@@ -2562,8 +2603,11 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
|
||||
snprintf(pathprog, sizeof(pathprog), "%s%s", root,
|
||||
attr->value ? attr->value : "(null)");
|
||||
|
||||
if (!attr->value || access(attr->value, 0))
|
||||
if (!attr->value || stat(pathprog, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
@@ -2571,13 +2615,28 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing "
|
||||
"APDialogExtension file \"%s\"\n"),
|
||||
prefix, attr->value ? attr->value : "<NULL>");
|
||||
prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"APDialogExtension file \"%s\"\n"), prefix,
|
||||
pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else
|
||||
errors = valid_path("APDialogExtension", attr->value, errors, verbose,
|
||||
errors = valid_path("APDialogExtension", pathprog, errors, verbose,
|
||||
warn);
|
||||
}
|
||||
|
||||
@@ -2601,7 +2660,10 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
errors ++;
|
||||
}
|
||||
|
||||
if (!attr->value || access(attr->value, 0))
|
||||
snprintf(pathprog, sizeof(pathprog), "%s%s", root,
|
||||
attr->value ? attr->value : "(null)");
|
||||
|
||||
if (!attr->value || stat(pathprog, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
@@ -2609,13 +2671,28 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing "
|
||||
"APPrinterIconPath file \"%s\"\n"),
|
||||
prefix, attr->value ? attr->value : "<NULL>");
|
||||
prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_DATAFILE)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"APPrinterIconPath file \"%s\"\n"), prefix,
|
||||
pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else
|
||||
errors = valid_path("APPrinterIconPath", attr->value, errors, verbose,
|
||||
errors = valid_path("APPrinterIconPath", pathprog, errors, verbose,
|
||||
warn);
|
||||
}
|
||||
|
||||
@@ -2639,7 +2716,10 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
errors ++;
|
||||
}
|
||||
|
||||
if (!attr->value || access(attr->value, 0))
|
||||
snprintf(pathprog, sizeof(pathprog), "%s%s", root,
|
||||
attr->value ? attr->value : "(null)");
|
||||
|
||||
if (!attr->value || stat(pathprog, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
@@ -2647,13 +2727,28 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing "
|
||||
"APPrinterLowInkTool file \"%s\"\n"),
|
||||
prefix, attr->value ? attr->value : "<NULL>");
|
||||
prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"APPrinterLowInkTool file \"%s\"\n"), prefix,
|
||||
pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else
|
||||
errors = valid_path("APPrinterLowInkTool", attr->value, errors, verbose,
|
||||
errors = valid_path("APPrinterLowInkTool", pathprog, errors, verbose,
|
||||
warn);
|
||||
}
|
||||
|
||||
@@ -2677,7 +2772,10 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
errors ++;
|
||||
}
|
||||
|
||||
if (!attr->value || access(attr->value, 0))
|
||||
snprintf(pathprog, sizeof(pathprog), "%s%s", root,
|
||||
attr->value ? attr->value : "(null)");
|
||||
|
||||
if (!attr->value || stat(pathprog, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
@@ -2685,13 +2783,28 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing "
|
||||
"APPrinterUtilityPath file \"%s\"\n"),
|
||||
prefix, attr->value ? attr->value : "<NULL>");
|
||||
prefix, pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"APPrinterUtilityPath file \"%s\"\n"), prefix,
|
||||
pathprog);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else
|
||||
errors = valid_path("APPrinterUtilityPath", attr->value, errors, verbose,
|
||||
errors = valid_path("APPrinterUtilityPath", pathprog, errors, verbose,
|
||||
warn);
|
||||
}
|
||||
|
||||
@@ -2715,7 +2828,7 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
errors ++;
|
||||
}
|
||||
|
||||
if (!attr->value || access(attr->value, 0))
|
||||
if (!attr->value || stat(attr->value, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
@@ -2728,6 +2841,21 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"APScanAppPath file \"%s\"\n"), prefix,
|
||||
attr->value);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else
|
||||
errors = valid_path("APScanAppPath", attr->value, errors, verbose,
|
||||
warn);
|
||||
@@ -2768,6 +2896,7 @@ check_profiles(ppd_file_t *ppd, /* I - PPD file */
|
||||
const char *ptr; /* Pointer into string */
|
||||
const char *prefix; /* WARN/FAIL prefix */
|
||||
char filename[1024]; /* Profile filename */
|
||||
struct stat fileinfo; /* File information */
|
||||
int num_profiles = 0; /* Number of profiles */
|
||||
unsigned hash, /* Current hash value */
|
||||
hashes[1000]; /* Hash values of profile names */
|
||||
@@ -2822,14 +2951,29 @@ check_profiles(ppd_file_t *ppd, /* I - PPD file */
|
||||
attr->value);
|
||||
}
|
||||
|
||||
if (access(filename, 0))
|
||||
if (stat(filename, &fileinfo))
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Missing cupsICCProfile "
|
||||
"file \"%s\"!\n"), prefix, attr->value);
|
||||
"file \"%s\"!\n"), prefix, filename);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
}
|
||||
else if (fileinfo.st_uid != 0 ||
|
||||
(fileinfo.st_mode & MODE_WRITE) ||
|
||||
(fileinfo.st_mode & MODE_MASK) != MODE_DATAFILE)
|
||||
{
|
||||
if (!warn && !errors && !verbose)
|
||||
_cupsLangPuts(stdout, _(" FAIL\n"));
|
||||
|
||||
if (verbose >= 0)
|
||||
_cupsLangPrintf(stdout, _(" %s Bad permissions on "
|
||||
"cupsICCProfile file \"%s\"\n"), prefix,
|
||||
filename);
|
||||
|
||||
if (!warn)
|
||||
errors ++;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Template makefile for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
# Copyright 2007-2008 by Apple Inc.
|
||||
# Copyright 2007-2009 by Apple Inc.
|
||||
# Copyright 1993-2007 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -149,7 +149,7 @@ install-languages:
|
||||
if test -d $$lang; then \
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/templates/$$lang; \
|
||||
for file in $(FILES); do \
|
||||
$(INSTALL_DATA) $$lang/$$file $(DATADIR)/templates/$$lang 2>/dev/null || true; \
|
||||
$(INSTALL_DATA) $$lang/$$file $(DATADIR)/templates/$$lang >/dev/null 2>&1 || true; \
|
||||
done \
|
||||
fi \
|
||||
done
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Standardeinstellungen f%uuml;r {printer_name} festlegen</H2>
|
||||
<H2 CLASS="title">Standardeinstellungen für {printer_name} festlegen</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server"><INPUT TYPE="SUBMIT" VALUE="Редактировать конфигурационный файл"></FORM>
|
||||
<FORM ACTION="/admin/log/access_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Показать журнал заданий"></FORM>
|
||||
<FORM ACTION="/admin/log/error_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Показать журнал ошибок"></FORM>
|
||||
<FORM ACTION="/admin/log/page_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Показать журнал страниц">
|
||||
<FORM ACTION="/admin/log/page_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Показать журнал страниц"></FORM>
|
||||
</P>
|
||||
|
||||
{SETTINGS_ERROR?<P>{SETTINGS_MESSAGE}</P>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<H2 CLASS="title">Очистка всех заданий для {is_class?группы:принтера} {printer_name}</H2>
|
||||
|
||||
<P>Все задания для {is_class?группы:принтера} «<A
|
||||
HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
|
||||
HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
|
||||
очищены.</P>
|
||||
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<H2 CLASS="title">Отмена заданий для {is_class?группы:принтера} {printer_name}</H2>
|
||||
|
||||
<P>{is_class?Группа:Принтер} «<A
|
||||
HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
|
||||
HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
|
||||
больше не принимает задания.</P>
|
||||
|
||||
</DIV>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<H2 CLASS="title">Возобновить работу {is_class?группы:принтера} {printer_name}</H2>
|
||||
|
||||
<P>{is_class?Группа:Принтер} «<A
|
||||
HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
|
||||
HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
|
||||
теперь принимают задания.</P>
|
||||
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<H2 CLASS="title">Приостановить {is_class?группу:принтер} {printer_name}</H2>
|
||||
|
||||
<P>{is_class?Группа:Принтер} «<A
|
||||
HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
|
||||
HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
|
||||
{is_class?была приостановлена:был приостановлен}.</P>
|
||||
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -251,6 +251,7 @@ ln -s $root/notifier /tmp/cups-$user/bin
|
||||
ln -s $root/scheduler /tmp/cups-$user/bin/daemon
|
||||
ln -s $root/filter/bannertops /tmp/cups-$user/bin/filter
|
||||
ln -s $root/filter/commandtops /tmp/cups-$user/bin/filter
|
||||
ln -s $root/filter/gziptoany /tmp/cups-$user/bin/filter
|
||||
ln -s $root/filter/hpgltops /tmp/cups-$user/bin/filter
|
||||
ln -s $root/filter/pstops /tmp/cups-$user/bin/filter
|
||||
ln -s $root/filter/rastertoepson /tmp/cups-$user/bin/filter
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário