]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-fake-admin-on-create-file-20050228
authorLove Hörnquist-Åstrand <lha@stacken.kth.se>
Mon, 28 Feb 2005 20:19:10 +0000 (20:19 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 28 Feb 2005 20:19:10 +0000 (20:19 +0000)
pass back admin in status bits for create file

(cherry picked from commit 248d5402fe893044e37b7395887c7e5b69829836)

src/viced/afsfileprocs.c

index 4ce6a699505ee1edead4d8a562d9c22ff56cdb22..fce5f67160bcef48c41a78524be37139a5a8bc2a 100644 (file)
@@ -3638,8 +3638,8 @@ SAFSS_CreateFile(struct rx_call *acall, struct AFSFid *DirFid, char *Name,
     Update_TargetVnodeStatus(targetptr, TVS_CFILE, client, InStatus,
                             parentptr, volptr, 0);
 
-    /* set up the return status for the parent dir and the newly created file */
-    GetStatus(targetptr, OutFidStatus, rights, anyrights, parentptr);
+    /* set up the return status for the parent dir and the newly created file, and since the newly created file is owned by the creator, give it PRSFS_ADMINISTER to tell the client its the owner of the file */
+    GetStatus(targetptr, OutFidStatus, rights | PRSFS_ADMINISTER, anyrights, parentptr);
     GetStatus(parentptr, OutDirStatus, rights, anyrights, 0);
 
     /* convert the write lock to a read lock before breaking callbacks */