summaryrefslogtreecommitdiff
path: root/sys/miscfs/umapfs/umap.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-03-25 18:02:59 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-03-25 18:02:59 +0000
commit24ac52aefdf5e33867999244a44d0b7692a2a505 (patch)
tree6b04ff06610ecc22e0d074e16632988ddc9c945a /sys/miscfs/umapfs/umap.h
parent6967ae698477e809eb79f71e8ee2b9db37c9183a (diff)
Fixed bug while copying args in mount that may cause a crash.
Types changes and so.
Diffstat (limited to 'sys/miscfs/umapfs/umap.h')
-rw-r--r--sys/miscfs/umapfs/umap.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/sys/miscfs/umapfs/umap.h b/sys/miscfs/umapfs/umap.h
index 955d2096435..07ffa6b6e70 100644
--- a/sys/miscfs/umapfs/umap.h
+++ b/sys/miscfs/umapfs/umap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: umap.h,v 1.4 1996/03/02 00:08:02 niklas Exp $ */
+/* $OpenBSD: umap.h,v 1.5 1996/03/25 18:02:55 mickey Exp $ */
/* $NetBSD: umap.h,v 1.6 1996/02/09 22:41:00 christos Exp $ */
/*
@@ -40,27 +40,30 @@
* @(#)umap.h 8.3 (Berkeley) 1/21/94
*/
-#define MAPFILEENTRIES 64
+#define UMAPFILEENTRIES 64
#define GMAPFILEENTRIES 16
#define NOBODY 32767
#define NULLGROUP 65534
+typedef u_int32_t id_t;
+typedef id_t (*id_map_t)[2];
+
struct umap_args {
- char *target; /* Target of loopback */
- int nentries; /* # of entries in user map array */
- int gnentries; /* # of entries in group map array */
- u_long (*mapdata)[2]; /* pointer to array of user mappings */
- u_long (*gmapdata)[2]; /* pointer to array of group mappings */
+ char *target; /* Target of loopback */
+ int unentries; /* # of entries in user map array */
+ int gnentries; /* # of entries in group map array */
+ id_map_t umapdata; /* pointer to array of user mappings */
+ id_map_t gmapdata; /* pointer to array of group mappings */
};
struct umap_mount {
struct mount *umapm_vfs;
struct vnode *umapm_rootvp; /* Reference to root umap_node */
- int info_nentries; /* number of uid mappings */
+ int info_unentries; /* number of uid mappings */
int info_gnentries; /* number of gid mappings */
- u_long info_mapdata[MAPFILEENTRIES][2]; /* mapping data for
+ id_t info_umapdata[UMAPFILEENTRIES][2]; /* mapping data for
user mapping in ficus */
- u_long info_gmapdata[GMAPFILEENTRIES][2]; /*mapping data for
+ id_t info_gmapdata[GMAPFILEENTRIES][2]; /*mapping data for
group mapping in ficus */
};
@@ -74,9 +77,9 @@ struct umap_node {
struct vnode *umap_vnode; /* Back pointer to vnode/umap_node */
};
-extern int umap_node_create __P((struct mount *mp, struct vnode *target, struct vnode **vpp));
-extern u_long umap_reverse_findid __P((u_long id, u_long map[][2], int nentries));
-extern void umap_mapids __P((struct mount *v_mount, struct ucred *credp));
+extern int umap_node_create __P((struct mount *mp, struct vnode *target, struct vnode **vpp));
+extern id_t umap_reverse_findid __P((id_t id, id_map_t, int nentries));
+extern void umap_mapids __P((struct mount *v_mount, struct ucred *credp));
#define MOUNTTOUMAPMOUNT(mp) ((struct umap_mount *)((mp)->mnt_data))
#define VTOUMAP(vp) ((struct umap_node *)(vp)->v_data)