Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2006 03:09:28 GMT
From:      joe <freebsd-security@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/91622: /bin/cp does not update atime of the source file
Message-ID:  <200601110309.k0B39SQ8006489@www.freebsd.org>
Resent-Message-ID: <200601110310.k0B3A8Tm044365@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91622
>Category:       bin
>Synopsis:       /bin/cp does not update atime of the source file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 11 03:10:07 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     joe
>Release:        RELENG_4 20051028
>Organization:
>Environment:
RELENG_4 20051028
>Description:

[] date
Tue Jan 10 21:58:06 EST 2006

[] ls -lTu  /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc
ls: /tmp/.zshrc: No such file or directory
ls: /tmp/dmesg.boot: No such file or directory
-rw-------  1 user  user     625 Jan 10 21:36:27 2006 /home/user/.zshrc
-rw-r--r--  1 root  wheel  15732 Jan 10 21:50:31 2006 /var/run/dmesg.boot

[] /bin/cp  /var/run/dmesg.boot ~/.zshrc /tmp

[] ls -lTu  /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc
-rw-------  1 user  user     625 Jan 10 21:36:27 2006 /home/user/.zshrc
-rw-------  1 user  wheel    625 Jan 10 21:59:35 2006 /tmp/.zshrc
-rw-r--r--  1 user  wheel  15732 Jan 10 21:59:35 2006 /tmp/dmesg.boot
-rw-r--r--  1 root  wheel  15732 Jan 10 21:50:31 2006 /var/run/dmesg.boot

[] /bin/cat /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc > /dev/null

[] ls -lTu  /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc
-rw-------  1 user  user     625 Jan 10 22:00:57 2006 /home/user/.zshrc
-rw-------  1 user  wheel    625 Jan 10 22:00:57 2006 /tmp/.zshrc
-rw-r--r--  1 user  wheel  15732 Jan 10 22:00:57 2006 /tmp/dmesg.boot
-rw-r--r--  1 root  wheel  15732 Jan 10 22:00:57 2006 /var/run/dmesg.boot


this occurs regardless of whether or not the user has
rwx permissions on the source file. does not apply of
course if the source filesystem is mounted read-only.
they are read-write here.

since the source file is indeed being read, the atime should be updated.


>How-To-Repeat:

repeat the above commands, examine the output.
>Fix:

unknown, either /bin/cp or more likely syscalls.
thanks.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601110309.k0B39SQ8006489>