Page MenuHome GnuPG

GnuPG does not work correctly with OSX MS-DOS/FAT implementation.
Closed, ResolvedPublic

Description

On OSX any empty file on a MS-DOS/FAT filesystem reports the same inode (checked with OSX 10.8.5 and 10.9):

$ cat test_inode.sh
#!/bin/sh

dev=$(hdiutil attach -nomount -puppetstrings ram://11654 | tr -d ' \t')
devname="INODETEST"
diskutil erasevolume MS-DOS "$devname" "$dev" > /dev/null

touch /Volumes/$devname/foo
sleep 3
touch /Volumes/$devname/bar

stat /Volumes/$devname/*

hdiutil detach $dev > /dev/null

$ ./test_inode.sh
16777222 999999999 -rwxrwxrwx 1 shammash shammash 0 0 "Jan 2 00:00:00 2014" "Jan 2 15:24:44 2014" "Jan 2 15:24:44 2014" "Jan 2
15:24:44 2014" 131072 0 0 /Volumes/INODETEST/bar
16777222 999999999 -rwxrwxrwx 1 shammash shammash 0 0 "Jan 2 00:00:00 2014" "Jan 2 15:24:34 2014" "Jan 2 15:24:34 2014" "Jan 2
15:24:34 2014" 131072 0 0 /Volumes/INODETEST/foo

When working with an empty/new homedir stored on such filesystem GnuPG thinks that two empty keyrings (e.g. pubring and secring in a
newly created GNUPGHOME) are the same file. This breaks many things, including the creation of a key or the import of public keys.
GnuPG can't operate correctly in this situation because of util/fileutil.c:same_file_p() : The function considers two files equal if
they have the same inode on the same device.

Event Timeline

That seems to be a OS/X specific bug in its file systems. I have no idea how to
fix that. Maybe this should go into the FAQ. The obvious workaround is to copy
a pubring.gpg with one key to the MSDOS directory.

werner claimed this task.
werner added a project: Not A Bug.
werner removed a project: Stalled.