From f48205be61a214698b763ff550ab9e657525104c Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 25 May 2007 05:43:42 -0700 Subject: PSARC 2007/064 Unified POSIX and Windows Credentials for Solaris 4994017 data structure sharing between rpcbind and libnsl leads to accidents 6549510 Need the ability to store SIDs in the Solaris cred_t 6549515 PSARC 2007/064: uid_t and gid_t to become unsigned --- usr/src/uts/common/os/ipc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr/src/uts/common/os/ipc.c') diff --git a/usr/src/uts/common/os/ipc.c b/usr/src/uts/common/os/ipc.c index 0094652f15..367089e686 100644 --- a/usr/src/uts/common/os/ipc.c +++ b/usr/src/uts/common/os/ipc.c @@ -529,7 +529,7 @@ ipcperm_set(ipc_service_t *service, struct cred *cr, if (secpolicy_ipc_owner(cr, kperm) != 0) return (EPERM); - if ((uid < 0) || (uid > MAXUID) || (gid < 0) || (gid > MAXUID)) + if (!VALID_UID(uid) || !VALID_GID(gid)) return (EINVAL); kperm->ipc_uid = uid; @@ -568,8 +568,7 @@ ipcperm_set64(ipc_service_t *service, struct cred *cr, if (secpolicy_ipc_owner(cr, kperm) != 0) return (EPERM); - if ((perm64->ipcx_uid < 0) || (perm64->ipcx_uid > MAXUID) || - (perm64->ipcx_gid < 0) || (perm64->ipcx_gid > MAXUID)) + if (!VALID_UID(perm64->ipcx_uid) || !VALID_GID(perm64->ipcx_gid)) return (EINVAL); kperm->ipc_uid = perm64->ipcx_uid; -- cgit v1.2.3