summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/dir-init.c')
-rw-r--r--libdiskfs/dir-init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdiskfs/dir-init.c b/libdiskfs/dir-init.c
index 67dc34eb..f44c4bec 100644
--- a/libdiskfs/dir-init.c
+++ b/libdiskfs/dir-init.c
@@ -28,10 +28,13 @@ diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred)
struct dirstat *ds = alloca (diskfs_dirstat_size);
struct node *foo;
error_t err;
+
+ /* Fabricate a protid that represents root credentials. */
static uid_t zero = 0;
+ static struct idvec vec = {&zero, 1, 1};
+ static struct iouser user = {&vec, &vec, 0};
static struct protid lookupcred = {{0, 0, 0, 0},
- &zero, &zero, 1, 1,
- 0, 0};
+ &user, 0, 0, 0};
/* New links */
if (pdp->dn_stat.st_nlink == diskfs_link_max - 1)