Subject: star is fast-forwarding the system time via the -ctime option
Package: star
Version: 1.5a57-1
Severity: important


When using -atime -ctime (to let star restore all inode times after the
dump), star with root privs undeterminably fast-forwards the system time.

This is really SERIOUS bug, which should not occur in such software.

This is probably caused by the method of restoring i-node ctime, see
star/star_unix.c:654:

    #ifdef  SET_CTIME
        if (Ctime) {
            gettimeofday(&curtime, 0);
            settimeofday(&tp[2], 0);
        }
    #endif
        ret = utimes(name, tp);
        errsav = geterrno();

    #ifdef  SET_CTIME
        if (Ctime) {
            gettimeofday(&pasttime, 0);
            /* XXX Hack: f_ctime.tv_usec ist immer 0! */
            curtime.tv_usec += pasttime.tv_usec;
            if (curtime.tv_usec > 1000000) {
                curtime.tv_sec += 1;
                curtime.tv_usec -= 1000000;
            }
            settimeofday(&curtime, 0);
    /*      error("pasttime.usec: %d\n", pasttime.tv_usec);*/
        }
    #endif


Possibly (another) bug: Doesn't sole "curtime.tv_usec += pasttime.tv_usec;"
statement ignore possible pasttime.tv_sec change for cases, when the
intermediate part lasted unexpectedly long?


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)

Versions of packages star depends on:
ii  libacl1                     2.2.23-1     Access control list shared
library
ii  libattr1                    2.4.16-1     Extended attribute shared
library
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared
libraries an

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to