Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for an user argument for lp #1087

Closed
michaelrsweet opened this issue Feb 20, 2005 · 3 comments
Closed

Patch for an user argument for lp #1087

michaelrsweet opened this issue Feb 20, 2005 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2-feature
CUPS.org User: braice

Hello,
I use autentication with cups and I needed to change tu user name transmitted by lp (remote print with a different username on the server and the local machine)

I've written a little trivial patch in order to do it

I give it here if you can include it in the mainline

The path are a little dirty

Brice DUBOST

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

We have some other STRs that are related to this. Will have something of this form available in CUPS 1.2 (the "real" option name will probably be "-U")

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"patch.txt":

diff -Nur ../../cups-1.1.23/systemv/lp.c lp.c
--- ../../cups-1.1.23/systemv/lp.c 2005-01-03 20:29:59.000000000 +0100
+++ lp.c 2005-02-19 17:18:15.000000000 +0100
@@ -447,6 +447,23 @@

        fputs("lp: Warning - content type option ignored!\n", stderr);
        break;
  •    case 'u' : /\* Remote User */
    
  •       if (argv[i][2] != '\0')
    
  •         cupsSetUser(argv[i] + 2);
    
  •       else
    
  •       {
    
  •         i ++;
    
  •         if (i >= argc)
    
  •         {
    
  •           fputs("lp: Expected username after -u option!\n", stderr);
    
  •           return (1);
    
  •          }
    
  •         cupsSetUser(argv[i]);
    
  •       }
    
  •       break;
    
    default :
        fprintf(stderr, "lp: Unknown option \'%c\'!\n", argv[i][1]);
    

@michaelrsweet michaelrsweet added the enhancement New feature or request label Mar 17, 2016
@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant