Not authorized for remote job operations

Alan Somers soNmOeSrPsAaMm at comcast.net.invalid
Sun Jan 16 19:47:16 PST 2005


Alan Somers wrote:
> I'm attempting to issue job operations for a remotely queued job from a program running on a client.  I have configured the remote server's cupsd.conf file thusly:
>
>   <Location /jobs>
>   AuthType None
>   AuthClass Anonymous
>   Order Deny,Allow
>   Deny From All
>   Allow From All
>   </Location>
>
> However, when I attempt to perform an operation on a remote job, the status returned in the response is IPP_NOT_AUTHORIZED.  Here's the code (simplified) I'm using on the client for one of my test cases (the job is queued and the printer is stopped):
>
>   ipp_t *response;
>   ipp_status_t requestStatus;
>   cups_lang_t *language = cupsLangDefault();
>   char *host = "iCenter.local";
>   char *uri = "http://iCenter.local:631/jobs/239";
>   http_t *http = httpConnectEncrypt(host, ippPort(),
>                                     cupsEncryption());
>   ipp_t *request = ippNew();
>   request->request.op.operation_id = IPP_HOLD_JOB;
>   request->request.op.request_id = 1;
>   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
>                "attributes-charset", NULL,
>                cupsLangEncoding(language));
>   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
>                "attributes-natural-language", NULL,
>                language->language);
>   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
>                "job-uri", NULL, uri);
>   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
>                "requesting-user-name", NULL, "unknown");
>   if ((response = cupsDoRequest(http, request, "/")) != NULL)
>     requestStatus = response->request.status.status_code;
>
> Does anybody have a clue as to what's wrong?  I haven't had a bit of problem requesting status from the remote server, nor do I have any problems going through the web interface.

I found a solution.  I changed the resource (third argument) in the cupsDoRequest() call to "/jobs" and job operations now work.  Unfortunately, with the Mac OS X Panther CUPS authentication problem, I'm forced to leave job control wide open as configured above, although it's not too big of a deal.




More information about the cups-devel mailing list