diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2017-02-15 14:42:48 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-03-21 10:33:30 +0100 |
commit | 8996f80a5e3b205cb580aba34aa21d165ef78cfb (patch) | |
tree | 63247f1c738a59600e2a437054d18826db4dc2d2 /nx-X11/programs/Xserver/include/os.h | |
parent | 6bc37b980515995b0944632e5a062246683f1d97 (diff) | |
download | nx-libs-8996f80a5e3b205cb580aba34aa21d165ef78cfb.tar.gz nx-libs-8996f80a5e3b205cb580aba34aa21d165ef78cfb.tar.bz2 nx-libs-8996f80a5e3b205cb580aba34aa21d165ef78cfb.zip |
Rework local client id finding code to be more uniform
Backport of X.org commit:
commit 2d93e69690d2c5d4a89a795ede6423796528e5df
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Sep 27 16:47:06 2007 -0700
Rework local client id finding code to be more uniform
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Note: This commit also switches client_uid_string's size from 32 to 64 chars,
as found in this X.org commit (spotted by Mihai Moldovan during code review):
commit a7b944f0d96c3e0e15e75378a04def1ac96089fb
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Nov 1 16:17:49 2006 -0800
If getpeerucred() is available, include pid & zoneid in audit messages too
Diffstat (limited to 'nx-X11/programs/Xserver/include/os.h')
-rw-r--r-- | nx-X11/programs/Xserver/include/os.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/include/os.h b/nx-X11/programs/Xserver/include/os.h index 99003922f..af84f54c0 100644 --- a/nx-X11/programs/Xserver/include/os.h +++ b/nx-X11/programs/Xserver/include/os.h @@ -321,6 +321,24 @@ extern int LocalClient(ClientPtr /* client */); extern int LocalClientCred(ClientPtr, int *, int *); +#define LCC_UID_SET (1 << 0) +#define LCC_GID_SET (1 << 1) +#define LCC_PID_SET (1 << 2) +#define LCC_ZID_SET (1 << 3) + +typedef struct { + int fieldsSet; /* Bit mask of fields set */ + int euid; /* Effective uid */ + int egid; /* Primary effective group id */ + int nSuppGids; /* Number of supplementary group ids */ + int *pSuppGids; /* Array of supplementary group ids */ + int pid; /* Process id */ + int zoneid; /* Only set on Solaris 10 & later */ +} LocalClientCredRec; + +extern int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); +extern void FreeLocalClientCreds(LocalClientCredRec *); + extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/); extern int GetAccessControl(void); |