[cups-devel] setting AllowUser from API

Robert Welz Robert.Welz at thinprint.com
Wed May 31 05:24:45 PDT 2017


Dear Michael, dear all.

For a printer queue set up in API I want to alter the AllowUser option in the following manner:

I have a local user called „rwelz“ and I want to add a second user called „testadmin“so that I have two users. 

I am using:


num_options = cupsAddOption("requesting-user-name-allowed“,“rwelz, testadmin", num_options, &options);
...
ippDelete(cupsDoRequest(http, request, "/admin/"));

and for removing „testadmin“ I tried 

num_options = cupsAddOption("requesting-user-name-allowed“,“rwelz", num_options, &options);
...
ippDelete(cupsDoRequest(http, request, "/admin/"));


but that was of no success.

I also tried „requesting-user-name-deied“ but that was of no success either.


What is the correct way to alter the ACL by API (add and remove allowed users)?

kind

Regards,

Robert




Robert Welz  |  Software Development ThinPrint
ThinPrint GmbH  |  Alt-Moabit 91 a/b  |  10559 Berlin  |  Germany
Tel.: +49 (0)30 394931-0  |  Fax: +49 (0)30 394931-99
www.thinprint.com  |  robert.welz at .cortado.com
 
Geschäftsführung: Charlotte Künzell, Thorsten Hesse, Frank Hoffmann, Bernd Trappe, Amtsgericht Berlin-Charlottenburg, HRB 163480 B

> Am 29.05.2017 um 13:51 schrieb Michael Sweet <msweet at apple.com>:
> 
> Prasanta,
> 
>> On May 29, 2017, at 2:25 AM, My Sadhukhan <psadhukhan at gmail.com> wrote:
>> 
>> Hi,
>> 
>> Can cups library maintainers please help me out with this
>> 
>> 1. Will ppdOpenFile, ppdClose, ppdFindOption, ppdPageSize APIs be available
>> in future version of CUPS.
>>   I guess the deprecation was announced around cups 1.6 timeframe and now
>> we have cups 2.2. Till which version of CUPS we can expect these APIs to be
>> around?
> 
> The writing was on the wall starting in CUPS 1.4 with its focus on IPP Everywhere support.  CUPS 1.5 moved all of the PPD API definitions to ppd.h and required a separate include of cups/ppd.h, and CUPS 1.6 marked the PPD APIs as deprecated - that was 5 years ago.
> 
> I had high hopes of removing the PPD API in CUPS 2.0, but there were still too many legacy applications and drivers using them at the time.  We revisit the decision with every major and minor release so the next chance for removal is CUPS 2.3/3.0.
> 
> I've also been maintaining (in parallel) the PWG's IPP Sample Code repository, which includes a configurable IPP server and client library (the CUPS library) but no PPD API or driver support.  While the focus of this is on prototyping new services and standards for the PWG, it also serves as a testbed for how we can make a better, leaner printing stack in general.
> 
> Almost every printer sold since 2010 supports IPP and works with the IPP Everywhere "driver" in CUPS, and the push in the PWG (and at Apple) has been to ensure that IPP can support all of the major/typical printer driver functionality with the goal of eliminating vendor printer drivers.
> 
>> 2. Can I get a link to JobTicket API list(s)?
> 
> A new CUPS programming manual that focuses on the new APIs was posted to the CUPS web site last month in time for the 2017 printing summit and is available here:
> 
>    https://www.cups.org/doc/cupspm.epub
>    https://www.cups.org/doc/cupspm.html
> 
> I'll make a wider announcement when we release CUPS 2.2.4 (soonish), and the new manual is still going through editorial changes and getting more examples...
> 
> _________________________________________________________
> Michael Sweet, Senior Printing System Engineer
> 
> _______________________________________________
> cups-devel mailing list
> cups-devel at cups.org
> https://lists.cups.org/mailman/listinfo/cups-devel



More information about the cups-devel mailing list