adapt: pcn->pcn_cred is now a pointer
This commit is contained in:
parent
438f52d212
commit
1776bc7796
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: refuse.c,v 1.68 2007/06/24 22:25:49 pooka Exp $ */
|
||||
/* $NetBSD: refuse.c,v 1.69 2007/07/01 15:32:02 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright © 2007 Alistair Crooks. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: refuse.c,v 1.68 2007/06/24 22:25:49 pooka Exp $");
|
||||
__RCSID("$NetBSD: refuse.c,v 1.69 2007/07/01 15:32:02 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -567,7 +567,7 @@ puffs_fuse_node_lookup(struct puffs_cc *pcc, void *opc, void **newnode,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
|
||||
ret = fuse->op.getattr(path, &st);
|
||||
|
||||
|
@ -662,7 +662,7 @@ puffs_fuse_node_mknod(struct puffs_cc *pcc, void *opc, void **newnode,
|
|||
return ENOSYS;
|
||||
}
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
set_fuse_context_pid(pcn->pcn_pid);
|
||||
|
||||
/* wrap up return code */
|
||||
|
@ -690,7 +690,7 @@ puffs_fuse_node_mkdir(struct puffs_cc *pcc, void *opc, void **newnode,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
set_fuse_context_pid(pcn->pcn_pid);
|
||||
|
||||
if (fuse->op.mkdir == NULL) {
|
||||
|
@ -728,7 +728,7 @@ puffs_fuse_node_create(struct puffs_cc *pcc, void *opc, void **newnode,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
set_fuse_context_pid(pcn->pcn_pid);
|
||||
|
||||
created = 0;
|
||||
|
@ -776,7 +776,7 @@ puffs_fuse_node_remove(struct puffs_cc *pcc, void *opc, void *targ,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
set_fuse_context_pid(pcn->pcn_pid);
|
||||
|
||||
if (fuse->op.unlink == NULL) {
|
||||
|
@ -803,7 +803,7 @@ puffs_fuse_node_rmdir(struct puffs_cc *pcc, void *opc, void *targ,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
set_fuse_context_pid(pcn->pcn_pid);
|
||||
|
||||
if (fuse->op.rmdir == NULL) {
|
||||
|
@ -830,7 +830,7 @@ puffs_fuse_node_symlink(struct puffs_cc *pcc, void *opc, void **newnode,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn_src->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn_src->pcn_cred);
|
||||
set_fuse_context_pid(pcn_src->pcn_pid);
|
||||
|
||||
if (fuse->op.symlink == NULL) {
|
||||
|
@ -862,7 +862,7 @@ puffs_fuse_node_rename(struct puffs_cc *pcc, void *opc, void *src,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn_targ->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn_targ->pcn_cred);
|
||||
set_fuse_context_pid(pcn_targ->pcn_pid);
|
||||
|
||||
if (fuse->op.rename == NULL) {
|
||||
|
@ -890,7 +890,7 @@ puffs_fuse_node_link(struct puffs_cc *pcc, void *opc, void *targ,
|
|||
|
||||
fuse = puffs_getspecific(pu);
|
||||
|
||||
set_fuse_context_uid_gid(&pcn->pcn_cred);
|
||||
set_fuse_context_uid_gid(pcn->pcn_cred);
|
||||
set_fuse_context_pid(pcn->pcn_pid);
|
||||
|
||||
if (fuse->op.link == NULL) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dtfs_subr.c,v 1.16 2007/06/06 01:55:02 pooka Exp $ */
|
||||
/* $NetBSD: dtfs_subr.c,v 1.17 2007/07/01 15:32:02 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
|
||||
|
@ -92,7 +92,7 @@ dtfs_genfile(struct puffs_node *dir, const struct puffs_cn *pcn,
|
|||
assert(dir->pn_mnt != NULL);
|
||||
|
||||
uid = 0;
|
||||
rv = puffs_cred_getuid(&pcn->pcn_cred, &uid);
|
||||
rv = puffs_cred_getuid(pcn->pcn_cred, &uid);
|
||||
assert(rv == 0);
|
||||
|
||||
if (type == VDIR) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dtfs_vnops.c,v 1.28 2007/06/06 01:55:02 pooka Exp $ */
|
||||
/* $NetBSD: dtfs_vnops.c,v 1.29 2007/07/01 15:32:02 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
|
||||
|
@ -72,7 +72,7 @@ dtfs_node_lookup(struct puffs_cc *pcc, void *opc, void **newnode,
|
|||
pcn->pcn_nameiop == PUFFSLOOKUP_RENAME)) {
|
||||
rv = puffs_access(VDIR, pn_dir->pn_va.va_mode,
|
||||
pn_dir->pn_va.va_uid, pn_dir->pn_va.va_gid,
|
||||
PUFFS_VWRITE, &pcn->pcn_cred);
|
||||
PUFFS_VWRITE, pcn->pcn_cred);
|
||||
if (rv)
|
||||
return rv;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue