https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253048

            Bug ID: 253048
           Summary: unionfs shows old file with link count of zero
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: b...@freebsd.org
          Reporter: j...@transactionware.com

After executing pwd_mkdb on a system with a unionfs mount above /etc, the
/etc/spwd.db file is the old version of the file with a link count of zero.

Filesystems:

/dev/gpt/root1 on / (ufs, local, read-only)
/dev/gpt/cfg on /cfg (ufs, local, synchronous, soft-updates)
<above>:/cfg/etc on /etc (unionfs, local, read-only)

Command:

pwd_mkdb -p -d /cfg/etc /cfg/etc/master.passwd

Results:

$ ls -il /etc/*pwd.db
65721 -rw-r--r--  1 root  wheel  40960 27 Jan 16:32 /etc/pwd.db
65720 -rw-------  0 root  wheel  40960 26 Jan 14:04 /etc/spwd.db

$ ls -il /cfg/etc/*pwd.db
65721 -rw-r--r--  1 root  wheel  40960 27 Jan 16:32 /cfg/etc/pwd.db
65724 -rw-------  1 root  wheel  40960 27 Jan 16:32 /cfg/etc/spwd.db

The /etc/spwd.db file with inode number 65720, and a link count of zero, is
identical to the /cfg/etc/spwd.db file from before the pwd_mkdb command
(checked against a backup).

Removing /cfg/etc/spwd.db removes the file from /cfg/etc/spwd.db, but the
/etc/spwd.db version does not change.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to