[OpenAFS] nautilus on RHEL4

Dave Botsch botsch@cnf.cornell.edu
Wed, 19 Mar 2008 23:29:09 -0400

Hi, all.

Nautilus on rhel4 (and prolly other os'es/distros), is somewhat broke w.r.t.
openafs. Like the Mac finder, Nautilus looks at the unix mode bits to make
access decisions for files and folders. 

Nautilus also ignores the umask when creating files (but not folders) on rhel4.

So, I patched up nautilus to fix/workaround these two issues.

The srpm and rpm (i386) for rhel4 are in:

Since I didn't do actual patch files (and edit the spec file to apply them),
here's the two fixes/workarounds:

1. umask
Fnct nautilus_file_operations_new_file() in nautilus-file-operations.c , add
the following code at line 2406:
                /* Create file with correct perms */
                mask = umask (0);
                fchmod(fd, 0666&(0777-mask));

2. afs
Fnct nautilus_file_denies_access_permission() in nautilus-file.c, add the
following code at line 692:
	/* If in afs, return FALSE */
        if (strstr(file->details->directory->details->uri, "/afs") != NULL) {
                return FALSE;

David William Botsch
CNF Computing