diff options
Diffstat (limited to 'libdiskfs/dir-init.c')
-rw-r--r-- | libdiskfs/dir-init.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libdiskfs/dir-init.c b/libdiskfs/dir-init.c index 67dc34eb..2cba3a4b 100644 --- a/libdiskfs/dir-init.c +++ b/libdiskfs/dir-init.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -28,10 +28,12 @@ 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 protid lookupcred = {{0, 0, 0, 0}, - &zero, &zero, 1, 1, - 0, 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}; /* New links */ if (pdp->dn_stat.st_nlink == diskfs_link_max - 1) |