On Sat, Sep 25, 2010 at 09:51:05AM +0100, Adam D. Barratt wrote:
> On Sat, 2010-09-25 at 01:46 +0100, Paul Martin wrote:
> > I've just uploaded mingetty 1.08-2 with just a fix for critical
> > security bug #597382. Apart from the changelog entry, there are no
> > other changes than the diff attached to the bug report.
>
> + if (priority) {
> + if (nice (priority))
> + error ("nice(): %s", strerror (errno));
> + }
>
> nice() returns the new nice value on success and -1 on failure, so the
> above seems wrong (or I need more coffee).
Many thanks for pointing this out. I've fixed this in 1.07-3.
+ if (priority) {
+ errno = 0; /* see the nice(2) NOTES for why we do this */
+ if ((nice(priority) == -1) && (errno != 0))
+ error ("nice(): %s", strerror (errno));
+ }
--
Paul Martin <pm@debian.org>
Attachment:
signature.asc
Description: Digital signature