tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing settime1() to reject invalid struct timespec ?



In article <20090727151349.GB434833%medusa.sis.pasteur.fr@localhost>,
Nicolas Joly  <njoly%pasteur.fr@localhost> wrote:
>-=-=-=-=-=-
>
>On Mon, Jul 27, 2009 at 03:26:25PM +0200, Joerg Sonnenberger wrote:
>> On Mon, Jul 27, 2009 at 02:37:29PM +0200, Nicolas Joly wrote:
>> > To solve this, we can: (a) use an ugly __UNCONST() when calling
>> > itimespecfix(), or (b) drop the const qualifier from
>> > clock_settime1()/settime1() ...
>> 
>> (c) Normalise into a new variable.
>
>That's even better ;-) It kills the __UNCONST from kauth call.
>
>Here follow the corresponding patch.
>
>+      nts.tv_sec = ts->tv_sec;
>+      nts.tv_nsec = ts->tv_nsec;

nts = *ts;

christos



Home | Main Index | Thread Index | Old Index