summaryrefslogtreecommitdiff
path: root/os/access.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
commit49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch)
treeeebaec908150abfc0159d9ee941404918f553113 /os/access.c
parent0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (diff)
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
Diffstat (limited to 'os/access.c')
-rw-r--r--os/access.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/os/access.c b/os/access.c
index 670ec368e..5d688a71e 100644
--- a/os/access.c
+++ b/os/access.c
@@ -179,7 +179,7 @@ SOFTWARE.
#endif
#endif
-_X_EXPORT Bool defeatAccessControl = FALSE;
+Bool defeatAccessControl = FALSE;
#define acmp(a1, a2, len) memcmp((char *)(a1), (char *)(a2), len)
#define acopy(a1, a2, len) memmove((char *)(a2), (char *)(a1), len)
@@ -240,7 +240,7 @@ static void siTypesInitialize(void);
* local host to the access list
*/
-_X_EXPORT void
+void
EnableLocalHost (void)
{
if (!UsingXdmcp)
@@ -253,7 +253,7 @@ EnableLocalHost (void)
/*
* called when authorization is enabled to keep us secure
*/
-_X_EXPORT void
+void
DisableLocalHost (void)
{
HOST *self;
@@ -271,7 +271,7 @@ DisableLocalHost (void)
* adds local hosts manually when needed
*/
-_X_EXPORT void
+void
AccessUsingXdmcp (void)
{
UsingXdmcp = TRUE;
@@ -321,7 +321,7 @@ ifioctl (int fd, int cmd, char *arg)
*/
#if !defined(SIOCGIFCONF)
-_X_EXPORT void
+void
DefineSelf (int fd)
{
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN)
@@ -847,7 +847,7 @@ DefineSelf (int fd)
#endif /* hpux && !HAS_IFREQ */
#ifdef XDMCP
-_X_EXPORT void
+void
AugmentSelf(pointer from, int len)
{
int family;
@@ -873,7 +873,7 @@ AugmentSelf(pointer from, int len)
}
#endif
-_X_EXPORT void
+void
AddLocalHosts (void)
{
HOST *self;
@@ -887,7 +887,7 @@ AddLocalHosts (void)
}
/* Reset access control list to initial hosts */
-_X_EXPORT void
+void
ResetHosts (char *display)
{
register HOST *host;
@@ -1095,7 +1095,7 @@ ResetHosts (char *display)
}
/* Is client on the local host */
-_X_EXPORT Bool LocalClient(ClientPtr client)
+Bool LocalClient(ClientPtr client)
{
int alen, family, notused;
Xtransaddr *from = NULL;
@@ -1132,7 +1132,7 @@ _X_EXPORT Bool LocalClient(ClientPtr client)
*
* Used by XShm to test access rights to shared memory segments
*/
-_X_EXPORT int
+int
LocalClientCred(ClientPtr client, int *pUid, int *pGid)
{
LocalClientCredRec *lcc;
@@ -1161,7 +1161,7 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
* Used by localuser & localgroup ServerInterpreted access control forms below
* Used by AuthAudit to log who local connections came from
*/
-_X_EXPORT int
+int
GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
{
#if defined(HAS_GETPEEREID) || defined(HAS_GETPEERUCRED) || defined(SO_PEERCRED)
@@ -1260,7 +1260,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
#endif
}
-_X_EXPORT void
+void
FreeLocalClientCreds(LocalClientCredRec *lcc)
{
if (lcc != NULL) {
@@ -1290,7 +1290,7 @@ AuthorizedClient(ClientPtr client)
/* Add a host to the access control list. This is the external interface
* called from the dispatcher */
-_X_EXPORT int
+int
AddHost (ClientPtr client,
int family,
unsigned length, /* of bytes in pAddr */
@@ -1335,7 +1335,7 @@ AddHost (ClientPtr client,
return BadAlloc;
}
-_X_EXPORT Bool
+Bool
ForEachHostInFamily (int family,
Bool (*func)(
unsigned char * /* addr */,
@@ -1387,7 +1387,7 @@ NewHost (int family,
/* Remove a host from the access control list */
-_X_EXPORT int
+int
RemoveHost (
ClientPtr client,
int family,
@@ -1441,7 +1441,7 @@ RemoveHost (
}
/* Get all hosts in the access control list */
-_X_EXPORT int
+int
GetHosts (
pointer *data,
int *pnHosts,
@@ -1540,7 +1540,7 @@ CheckAddr (
/* Check if a host is not in the access control list.
* Returns 1 if host is invalid, 0 if we've found it. */
-_X_EXPORT int
+int
InvalidHost (
register struct sockaddr *saddr,
int len,
@@ -1651,7 +1651,7 @@ ConvertAddr (
}
}
-_X_EXPORT int
+int
ChangeAccessControl(
ClientPtr client,
int fEnabled)
@@ -1664,7 +1664,7 @@ ChangeAccessControl(
}
/* returns FALSE if xhost + in effect, else TRUE */
-_X_EXPORT int
+int
GetAccessControl(void)
{
return AccessEnabled;