~ubuntu-branches/ubuntu/hoary/lpr/hoary

« back to all changes in this revision

Viewing changes to common_source/rmjob.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-03-15 14:54:38 UTC
  • Revision ID: james.westby@ubuntu.com-20030315145438-wvhdf01k99wvq846
Tags: 1:2000.05.07-4.3
* Non-maintainer upload by the Security Team
* Applied patch from SuSE to fix buffer overvlow and arbitrary file access

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
                        return(0);
178
178
        }
179
179
        seteuid(uid);
180
 
        if (!getline(fp)) {
 
180
        if (!getcfline(fp)) {
181
181
                (void) fclose(fp);
182
182
                return(0);              /* no daemon present */
183
183
        }
213
213
        if ((cfp = fopen(file, "r")) == NULL)
214
214
                fatal("cannot open %s", file);
215
215
        seteuid(uid);
216
 
        while (getline(cfp)) {
 
216
        while (getcfline(cfp)) {
217
217
                switch (line[0]) {
218
218
                case 'U':  /* unlink associated files */
219
219
                        if (strchr(line+1, '/') || strncmp(line+1, "df", 2))
266
266
        if ((cfp = fopen(file, "r")) == NULL)
267
267
                return(0);
268
268
        seteuid(uid);
269
 
        while (getline(cfp)) {
 
269
        while (getcfline(cfp)) {
270
270
                if (line[0] == 'P')
271
271
                        break;
272
272
        }
365
365
 */
366
366
int
367
367
iscf(d)
368
 
        struct dirent *d;
 
368
        const struct dirent *d;
369
369
{
370
370
        return(d->d_name[0] == 'c' && d->d_name[1] == 'f');
371
371
}