~ubuntu-branches/ubuntu/quantal/lpr/quantal

« back to all changes in this revision

Viewing changes to lprm/lprm.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Majer
  • Date: 2006-11-04 23:21:59 UTC
  • mfrom: (3.1.2 feisty)
  • Revision ID: james.westby@ubuntu.com-20061104232159-4sbjww5mmvuwcrqx
Tags: 1:2006.11.04
* Added upstream patches
   + lpr.c [rev. 1.39] - portability patch s/0/SEEK_SET/ in lseek
* /var/log/lp-{acct,errs} are now rotated weekly with lp:adm
   ownership with 0640 permissions. The latter is to counteract any
   security related information being leaked from filter's stderr to
   the log to the user. (closes: #390720)

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
                fatal("Your name is too long");
118
118
        strlcpy(luser, pw->pw_name, sizeof(luser));
119
119
        person = luser;
120
 
        while ((ch = getopt(argc, argv, "P:w:-")) != -1) {
 
120
        while ((ch = getopt(argc, argv, "P:w")) != -1) {
121
121
                switch (ch) {
122
 
                case '-':
123
 
                        users = -1;
124
 
                        break;
125
122
                case 'P':
126
123
                        printer = optarg;
127
124
                        break;
143
140
 
144
141
        if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
145
142
                printer = DEFLP;
 
143
        /* getopt doesn't handle '-' as an argument so we have to handle it here manually */
 
144
        if(argc == 1 && *argv[0] == '-' && strlen(argv[0]) == 1) {
 
145
                argc--;
 
146
                argv++;
 
147
                users = -1;
 
148
        }
146
149
        if (users < 0 && argc != 0)
147
150
                usage();
148
151
        while (argc > 0) {