bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH hurd 2/2] libdiskfs: fix fabrication of protid


From: Justus Winter
Subject: [PATCH hurd 2/2] libdiskfs: fix fabrication of protid
Date: Sun, 23 Nov 2014 23:06:59 +0100

* libdiskfs/dir-init.c (diskfs_init_dir): Fix fabrication of protid.
---
 libdiskfs/dir-init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libdiskfs/dir-init.c b/libdiskfs/dir-init.c
index 4efded0..8301ca1 100644
--- a/libdiskfs/dir-init.c
+++ b/libdiskfs/dir-init.c
@@ -33,7 +33,8 @@ diskfs_init_dir (struct node *dp, struct node *pdp, struct 
protid *cred)
   static uid_t zero = 0;
   static struct idvec vec = {&zero, 1, 1};
   static struct iouser user = {&vec, &vec, 0};
-  struct protid lookupcred = {{0, 0, 0, 0}, &user, cred->po, 0, 0};
+  struct protid lookupcred = {{ .refcounts = { .references = {1, 0}}},
+                             &user, cred->po, 0, 0};
 
   /* New links */
   if (pdp->dn_stat.st_nlink == diskfs_link_max - 1)
-- 
2.1.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]