From d38b4bd46ac028dab59496978d5c32f6fff62bfc Mon Sep 17 00:00:00 2001 From: Patrik Olsson Date: Sat, 17 Apr 2010 09:52:33 +0200 Subject: [PATCH] Change gid_t to uid_t --- boot/boot.c | 2 +- doc/hurd.texi | 6 +++--- ext2fs/inode.c | 2 +- fatfs/fatfs.h | 2 +- fatfs/inode.c | 2 +- fatfs/main.c | 6 +++--- fatfs/node-create.c | 2 +- hurd/fs.defs | 2 +- hurd/hurd_types.defs | 2 +- include/sys/procfs.h | 2 +- isofs/rr.h | 2 +- libdiskfs/dir-lookup.c | 2 +- libdiskfs/diskfs.h | 2 +- libdiskfs/file-chown.c | 10 +++++----- libdiskfs/file-exec.c | 2 +- libdiskfs/fsys-getfile.c | 2 +- libdiskfs/io-restrict-auth.c | 2 +- libdiskfs/node-create.c | 2 +- libdiskfs/trans-callback.c | 2 +- libdiskfs/validate-group.c | 2 +- libfshelp/exec-reauth.c | 2 +- libfshelp/fetch-root.c | 2 +- libfshelp/fshelp.h | 4 ++-- libiohelp/iohelp.h | 6 +++--- libiohelp/iouser-create.c | 4 ++-- libiohelp/iouser-restrict.c | 2 +- libnetfs/dir-lookup.c | 2 +- libnetfs/file-exec.c | 2 +- libnetfs/fsysstubs.c | 2 +- libnetfs/io-restrict-auth.c | 2 +- libnetfs/trans-callback.c | 2 +- libshouldbeinlibc/idvec-auth.c | 4 ++-- libshouldbeinlibc/idvec-impgids.c | 4 ++-- libshouldbeinlibc/idvec-rep.c | 2 +- libshouldbeinlibc/idvec-verify.c | 2 +- libshouldbeinlibc/ugids-posix.c | 2 +- libshouldbeinlibc/ugids.c | 2 +- libshouldbeinlibc/ugids.h | 2 +- libtreefs/node-hooks.c | 2 +- libtreefs/s-file.c | 2 +- libtreefs/s-fsys.c | 4 ++-- libtreefs/s-io.c | 2 +- libtreefs/treefs-hooks.h | 2 +- libtreefs/treefs-s-hooks.h | 8 ++++---- libtreefs/treefs.h | 2 +- libtrivfs/file-chown.c | 2 +- nfs/nfs.h | 2 +- nfs/ops.c | 2 +- nfs/rpc.c | 2 +- nfsd/cache.c | 6 +++--- pfinet/glue-include/linux/socket.h | 2 +- pfinet/linux-src/include/linux/adfs_fs_sb.h | 2 +- pfinet/linux-src/include/linux/elfcore.h | 2 +- pfinet/linux-src/include/linux/fs.h | 4 ++-- pfinet/linux-src/include/linux/hfs_fs_sb.h | 2 +- pfinet/linux-src/include/linux/hpfs_fs_sb.h | 2 +- pfinet/linux-src/include/linux/iso_fs_sb.h | 2 +- pfinet/linux-src/include/linux/msdos_fs_sb.h | 2 +- pfinet/linux-src/include/linux/nfsiod.h | 2 +- pfinet/linux-src/include/linux/proc_fs.h | 2 +- pfinet/linux-src/include/linux/sched.h | 6 +++--- pfinet/linux-src/include/linux/smb.h | 2 +- pfinet/linux-src/include/linux/types.h | 2 +- pfinet/linux-src/include/linux/umsdos_fs.h | 4 ++-- pflocal/io.c | 4 ++-- serverboot/defs.h | 2 +- sutils/clookup.c | 4 ++-- term/users.c | 6 +++--- tmpfs/tmpfs.h | 2 +- trans/bogus-fifo.c | 4 ++-- ufs-utils/stati.c | 2 +- utils/x.c | 2 +- 72 files changed, 101 insertions(+), 101 deletions(-) diff --git a/boot/boot.c b/boot/boot.c index 33e1930..4a40cff 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -1580,7 +1580,7 @@ S_io_reauthenticate (mach_port_t object, mach_port_t rend) { uid_t *gu, *au; - gid_t *gg, *ag; + uid_t *gg, *ag; size_t gulen = 0, aulen = 0, gglen = 0, aglen = 0; error_t err; diff --git a/doc/hurd.texi b/doc/hurd.texi index 098bebf..7c5960d 100644 --- a/doc/hurd.texi +++ b/doc/hurd.texi @@ -2485,7 +2485,7 @@ Initialize a transbox, which contains state information for active translators. @end deftypefun -@deftypefn {Typedef} typedef error_t (*fshelp_fetch_root_callback1_t) (@w{void *@var{cookie1}}, @w{void *@var{cookie2}}, @w{uid_t *@var{uid}}, @w{gid_t *@var{gid}}, @w{char **@var{argz}}, @w{size_t *@var{argz_len}}) +@deftypefn {Typedef} typedef error_t (*fshelp_fetch_root_callback1_t) (@w{void *@var{cookie1}}, @w{void *@var{cookie2}}, @w{uid_t *@var{uid}}, @w{uid_t *@var{gid}}, @w{char **@var{argz}}, @w{size_t *@var{argz_len}}) This routine is called by @code{fshelp_fetch_root} to fetch more information. Return the owner and group of the underlying translated file in @code{*@var{uid}} and @code{*@var{gid}}; point @@ -2590,7 +2590,7 @@ bootstrap port, and @var{argv} is the command line. If @code{_servers} to @code{argv[0]} . @end deftypefun -@deftypefun error_t fshelp_exec_reauth (@w{int @var{suid}}, @w{uid_t @var{uid}}, @w{int @var{sgid}}, @w{gid_t @var{gid}}, @w{auth_t @var{auth}}, error_t (*@var{get_file_ids}) (@w{struct idvec *@var{uids}}, @w{struct idvec *@var{gids}}), @w{mach_port_t *@var{ports}}, @w{mach_msg_type_number_t @var{num_ports}}, @w{mach_port_t *@var{fds}}, @w{mach_msg_type_number_t @var{num_fds}}, @w{int *@var{secure}}) +@deftypefun error_t fshelp_exec_reauth (@w{int @var{suid}}, @w{uid_t @var{uid}}, @w{int @var{sgid}}, @w{uid_t @var{gid}}, @w{auth_t @var{auth}}, error_t (*@var{get_file_ids}) (@w{struct idvec *@var{uids}}, @w{struct idvec *@var{gids}}), @w{mach_port_t *@var{ports}}, @w{mach_msg_type_number_t @var{num_ports}}, @w{mach_port_t *@var{fds}}, @w{mach_msg_type_number_t @var{num_fds}}, @w{int *@var{secure}}) If @var{suid} or @var{sgid} is true, adds @var{uid} and/or @var{gid} respectively to the authentication in @code{@var{ports}[INIT_PORT_AUTH]}, and replaces it with the result. @@ -4362,7 +4362,7 @@ be flushed at least every 30 seconds. @deftypefun error_t diskfs_validate_mode_change (@w{struct node *@var{np}}, @w{mode_t @var{mode}}) @deftypefunx error_t diskfs_validate_owner_change (@w{struct node *@var{np}}, @w{uid_t @var{uid}}) -@deftypefunx error_t diskfs_validate_group_change (@w{struct node *@var{np}}, @w{gid_t @var{gid}}) +@deftypefunx error_t diskfs_validate_group_change (@w{struct node *@var{np}}, @w{uid_t @var{gid}}) @deftypefunx error_t diskfs_validate_author_change (@w{struct node *@var{np}}, @w{uid_t @var{author}}) @deftypefunx error_t diskfs_validate_flags_change (@w{struct node *@var{np}}, @w{int @var{flags}}) @deftypefunx error_t diskfs_validate_rdev_change (@w{struct node *@var{np}}, @w{dev_t @var{rdev}}) diff --git a/ext2fs/inode.c b/ext2fs/inode.c index f25cc1f..620fa0b 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -363,7 +363,7 @@ diskfs_validate_owner_change (struct node *np, uid_t uid) /* Return 0 if NP's group can be changed to GID; otherwise return an error code. */ error_t -diskfs_validate_group_change (struct node *np, gid_t gid) +diskfs_validate_group_change (struct node *np, uid_t gid) { return check_high_bits (np, gid); } diff --git a/fatfs/fatfs.h b/fatfs/fatfs.h index 16b058a..b481f51 100644 --- a/fatfs/fatfs.h +++ b/fatfs/fatfs.h @@ -87,7 +87,7 @@ extern struct store *store; /* The UID and GID for all files in the filesystem. */ extern uid_t fs_uid; -extern gid_t fs_gid; +extern uid_t fs_gid; /* Mapped image of the FAT. */ extern void *fat_image; diff --git a/fatfs/inode.c b/fatfs/inode.c index 2a42793..d349dfd 100644 --- a/fatfs/inode.c +++ b/fatfs/inode.c @@ -412,7 +412,7 @@ diskfs_validate_owner_change (struct node *np, uid_t uid) /* Return 0 if NP's group can be changed to GID; otherwise return an error code. */ error_t -diskfs_validate_group_change (struct node *np, gid_t gid) +diskfs_validate_group_change (struct node *np, uid_t gid) { /* Allow configurable gid. */ if (gid != 0) diff --git a/fatfs/main.c b/fatfs/main.c index b85d7fe..20b81a5 100644 --- a/fatfs/main.c +++ b/fatfs/main.c @@ -52,9 +52,9 @@ struct dirrect dr_root_node; /* The UID and GID for all files in the filesystem. */ uid_t default_fs_uid; -gid_t default_fs_gid; +uid_t default_fs_gid; uid_t fs_uid; -gid_t fs_gid; +uid_t fs_gid; /* fatfs specific options. */ static const struct argp_option options[] = @@ -273,7 +273,7 @@ error_t diskfs_S_fsys_getfile (mach_port_t fsys, mach_port_t reply, mach_msg_type_name_t reply_type, uid_t *uids, mach_msg_type_number_t nuids, - gid_t *gids, mach_msg_type_number_t ngids, + uid_t *gids, mach_msg_type_number_t ngids, char *handle, mach_msg_type_number_t handle_len, mach_port_t *file, mach_msg_type_name_t *file_type) { diff --git a/fatfs/node-create.c b/fatfs/node-create.c index d85508b..027755a 100644 --- a/fatfs/node-create.c +++ b/fatfs/node-create.c @@ -51,7 +51,7 @@ diskfs_create_node (struct node *dir, struct node *np; error_t err; uid_t newuid; - gid_t newgid; + uid_t newgid; if (diskfs_check_readonly ()) { diff --git a/hurd/fs.defs b/hurd/fs.defs index 52d83bd..1410b1b 100644 --- a/hurd/fs.defs +++ b/hurd/fs.defs @@ -54,7 +54,7 @@ routine file_chown ( chown_file: file_t; RPT new_owner: uid_t; - new_group: gid_t); + new_group: uid_t); /* Whan that Aprill with hith thoureth thoote diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs index 5ad5e93..cdfa4ad 100644 --- a/hurd/hurd_types.defs +++ b/hurd/hurd_types.defs @@ -206,7 +206,7 @@ type data_t = array[] of char; type string_t = c_string[1024]; /* XXX */ type io_statbuf_t = struct[32] of int; type uid_t = unsigned32; -type gid_t = unsigned32; +type uid_t = unsigned32; type mode_t = unsigned32; type retry_type = unsigned32; type pid_t = int32; diff --git a/include/sys/procfs.h b/include/sys/procfs.h index ec82308..0629f18 100644 --- a/include/sys/procfs.h +++ b/include/sys/procfs.h @@ -50,7 +50,7 @@ struct elf_psinfo pid_t pr_pgid; /* Process group ID. */ pid_t pr_sid; /* Session ID. */ uid_t pr_uid, pr_euid; /* Real and effective UID (first one). */ - gid_t pr_gid, pr_egid; /* Real and effective GID (first one). */ + uid_t pr_gid, pr_egid; /* Real and effective GID (first one). */ size_t pr_size; /* Virtual memory size of process (KB). */ size_t pr_rssize; /* Resident set size of process (KB). */ uint16_t pr_pctcpu; /* % of CPU used by all threads. */ diff --git a/isofs/rr.h b/isofs/rr.h index ab80e4b..5975bb4 100644 --- a/isofs/rr.h +++ b/isofs/rr.h @@ -27,7 +27,7 @@ struct rrip_lookup mode_t mode; nlink_t nlink; uid_t uid; - gid_t gid; + uid_t gid; /* PN */ dev_t rdev; diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 7e09290..9a83cb1 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -216,7 +216,7 @@ diskfs_S_dir_lookup (struct protid *dircred, /* A callback function for short-circuited translators. Symlink & ifsock are handled elsewhere. */ error_t short_circuited_callback1 (void *cookie1, void *cookie2, - uid_t *uid, gid_t *gid, + uid_t *uid, uid_t *gid, char **argz, size_t *argz_len) { struct node *node = cookie1; diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 9a61964..54ed943 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -471,7 +471,7 @@ error_t diskfs_validate_owner_change (struct node *np, uid_t uid); /* The user may define this function. Return 0 if NP's group can be changed to GID; otherwise return an error code. */ -error_t diskfs_validate_group_change (struct node *np, gid_t gid); +error_t diskfs_validate_group_change (struct node *np, uid_t gid); /* The user may define this function. Return 0 if NP's author can be changed to AUTHOR; otherwise return an error code. */ diff --git a/libdiskfs/file-chown.c b/libdiskfs/file-chown.c index ecb851f..d210351 100644 --- a/libdiskfs/file-chown.c +++ b/libdiskfs/file-chown.c @@ -22,9 +22,9 @@ kern_return_t diskfs_S_file_chown (struct protid *cred, uid_t uid, - gid_t gid) + uid_t gid) { - if (uid == (uid_t) -1 && gid == (gid_t) -1) /* No change requested. */ + if (uid == (uid_t) -1 && gid == (uid_t) -1) /* No change requested. */ return 0; CHANGE_NODE_FIELD (cred, @@ -33,7 +33,7 @@ diskfs_S_file_chown (struct protid *cred, if (err || (((uid != (uid_t) -1 && !idvec_contains (cred->user->uids, uid)) - || (gid != (gid_t) -1 + || (gid != (uid_t) -1 && !idvec_contains (cred->user->gids, gid))) && !idvec_contains (cred->user->uids, 0))) err = EPERM; @@ -41,7 +41,7 @@ diskfs_S_file_chown (struct protid *cred, { if (uid != (uid_t) -1) err = diskfs_validate_owner_change (np, uid); - if (!err && gid != (gid_t) -1) + if (!err && gid != (uid_t) -1) err = diskfs_validate_group_change (np, gid); if (!err) { @@ -51,7 +51,7 @@ diskfs_S_file_chown (struct protid *cred, if (np->author_tracks_uid) np->dn_stat.st_author = uid; } - if (gid != (gid_t) -1) + if (gid != (uid_t) -1) np->dn_stat.st_gid = gid; np->dn_set_ctime = 1; if (np->filemod_reqs) diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c index 452240c..b0b7cf3 100644 --- a/libdiskfs/file-exec.c +++ b/libdiskfs/file-exec.c @@ -49,7 +49,7 @@ diskfs_S_file_exec (struct protid *cred, { struct node *np; uid_t uid; - gid_t gid; + uid_t gid; mode_t mode; int suid, sgid; struct protid *newpi; diff --git a/libdiskfs/fsys-getfile.c b/libdiskfs/fsys-getfile.c index 2fe9495..e88c3db 100644 --- a/libdiskfs/fsys-getfile.c +++ b/libdiskfs/fsys-getfile.c @@ -30,7 +30,7 @@ error_t diskfs_S_fsys_getfile (mach_port_t fsys, mach_port_t reply, mach_msg_type_name_t reply_type, uid_t *uids, mach_msg_type_number_t nuids, - gid_t *gids, mach_msg_type_number_t ngids, + uid_t *gids, mach_msg_type_number_t ngids, char *handle, mach_msg_type_number_t handle_len, mach_port_t *file, mach_msg_type_name_t *file_type) { diff --git a/libdiskfs/io-restrict-auth.c b/libdiskfs/io-restrict-auth.c index c1560ac..0d8a272 100644 --- a/libdiskfs/io-restrict-auth.c +++ b/libdiskfs/io-restrict-auth.c @@ -26,7 +26,7 @@ diskfs_S_io_restrict_auth (struct protid *cred, mach_msg_type_name_t *newportpoly, uid_t *uids, size_t nuids, - gid_t *gids, + uid_t *gids, size_t ngids) { error_t err; diff --git a/libdiskfs/node-create.c b/libdiskfs/node-create.c index 4a7d108..7208489 100644 --- a/libdiskfs/node-create.c +++ b/libdiskfs/node-create.c @@ -40,7 +40,7 @@ diskfs_create_node (struct node *dir, struct node *np; error_t err; uid_t newuid; - gid_t newgid; + uid_t newgid; if (diskfs_check_readonly ()) { diff --git a/libdiskfs/trans-callback.c b/libdiskfs/trans-callback.c index 283b184..791af50 100644 --- a/libdiskfs/trans-callback.c +++ b/libdiskfs/trans-callback.c @@ -25,7 +25,7 @@ for the interface description. */ static error_t _diskfs_translator_callback1_fn (void *cookie1, void *cookie2, - uid_t *uid, gid_t *gid, + uid_t *uid, uid_t *gid, char **argz, size_t *argz_len) { error_t err; diff --git a/libdiskfs/validate-group.c b/libdiskfs/validate-group.c index 556c5aa..ca2c5f4 100644 --- a/libdiskfs/validate-group.c +++ b/libdiskfs/validate-group.c @@ -21,7 +21,7 @@ #include "priv.h" error_t -diskfs_validate_group_change (struct node *np, gid_t group) +diskfs_validate_group_change (struct node *np, uid_t group) { return 0; } diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c index d9a8297..8a9c4ea 100644 --- a/libfshelp/exec-reauth.c +++ b/libfshelp/exec-reauth.c @@ -40,7 +40,7 @@ exec_reauth (auth_t auth, int secure, int must_reauth, non-NULL, whether not the added ids are new is returned in it. If either the uid or gid case fails, then the other may still be applied. */ error_t -fshelp_exec_reauth (int suid, uid_t uid, int sgid, gid_t gid, +fshelp_exec_reauth (int suid, uid_t uid, int sgid, uid_t gid, auth_t auth, error_t (*get_file_ids)(struct idvec *uids, struct idvec *gids), diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c index 54d3c0c..bf91005 100644 --- a/libfshelp/fetch-root.c +++ b/libfshelp/fetch-root.c @@ -113,7 +113,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie, else { uid_t uidarray[2] = { uid, uid }; - gid_t gidarray[2] = { gid, gid }; + uid_t gidarray[2] = { gid, gid }; err = auth_makeauth (ourauth, 0, MACH_MSG_TYPE_COPY_SEND, 0, uidarray, 1, uidarray, 2, gidarray, 1, gidarray, 2, &newauth); diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h index 5c43c54..43cde14 100644 --- a/libfshelp/fshelp.h +++ b/libfshelp/fshelp.h @@ -105,7 +105,7 @@ struct transbox then return ENOENT. COOKIE1 is the cookie passed in fshelp_transbox_init. COOKIE2 is the cookie passed in the call to fshelp_fetch_root. */ typedef error_t (*fshelp_fetch_root_callback1_t) (void *cookie1, void *cookie2, - uid_t *uid, gid_t *gid, + uid_t *uid, uid_t *gid, char **argz, size_t *argz_len); /* This routine is called by fshelp_fetch_root to fetch more information. @@ -216,7 +216,7 @@ struct idvec; /* Include to get the real thing. */ non-NULL, whether not the added ids are new is returned in it. If either the uid or gid case fails, then the other may still be applied. */ error_t -fshelp_exec_reauth (int suid, uid_t uid, int sgid, gid_t gid, +fshelp_exec_reauth (int suid, uid_t uid, int sgid, uid_t gid, auth_t auth, error_t (*get_file_ids)(struct idvec *uids, struct idvec *gids), diff --git a/libiohelp/iohelp.h b/libiohelp/iohelp.h index a52d598..6d12bfe 100644 --- a/libiohelp/iohelp.h +++ b/libiohelp/iohelp.h @@ -90,12 +90,12 @@ error_t iohelp_create_iouser (struct iouser **user, struct idvec *uids, is set to NULL. */ error_t iohelp_create_complex_iouser (struct iouser **user, const uid_t *uids, int nuids, - const gid_t *gids, int ngids); + const uid_t *gids, int ngids); /* Create a new IOUSER in USER for the specified uid and gid. On error, *USER is set to NULL. */ error_t iohelp_create_simple_iouser (struct iouser **user, - uid_t uid, gid_t gid); + uid_t uid, uid_t gid); /* Create a new IOUSER in USER with no identity. On error, *USER is set to NULL. */ @@ -107,7 +107,7 @@ error_t iohelp_create_empty_iouser (struct iouser **user); error_t iohelp_restrict_iouser (struct iouser **new_user, const struct iouser *old_user, const uid_t *uids, int nuids, - const gid_t *gids, int ngids); + const uid_t *gids, int ngids); /* Conduct a reauthentication transaction, returning a new iouser in USER. AUTHSERVER is the I/O servers auth port. The rendezvous port diff --git a/libiohelp/iouser-create.c b/libiohelp/iouser-create.c index f1dd2f0..c96d67a 100644 --- a/libiohelp/iouser-create.c +++ b/libiohelp/iouser-create.c @@ -67,7 +67,7 @@ iohelp_create_empty_iouser (struct iouser **user) } error_t -iohelp_create_simple_iouser (struct iouser **user, uid_t uid, gid_t gid) +iohelp_create_simple_iouser (struct iouser **user, uid_t uid, uid_t gid) { struct idvec *uids, *gids; @@ -90,7 +90,7 @@ iohelp_create_simple_iouser (struct iouser **user, uid_t uid, gid_t gid) error_t iohelp_create_complex_iouser (struct iouser **user, const uid_t *uvec, int nuids, - const gid_t *gvec, int ngids) + const uid_t *gvec, int ngids) { struct idvec *uids, *gids; diff --git a/libiohelp/iouser-restrict.c b/libiohelp/iouser-restrict.c index 853820e..a206de8 100644 --- a/libiohelp/iouser-restrict.c +++ b/libiohelp/iouser-restrict.c @@ -32,7 +32,7 @@ error_t iohelp_restrict_iouser (struct iouser **new_user, const struct iouser *old_user, const uid_t *uids, int nuids, - const gid_t *gids, int ngids) + const uid_t *gids, int ngids) { if (idvec_contains (old_user->uids, 0)) /* OLD_USER has root access, and so may use any ids. */ diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c index 17d9e23..45faac9 100644 --- a/libnetfs/dir-lookup.c +++ b/libnetfs/dir-lookup.c @@ -195,7 +195,7 @@ netfs_S_dir_lookup (struct protid *diruser, /* A callback function for short-circuited translators. S_ISLNK and S_IFSOCK are handled elsewhere. */ error_t short_circuited_callback1 (void *cookie1, void *cookie2, - uid_t *uid, gid_t *gid, + uid_t *uid, uid_t *gid, char **argz, size_t *argz_len) { struct node *np = cookie1; diff --git a/libnetfs/file-exec.c b/libnetfs/file-exec.c index 73c125b..c53ef47 100644 --- a/libnetfs/file-exec.c +++ b/libnetfs/file-exec.c @@ -52,7 +52,7 @@ netfs_S_file_exec (struct protid *cred, struct node *np; error_t err; uid_t uid; - gid_t gid; + uid_t gid; mode_t mode; int suid, sgid; mach_port_t right; diff --git a/libnetfs/fsysstubs.c b/libnetfs/fsysstubs.c index f44155d..1c1a91e 100644 --- a/libnetfs/fsysstubs.c +++ b/libnetfs/fsysstubs.c @@ -27,7 +27,7 @@ netfs_S_fsys_getfile (fsys_t cntl, mach_port_t reply, mach_msg_type_name_t reply_type, uid_t *uids, mach_msg_type_number_t nuids, - gid_t *gids, mach_msg_type_number_t ngids, + uid_t *gids, mach_msg_type_number_t ngids, char *handle, mach_msg_type_number_t handlelen, mach_port_t *file, mach_msg_type_name_t *filetype) { diff --git a/libnetfs/io-restrict-auth.c b/libnetfs/io-restrict-auth.c index bddc8fe..cc32fb9 100644 --- a/libnetfs/io-restrict-auth.c +++ b/libnetfs/io-restrict-auth.c @@ -27,7 +27,7 @@ netfs_S_io_restrict_auth (struct protid *user, mach_msg_type_name_t *newporttype, uid_t *uids, mach_msg_type_number_t nuids, - gid_t *gids, + uid_t *gids, mach_msg_type_number_t ngids) { error_t err; diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c index 4dec162..cb9933b 100644 --- a/libnetfs/trans-callback.c +++ b/libnetfs/trans-callback.c @@ -25,7 +25,7 @@ for the interface description. */ static error_t _netfs_translator_callback1_fn (void *cookie1, void *cookie2, - uid_t *uid, gid_t *gid, + uid_t *uid, uid_t *gid, char **argz, size_t *argz_len) { error_t err; diff --git a/libshouldbeinlibc/idvec-auth.c b/libshouldbeinlibc/idvec-auth.c index bb7f4af..6425f1a 100644 --- a/libshouldbeinlibc/idvec-auth.c +++ b/libshouldbeinlibc/idvec-auth.c @@ -76,9 +76,9 @@ idvec_merge_auth (struct idvec *eff_uids, struct idvec *avail_uids, if (_avail_uids != avail_uid_buf) munmap ((caddr_t) _avail_uids, num_avail_uids * sizeof (uid_t)); if (_eff_gids != eff_gid_buf) - munmap ((caddr_t) _eff_gids, num_eff_gids * sizeof (gid_t)); + munmap ((caddr_t) _eff_gids, num_eff_gids * sizeof (uid_t)); if (_avail_gids != avail_gid_buf) - munmap ((caddr_t) _avail_gids, num_avail_gids * sizeof (gid_t)); + munmap ((caddr_t) _avail_gids, num_avail_gids * sizeof (uid_t)); return err; } diff --git a/libshouldbeinlibc/idvec-impgids.c b/libshouldbeinlibc/idvec-impgids.c index 66f82e2..3b058cb 100644 --- a/libshouldbeinlibc/idvec-impgids.c +++ b/libshouldbeinlibc/idvec-impgids.c @@ -57,13 +57,13 @@ _merge_implied_gids (struct idvec *implied_gids, uid_t uid) { struct idvec *cache = make_idvec (); #ifdef HAVE_GETGROUPLIST - gid_t _gids[NUM_STATIC_GIDS], *gids = _gids; + uid_t _gids[NUM_STATIC_GIDS], *gids = _gids; int maxgids = NUM_STATIC_GIDS; int ngids = getgrouplist (pw->pw_name, pw->pw_gid, gids, &maxgids); if (ngids == -1) { - gids = malloc (maxgids * sizeof (gid_t)); + gids = malloc (maxgids * sizeof (uid_t)); if (! gids) err = ENOMEM; else diff --git a/libshouldbeinlibc/idvec-rep.c b/libshouldbeinlibc/idvec-rep.c index b20e58c..1dd38f6 100644 --- a/libshouldbeinlibc/idvec-rep.c +++ b/libshouldbeinlibc/idvec-rep.c @@ -137,7 +137,7 @@ lookup_uid (uid_t uid) /* Return a malloced string with the name of the group GID. */ static char * -lookup_gid (gid_t gid) +lookup_gid (uid_t gid) { char buf[1024]; struct group _gr, *gr; diff --git a/libshouldbeinlibc/idvec-verify.c b/libshouldbeinlibc/idvec-verify.c index 981f86a..327cc93 100644 --- a/libshouldbeinlibc/idvec-verify.c +++ b/libshouldbeinlibc/idvec-verify.c @@ -221,7 +221,7 @@ idvec_verify (const struct idvec *uids, const struct idvec *gids, /* Check gids */ for (i = 0; i < gids->num && !err; i++) { - gid_t gid = gids->ids[i]; + uid_t gid = gids->ids[i]; if ((!have_gids || !idvec_contains (have_gids, gid)) && !idvec_contains (&implied_gids, gid)) err = verify_id (gid, 1, multiple, diff --git a/libshouldbeinlibc/ugids-posix.c b/libshouldbeinlibc/ugids-posix.c index 35d73e3..acc4af7 100644 --- a/libshouldbeinlibc/ugids-posix.c +++ b/libshouldbeinlibc/ugids-posix.c @@ -56,7 +56,7 @@ ugids_set_posix_user (struct ugids *ugids, uid_t uid) /* Now do the gids. */ { /* The main gid associated with UID (usually from /etc/passwd). */ - gid_t gid = imp_gids.ids[0]; + uid_t gid = imp_gids.ids[0]; /* True if GID was already an available gid. */ int gid_was_avail = idvec_contains (&ugids->avail_gids, gid); diff --git a/libshouldbeinlibc/ugids.c b/libshouldbeinlibc/ugids.c index 057dcf8..85d6bdd 100644 --- a/libshouldbeinlibc/ugids.c +++ b/libshouldbeinlibc/ugids.c @@ -44,7 +44,7 @@ ugids_add_uid (struct ugids *ugids, uid_t uid, int avail) /* Add a new gid to UGIDS. If AVAIL is true, it's added to the avail gids instead of the effective ones. */ error_t -ugids_add_gid (struct ugids *ugids, gid_t gid, int avail) +ugids_add_gid (struct ugids *ugids, uid_t gid, int avail) { error_t err = idvec_add_new (avail ? &ugids->avail_gids : &ugids->eff_gids, gid); diff --git a/libshouldbeinlibc/ugids.h b/libshouldbeinlibc/ugids.h index 8440b60..0624490 100644 --- a/libshouldbeinlibc/ugids.h +++ b/libshouldbeinlibc/ugids.h @@ -173,7 +173,7 @@ error_t ugids_add_uid (struct ugids *ugids, uid_t uid, int avail); /* Add a new gid to UGIDS. If AVAIL is true, it's added to the avail gids instead of the effective ones. */ -error_t ugids_add_gid (struct ugids *ugids, gid_t gid, int avail); +error_t ugids_add_gid (struct ugids *ugids, uid_t gid, int avail); /* Add UID to UGIDS, plus any gids to which that user belongs. If AVAIL is true, the are added to the avail gids instead of the effective ones. */ diff --git a/libtreefs/node-hooks.c b/libtreefs/node-hooks.c index faffcd6..cea277e 100644 --- a/libtreefs/node-hooks.c +++ b/libtreefs/node-hooks.c @@ -59,7 +59,7 @@ _treefs_node_mod_link_count (struct treefs_node *node, int change) /* Returns the user and group that a newly started translator should be authenticated as. The default just returns the owner/group of NODE. */ error_t -_treefs_node_get_trans_auth (struct treefs_node *node, uid_t *uid, gid_t *gid) +_treefs_node_get_trans_auth (struct treefs_node *node, uid_t *uid, uid_t *gid) { *uid = node->stat.st_uid; *gid = node->stat.st_gid; diff --git a/libtreefs/s-file.c b/libtreefs/s-file.c index 73c32d7..574af39 100644 --- a/libtreefs/s-file.c +++ b/libtreefs/s-file.c @@ -67,7 +67,7 @@ treefs_S_file_chmod (struct treefs_protid *cred, mode_t mode) } error_t -treefs_S_file_chown (struct treefs_protid *cred, uid_t uid, gid_t gid) +treefs_S_file_chown (struct treefs_protid *cred, uid_t uid, uid_t gid) { if (!cred) return EOPNOTSUPP; diff --git a/libtreefs/s-fsys.c b/libtreefs/s-fsys.c index c2b1835..e8bd892 100644 --- a/libtreefs/s-fsys.c +++ b/libtreefs/s-fsys.c @@ -37,7 +37,7 @@ error_t treefs_S_fsys_getroot (fsys_t fsys_port, mach_port_t dotdot, uid_t *uids, unsigned nuids, - gid_t *gids, unsigned ngids, + uid_t *gids, unsigned ngids, int flags, retry_type *retry, char *retry_name, file_t *result, mach_msg_type_name_t *result_type) { @@ -61,7 +61,7 @@ treefs_S_fsys_goaway (fsys_t fsys_port, int flags) error_t treefs_S_fsys_getfile (mach_port_t fsys_port, uid_t *gen_uids, unsigned ngen_uids, - gid_t *gen_gids, unsigned ngen_gids, + uid_t *gen_gids, unsigned ngen_gids, char *handle, unsigned handle_len, mach_port_t *file, mach_msg_type_name_t *file_type) { diff --git a/libtreefs/s-io.c b/libtreefs/s-io.c index 6fdc504..a4775c5 100644 --- a/libtreefs/s-io.c +++ b/libtreefs/s-io.c @@ -189,7 +189,7 @@ treefs_S_io_restrict_auth (struct treefs_protid *cred, mach_port_t *newport, mach_msg_type_name_t *newport_type, uid_t *uids, unsigned nuids, - gid_t *gids, unsigned ngids) + uid_t *gids, unsigned ngids) { if (!cred) return EOPNOTSUPP; diff --git a/libtreefs/treefs-hooks.h b/libtreefs/treefs-hooks.h index 3af4a54..ff2c47e 100644 --- a/libtreefs/treefs-hooks.h +++ b/libtreefs/treefs-hooks.h @@ -283,7 +283,7 @@ DNH(node_get_passive_trans, error_t, char *buf, int *len) /* Returns the user and group that a newly started translator should be authenticated as. The default just returns the owner/group of NODE. */ -DNH(node_get_trans_auth, error_t, uid_t *uid, gid_t *gid) +DNH(node_get_trans_auth, error_t, uid_t *uid, uid_t *gid) #define treefs_node_get_trans_auth(node, args...) \ _TREEFS_CNH(node, NODE_GET_TRANS_AUTH, node_get_trans_auth , ##args) diff --git a/libtreefs/treefs-s-hooks.h b/libtreefs/treefs-s-hooks.h index 2ea9e7a..82d81f1 100644 --- a/libtreefs/treefs-s-hooks.h +++ b/libtreefs/treefs-s-hooks.h @@ -41,7 +41,7 @@ DHH(s_file_exec, error_t, mach_port_t *, unsigned, mach_port_t *, unsigned) #define treefs_s_file_exec(h, args...) \ _TREEFS_CHH(h, S_FILE_EXEC, s_file_exec , ##args) -DHH(s_file_chown, error_t, uid_t, gid_t) +DHH(s_file_chown, error_t, uid_t, uid_t) #define treefs_s_file_chown(h, args...) \ _TREEFS_CHH(h, S_FILE_CHOWN, s_file_chown , ##args) DHH(s_file_chauthor, error_t, uid_t) @@ -124,7 +124,7 @@ DHH(s_io_reauthenticate, error_t, mach_port_t *, mach_msg_type_name_t *) #define treefs_s_io_reauthenticate(h, args...) \ _TREEFS_CHH(h, S_IO_REAUTHENTICATE, s_io_reauthenticate , ##args) DHH(s_io_restrict_auth, error_t, - mach_port_t *, mach_msg_type_name_t *, uid_t *, int, gid_t *, int); + mach_port_t *, mach_msg_type_name_t *, uid_t *, int, uid_t *, int); #define treefs_s_io_restrict_auth(h, args...) \ _TREEFS_CHH(h, S_IO_RESTRICT_AUTH, s_io_restrict_auth , ##args) DHH(s_io_duplicate, error_t, mach_port_t *, mach_msg_type_name_t *) @@ -198,7 +198,7 @@ DHH(s_dir_notice_changes, error_t, mach_port_t *, mach_msg_type_name_t *); /* fsys RPCs (called on the filesystem itself) */ DFH(s_fsys_getroot, error_t, - mach_port_t, uid_t *, unsigned, gid_t *, unsigned, int, + mach_port_t, uid_t *, unsigned, uid_t *, unsigned, int, retry_type *, char *, file_t *, mach_msg_type_name_t *) #define treefs_s_fsys_getroot(fsys, args...) \ _TREEFS_CFH(fsys, S_FSYS_GETROOT, s_fsys_getroot , ##args) @@ -209,7 +209,7 @@ DFH(s_fsys_goaway, error_t, int) #define treefs_s_fsys_goaway(fsys, args...) \ _TREEFS_CFH(fsys, S_FSYS_GOAWAY, s_fsys_goaway , ##args) DFH(s_fsys_getfile, error_t, - uid_t *, unsigned, gid_t *, unsigned, char *, unsigned, + uid_t *, unsigned, uid_t *, unsigned, char *, unsigned, mach_port_t *, mach_msg_type_name_t *) #define treefs_s_fsys_getfile(fsys, args...) \ _TREEFS_CFH(fsys, S_FSYS_GETFILE, s_fsys_getfile , ##args) diff --git a/libtreefs/treefs.h b/libtreefs/treefs.h index 0ad528d..9fd319b 100644 --- a/libtreefs/treefs.h +++ b/libtreefs/treefs.h @@ -421,7 +421,7 @@ treefs_auth_has_uid (struct treefs_auth *auth, uid_t uid) /* Return nonzero iff the user identified by AUTH has group GID. */ extern inline int -treefs_auth_in_group (struct treefs_auth *auth, gid_t gid) +treefs_auth_in_group (struct treefs_auth *auth, uid_t gid) { int i; for (i = 0; i < auth->ngids; i++) diff --git a/libtrivfs/file-chown.c b/libtrivfs/file-chown.c index 44f7920..4a9bff7 100644 --- a/libtrivfs/file-chown.c +++ b/libtrivfs/file-chown.c @@ -20,7 +20,7 @@ kern_return_t trivfs_S_file_chown (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, - uid_t uid, gid_t gid) + uid_t uid, uid_t gid) { return cred ? file_chown (cred->realnode, uid, gid) : EOPNOTSUPP; } diff --git a/nfs/nfs.h b/nfs/nfs.h index 147dc90..173b6a9 100644 --- a/nfs/nfs.h +++ b/nfs/nfs.h @@ -185,7 +185,7 @@ extern uint16_t mounted_nfs_port; /* host order */ int *register_fresh_stat (struct node *, int *); /* rpc.c */ -int *initialize_rpc (int, int, int, size_t, void **, uid_t, gid_t, gid_t); +int *initialize_rpc (int, int, int, size_t, void **, uid_t, uid_t, uid_t); error_t conduct_rpc (void **, int **); void timeout_service_thread (void); void rpc_receive_thread (void); diff --git a/nfs/ops.c b/nfs/ops.c index 96190d2..c3ff82f 100644 --- a/nfs/ops.c +++ b/nfs/ops.c @@ -170,7 +170,7 @@ netfs_validate_stat (struct node *np, struct iouser *cred) . */ error_t netfs_attempt_chown (struct iouser *cred, struct node *np, - uid_t uid, gid_t gid) + uid_t uid, uid_t gid) { int *p; void *rpcbuf; diff --git a/nfs/rpc.c b/nfs/rpc.c index f5e1906..9f8d98d 100644 --- a/nfs/rpc.c +++ b/nfs/rpc.c @@ -80,7 +80,7 @@ generate_xid () int * initialize_rpc (int program, int version, int rpc_proc, size_t len, void **bufp, - uid_t uid, gid_t gid, gid_t second_gid) + uid_t uid, uid_t gid, uid_t second_gid) { void *buf; int *p, *lenaddr; diff --git a/nfsd/cache.c b/nfsd/cache.c index 7b96dbc..7b27305 100644 --- a/nfsd/cache.c +++ b/nfsd/cache.c @@ -60,7 +60,7 @@ idspec_compare (struct idspec *i, int nuids, int ngids, assert (sizeof (int) == sizeof (uid_t)); if (bcmp (i->uids, uids, nuids * sizeof (uid_t)) - || bcmp (i->gids, gids, ngids * sizeof (gid_t))) + || bcmp (i->gids, gids, ngids * sizeof (uid_t))) return 0; return 1; @@ -106,9 +106,9 @@ idspec_lookup (int nuids, int ngids, int *uids, int *gids) i->nuids = nuids; i->ngids = ngids; i->uids = malloc (nuids * sizeof (uid_t)); - i->gids = malloc (ngids * sizeof (gid_t)); + i->gids = malloc (ngids * sizeof (uid_t)); memcpy (i->uids, uids, nuids * sizeof (uid_t)); - memcpy (i->gids, gids, ngids * sizeof (gid_t)); + memcpy (i->gids, gids, ngids * sizeof (uid_t)); i->references = 1; i->next = idhashtable[hash]; diff --git a/pfinet/glue-include/linux/socket.h b/pfinet/glue-include/linux/socket.h index 820ed00..1328246 100644 --- a/pfinet/glue-include/linux/socket.h +++ b/pfinet/glue-include/linux/socket.h @@ -97,7 +97,7 @@ put_cmsg(struct msghdr *msg, int level, int type, int len, void *data) struct ucred { pid_t pid; uid_t uid; - gid_t gid; + uid_t gid; }; diff --git a/pfinet/linux-src/include/linux/adfs_fs_sb.h b/pfinet/linux-src/include/linux/adfs_fs_sb.h index 649b61e..446584c 100644 --- a/pfinet/linux-src/include/linux/adfs_fs_sb.h +++ b/pfinet/linux-src/include/linux/adfs_fs_sb.h @@ -16,7 +16,7 @@ struct adfs_sb_info { struct buffer_head *s_sbh; /* buffer head containing disc record */ struct adfs_discrecord *s_dr; /* pointer to disc record in s_sbh */ uid_t s_uid; /* owner uid */ - gid_t s_gid; /* owner gid */ + uid_t s_gid; /* owner gid */ int s_owner_mask; /* ADFS Owner perm -> unix perm */ int s_other_mask; /* ADFS Other perm -> unix perm */ __u16 s_zone_size; /* size of a map zone in bits */ diff --git a/pfinet/linux-src/include/linux/elfcore.h b/pfinet/linux-src/include/linux/elfcore.h index 5c1cb05..84009e0 100644 --- a/pfinet/linux-src/include/linux/elfcore.h +++ b/pfinet/linux-src/include/linux/elfcore.h @@ -72,7 +72,7 @@ struct elf_prpsinfo char pr_nice; /* nice val */ unsigned long pr_flag; /* flags */ uid_t pr_uid; - gid_t pr_gid; + uid_t pr_gid; pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; /* Lots missing */ char pr_fname[16]; /* filename of executable */ diff --git a/pfinet/linux-src/include/linux/fs.h b/pfinet/linux-src/include/linux/fs.h index 548b9d7..c499595 100644 --- a/pfinet/linux-src/include/linux/fs.h +++ b/pfinet/linux-src/include/linux/fs.h @@ -305,7 +305,7 @@ struct iattr { unsigned int ia_valid; umode_t ia_mode; uid_t ia_uid; - gid_t ia_gid; + uid_t ia_gid; off_t ia_size; time_t ia_atime; time_t ia_mtime; @@ -339,7 +339,7 @@ struct inode { umode_t i_mode; nlink_t i_nlink; uid_t i_uid; - gid_t i_gid; + uid_t i_gid; kdev_t i_rdev; off_t i_size; time_t i_atime; diff --git a/pfinet/linux-src/include/linux/hfs_fs_sb.h b/pfinet/linux-src/include/linux/hfs_fs_sb.h index 826f388..1429edf 100644 --- a/pfinet/linux-src/include/linux/hfs_fs_sb.h +++ b/pfinet/linux-src/include/linux/hfs_fs_sb.h @@ -46,7 +46,7 @@ struct hfs_sb_info { umode_t s_umask; /* The umask applied to the permissions on all files */ uid_t s_uid; /* The uid of all files */ - gid_t s_gid; /* The gid of all files */ + uid_t s_gid; /* The gid of all files */ char s_conv; /* Type of text conversion */ }; diff --git a/pfinet/linux-src/include/linux/hpfs_fs_sb.h b/pfinet/linux-src/include/linux/hpfs_fs_sb.h index a383e16..dd0f991 100644 --- a/pfinet/linux-src/include/linux/hpfs_fs_sb.h +++ b/pfinet/linux-src/include/linux/hpfs_fs_sb.h @@ -10,7 +10,7 @@ struct hpfs_sb_info { unsigned sb_n_free; /* free blocks for statfs, or -1 */ unsigned sb_n_free_dnodes; /* free dnodes for statfs, or -1 */ uid_t sb_uid; /* uid from mount options */ - gid_t sb_gid; /* gid from mount options */ + uid_t sb_gid; /* gid from mount options */ umode_t sb_mode; /* mode from mount options */ unsigned sb_lowercase : 1; /* downcase filenames hackery */ unsigned sb_conv : 2; /* crlf->newline hackery */ diff --git a/pfinet/linux-src/include/linux/iso_fs_sb.h b/pfinet/linux-src/include/linux/iso_fs_sb.h index 7bb55a5..3b2a1e9 100644 --- a/pfinet/linux-src/include/linux/iso_fs_sb.h +++ b/pfinet/linux-src/include/linux/iso_fs_sb.h @@ -23,7 +23,7 @@ struct isofs_sb_info { unsigned char s_nosuid; unsigned char s_nodev; mode_t s_mode; - gid_t s_gid; + uid_t s_gid; uid_t s_uid; struct nls_table *s_nls_iocharset; /* Native language support table */ }; diff --git a/pfinet/linux-src/include/linux/msdos_fs_sb.h b/pfinet/linux-src/include/linux/msdos_fs_sb.h index ae86a98..b85f314 100644 --- a/pfinet/linux-src/include/linux/msdos_fs_sb.h +++ b/pfinet/linux-src/include/linux/msdos_fs_sb.h @@ -8,7 +8,7 @@ struct fat_mount_options { uid_t fs_uid; - gid_t fs_gid; + uid_t fs_gid; unsigned short fs_umask; unsigned short codepage; /* Codepage for shortname conversions */ char *iocharset; /* Charset used for filename input/display */ diff --git a/pfinet/linux-src/include/linux/nfsiod.h b/pfinet/linux-src/include/linux/nfsiod.h index fdd07a2..ba381a0 100644 --- a/pfinet/linux-src/include/linux/nfsiod.h +++ b/pfinet/linux-src/include/linux/nfsiod.h @@ -35,7 +35,7 @@ struct nfsiod_req { /* user creds */ uid_t rq_fsuid; - gid_t rq_fsgid; + uid_t rq_fsgid; int rq_groups[NGROUPS]; /* retry handling */ diff --git a/pfinet/linux-src/include/linux/proc_fs.h b/pfinet/linux-src/include/linux/proc_fs.h index 77d7d74..eb7cec5 100644 --- a/pfinet/linux-src/include/linux/proc_fs.h +++ b/pfinet/linux-src/include/linux/proc_fs.h @@ -281,7 +281,7 @@ struct proc_dir_entry { mode_t mode; nlink_t nlink; uid_t uid; - gid_t gid; + uid_t gid; unsigned long size; struct inode_operations * ops; int (*get_info)(char *, char **, off_t, int, int); diff --git a/pfinet/linux-src/include/linux/sched.h b/pfinet/linux-src/include/linux/sched.h index d983c17..fa5c64c 100644 --- a/pfinet/linux-src/include/linux/sched.h +++ b/pfinet/linux-src/include/linux/sched.h @@ -293,9 +293,9 @@ struct task_struct { int swappable:1; /* process credentials */ uid_t uid,euid,suid,fsuid; - gid_t gid,egid,sgid,fsgid; + uid_t gid,egid,sgid,fsgid; int ngroups; - gid_t groups[NGROUPS]; + uid_t groups[NGROUPS]; kernel_cap_t cap_effective, cap_inheritable, cap_permitted; struct user_struct *user; /* limits */ @@ -493,7 +493,7 @@ extern void FASTCALL(wake_up_process(struct task_struct * tsk)); #define wake_up(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE) #define wake_up_interruptible(x) __wake_up((x),TASK_INTERRUPTIBLE) -extern int in_group_p(gid_t grp); +extern int in_group_p(uid_t grp); extern void flush_signals(struct task_struct *); extern void flush_signal_handlers(struct task_struct *); diff --git a/pfinet/linux-src/include/linux/smb.h b/pfinet/linux-src/include/linux/smb.h index 852d5b0..779e158 100644 --- a/pfinet/linux-src/include/linux/smb.h +++ b/pfinet/linux-src/include/linux/smb.h @@ -76,7 +76,7 @@ struct smb_fattr { umode_t f_mode; nlink_t f_nlink; uid_t f_uid; - gid_t f_gid; + uid_t f_gid; kdev_t f_rdev; off_t f_size; time_t f_atime; diff --git a/pfinet/linux-src/include/linux/types.h b/pfinet/linux-src/include/linux/types.h index a53a4cc..4d23d96 100644 --- a/pfinet/linux-src/include/linux/types.h +++ b/pfinet/linux-src/include/linux/types.h @@ -14,7 +14,7 @@ typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; typedef __kernel_uid_t uid_t; -typedef __kernel_gid_t gid_t; +typedef __kernel_gid_t uid_t; typedef __kernel_daddr_t daddr_t; typedef __kernel_key_t key_t; typedef __kernel_suseconds_t suseconds_t; diff --git a/pfinet/linux-src/include/linux/umsdos_fs.h b/pfinet/linux-src/include/linux/umsdos_fs.h index 14bdb82..e647c62 100644 --- a/pfinet/linux-src/include/linux/umsdos_fs.h +++ b/pfinet/linux-src/include/linux/umsdos_fs.h @@ -66,7 +66,7 @@ struct umsdos_dirent { unsigned char flags; /* UMSDOS_xxxx */ unsigned short nlink; /* How many hard links point to this entry */ uid_t uid; /* Owner user id */ - gid_t gid; /* Group id */ + uid_t gid; /* Group id */ time_t atime; /* Access time */ time_t mtime; /* Last modification time */ time_t ctime; /* Creation time */ @@ -146,7 +146,7 @@ struct umsdos_ioctl { umode_t st_mode; nlink_t st_nlink; uid_t st_uid; - gid_t st_gid; + uid_t st_gid; dev_t st_rdev; unsigned short __pad2; off_t st_size; diff --git a/pflocal/io.c b/pflocal/io.c index 74c2f97..7324ec5 100644 --- a/pflocal/io.c +++ b/pflocal/io.c @@ -391,8 +391,8 @@ S_io_reauthenticate (struct sock_user *user, mach_port_t rendezvous) mach_port_t new_user_port; uid_t uids_buf[NIDS], aux_uids_buf[NIDS]; uid_t *uids = uids_buf, *aux_uids = aux_uids_buf; - gid_t gids_buf[NIDS], aux_gids_buf[NIDS]; - gid_t *gids = gids_buf, *aux_gids = aux_gids_buf; + uid_t gids_buf[NIDS], aux_gids_buf[NIDS]; + uid_t *gids = gids_buf, *aux_gids = aux_gids_buf; size_t num_uids = NIDS, num_aux_uids = NIDS; size_t num_gids = NIDS, num_aux_gids = NIDS; diff --git a/serverboot/defs.h b/serverboot/defs.h index 7b872fd..e6bf967 100644 --- a/serverboot/defs.h +++ b/serverboot/defs.h @@ -60,7 +60,7 @@ typedef unsigned int daddr_t; /* an unsigned int */ typedef unsigned int off_t; /* another unsigned int */ typedef unsigned short uid_t; -typedef unsigned short gid_t; +typedef unsigned short uid_t; typedef unsigned int ino_t; #endif diff --git a/sutils/clookup.c b/sutils/clookup.c index 8fe015e..cddaa46 100644 --- a/sutils/clookup.c +++ b/sutils/clookup.c @@ -43,7 +43,7 @@ file_name_lookup_carefully (const char *name, int flags, mode_t mode) error_t err; file_t node; uid_t *uids; /* Authentication of the current process. */ - gid_t *gids; + uid_t *gids; size_t num_uids, num_gids; /* Do the actual directory lookup. We only do the first pathname element @@ -155,7 +155,7 @@ file_name_lookup_carefully (const char *name, int flags, mode_t mode) num_gids = getgroups (0, 0); if (num_gids < 0) return errno; - gids = alloca (num_gids * sizeof (gid_t)); + gids = alloca (num_gids * sizeof (uid_t)); num_gids = getgroups (num_gids, gids); if (num_gids < 0) return errno; diff --git a/term/users.c b/term/users.c index a4e110b..110c6f4 100644 --- a/term/users.c +++ b/term/users.c @@ -481,7 +481,7 @@ trivfs_S_file_chown (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, uid_t uid, - gid_t gid) + uid_t gid) { struct stat st; error_t err; @@ -502,7 +502,7 @@ trivfs_S_file_chown (struct trivfs_protid *cred, goto out; if ((uid != (uid_t) -1 && !idvec_contains (cred->user->uids, uid)) - || (gid != (gid_t) -1 && !idvec_contains (cred->user->gids, gid))) + || (gid != (uid_t) -1 && !idvec_contains (cred->user->gids, gid))) { err = EPERM; goto out; @@ -512,7 +512,7 @@ trivfs_S_file_chown (struct trivfs_protid *cred, /* Make the change */ if (uid != (uid_t) -1) term_owner = uid; - if (gid != (gid_t) -1) + if (gid != (uid_t) -1) term_group = gid; err = 0; diff --git a/tmpfs/tmpfs.h b/tmpfs/tmpfs.h index a0e1f7a..094839e 100644 --- a/tmpfs/tmpfs.h +++ b/tmpfs/tmpfs.h @@ -34,7 +34,7 @@ struct disknode mode_t mode; nlink_t nlink; uid_t uid, author; - gid_t gid; + uid_t gid; struct timespec atime, mtime, ctime; unsigned int flags; diff --git a/trans/bogus-fifo.c b/trans/bogus-fifo.c index acad6e4..4d133b0 100644 --- a/trans/bogus-fifo.c +++ b/trans/bogus-fifo.c @@ -87,7 +87,7 @@ main (int argc, char **argv) error_t S_fsys_getroot (mach_port_t fsys, mach_port_t parent, - uid_t *uids, unsigned num_uids, gid_t *gids, unsigned num_gids, + uid_t *uids, unsigned num_uids, uid_t *gids, unsigned num_gids, int flags, retry_type *do_retry, char *retry_name, mach_port_t *result, mach_msg_type_name_t *result_type) @@ -130,7 +130,7 @@ S_fsys_set_options (mach_port_t fsys, error_t S_fsys_getfile (mach_port_t fsys, - uid_t *uids, unsigned num_uids, gid_t *gids, unsigned num_gids, + uid_t *uids, unsigned num_uids, uid_t *gids, unsigned num_gids, char *handle, unsigned handle_len, mach_port_t *port, mach_msg_type_name_t *port_type) { diff --git a/ufs-utils/stati.c b/ufs-utils/stati.c index ba545bf..6df71f5 100644 --- a/ufs-utils/stati.c +++ b/ufs-utils/stati.c @@ -139,7 +139,7 @@ uid_rep (uid_t uid) /* Returns a nice representation of a gid in a static buffer. */ static char * -gid_rep (gid_t gid) +gid_rep (uid_t gid) { static char buf[200]; struct group *gr = getgrgid (gid); diff --git a/utils/x.c b/utils/x.c index e4e272f..0a4fd05 100644 --- a/utils/x.c +++ b/utils/x.c @@ -112,7 +112,7 @@ parent_has_uid (uid_t uid) } /* Returns true if the *caller* of this login program has GID. */ static int -parent_has_gid (gid_t gid) +parent_has_gid (uid_t gid) { need_parent_ids (); return idvec_contains (parent_gids, gid); -- 1.7.0