Increase gid_t and uid_t to 32 bits

Increase gid_t and uid_t to 32 bits and provide backwards compatibility
where needed.
This commit is contained in:
Thomas Veerman
2011-09-05 13:56:14 +00:00
parent fde9a258d0
commit 8a266a478e
36 changed files with 339 additions and 234 deletions
+3
View File
@@ -113,4 +113,7 @@
#define IOV_MAX INT_MAX /* maximum number of buffers for readv/writev */
#endif /* _POSIX_SOURCE */
#define GID_MAX USHRT_MAX
#define UID_MAX USHRT_MAX
#endif /* _LIMITS_H */
+2 -2
View File
@@ -104,7 +104,7 @@ typedef u32_t big_dev_t;
/* Types used in disk, inode, etc. data structures.
* Some u64_t should be i64_t, but anyway with old libc we use .lo only.
*/
typedef char gid_t; /* group id */
typedef u32_t gid_t; /* group id */
typedef u32_t big_gid_t; /* group id */
typedef unsigned long ino_t; /* i-node number (V3 filesystem) */
typedef u64_t big_ino_t; /* i-node number (V3 filesystem) */
@@ -115,7 +115,7 @@ typedef u32_t big_nlink_t;/* number of links to a file */
typedef long off_t; /* offset within a file */
typedef u64_t big_off_t; /* offset within a file */
typedef int pid_t; /* process id (must be signed) */
typedef short uid_t; /* user id */
typedef u32_t uid_t; /* user id */
typedef u32_t big_uid_t; /* user id */
typedef unsigned long fsblkcnt_t; /* File system block count */
typedef unsigned long fsfilcnt_t; /* File system file count */
+1
View File
@@ -84,6 +84,7 @@ struct msg_control
/* setsockopt/setsockopt for unix domain sockets */
#define NWIOGUDSSOTYPE _IOR('n', 90, int) /* SO_TYPE */
#define NWIOGUDSPEERCREDOLD _IOR('n', 91, struct ucred_old) /* SO_PEERCRED */
#define NWIOGUDSPEERCRED _IOR('n', 91, struct ucred) /* SO_PEERCRED */
#define NWIOGUDSSNDBUF _IOR('n', 92, size_t) /* SO_SNDBUF */
#define NWIOSUDSSNDBUF _IOW('n', 93, size_t) /* SO_SNDBUF */
+1 -1
View File
@@ -51,7 +51,7 @@ struct minix_prev_stat {
ino_t st_ino; /* i-node number */
mode_t st_mode; /* file mode, protection bits, etc. */
nlink_t st_nlink; /* # links; */
uid_t st_uid; /* uid of the file's owner */
short st_uid; /* uid of the file's owner */
short int st_gid; /* gid; TEMPORARY HACK: should be gid_t */
short st_rdev;
off_t st_size; /* file size */
+10 -3
View File
@@ -1,11 +1,18 @@
#ifndef __SYS_UCRED_H
#define __SYS_UCRED_H
struct ucred
struct ucred_old
{
pid_t pid;
uid_t uid;
gid_t gid;
short uid;
char gid;
};
struct ucred
{
pid_t pid;
uid_t uid;
gid_t gid;
};
#endif