Patch for lp
dubost at crans.org
dubost at crans.org
Sat Feb 19 12:00:17 PST 2005
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
-----Patch begin Here ----
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]);
-----Patch ends Here ----
More information about the cups
mailing list