~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/base/httpd/httpd-2.2/apr/apr_user.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{ Copyright 2000-2005 The Apache Software Foundation or its licensors, as
 
2
 * applicable.
 
3
 *
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 }
 
16
 
 
17
{
 
18
 * @file apr_user.h
 
19
 * @brief APR User ID Services 
 
20
 }
 
21
 
 
22
{#include "apr.h"
 
23
#include "apr_errno.h"
 
24
#include "apr_pools.h"}
 
25
 
 
26
{
 
27
 * @defgroup apr_user User and Group ID Services
 
28
 * @ingroup APR 
 
29
 }
 
30
 
 
31
{
 
32
 * Structure for determining user ownership.
 
33
 }
 
34
type
 
35
{$ifdef WINDOWS}
 
36
  apr_uid_t = PSID;
 
37
{$else}
 
38
  apr_uid_t = uid_t;
 
39
{$endif}
 
40
 
 
41
  Papr_uid_t = ^apr_uid_t;
 
42
 
 
43
{
 
44
 * Structure for determining group ownership.
 
45
 }
 
46
{$ifdef WINDOWS}
 
47
  apr_gid_t = PSID;
 
48
{$else}
 
49
  apr_gid_t = gid_t;
 
50
{$endif}
 
51
 
 
52
  Papr_gid_t = ^apr_gid_t;
 
53
 
 
54
{$define APR_HAS_USER}
 
55
 
 
56
{$ifdef APR_HAS_USER}
 
57
 
 
58
{
 
59
 * Get the userid (and groupid) of the calling process
 
60
 * @param userid   Returns the user id
 
61
 * @param groupid  Returns the user's group id
 
62
 * @param p The pool from which to allocate working space
 
63
 * @remark This function is available only if APR_HAS_USER is defined.
 
64
 }
 
65
function apr_uid_current(userid: Papr_uid_t; groupid: Papr_gid_t;
 
66
 p: Papr_pool_t): apr_status_t;
 
67
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
68
 external LibAPR name LibNamePrefix + 'apr_uid_current' + LibSuff12;
 
69
 
 
70
{
 
71
 * Get the user name for a specified userid
 
72
 * @param username Pointer to new string containing user name (on output)
 
73
 * @param userid The userid
 
74
 * @param p The pool from which to allocate the string
 
75
 * @remark This function is available only if APR_HAS_USER is defined.
 
76
 }
 
77
function apr_uid_name_get(username: PPChar; userid: apr_uid_t;
 
78
 p: Papr_pool_t): apr_status_t;
 
79
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
80
 external LibAPR name LibNamePrefix + 'apr_uid_name_get' + LibSuff12;
 
81
 
 
82
{
 
83
 * Get the userid (and groupid) for the specified username
 
84
 * @param userid   Returns the user id
 
85
 * @param groupid  Returns the user's group id
 
86
 * @param username The username to lookup
 
87
 * @param p The pool from which to allocate working space
 
88
 * @remark This function is available only if APR_HAS_USER is defined.
 
89
 }
 
90
function apr_uid_get(userid: Papr_uid_t; groupid: Papr_gid_t;
 
91
 const username: PChar; p: Papr_pool_t): apr_status_t;
 
92
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
93
 external LibAPR name LibNamePrefix + 'apr_uid_get' + LibSuff16;
 
94
 
 
95
{
 
96
 * Get the home directory for the named user
 
97
 * @param dirname Pointer to new string containing directory name (on output)
 
98
 * @param username The named user
 
99
 * @param p The pool from which to allocate the string
 
100
 * @remark This function is available only if APR_HAS_USER is defined.
 
101
 }
 
102
function apr_uid_homepath_get(dirname: PPChar; const username: PChar;
 
103
 p: Papr_pool_t): apr_status_t;
 
104
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
105
 external LibAPR name LibNamePrefix + 'apr_uid_homepath_get' + LibSuff12;
 
106
 
 
107
{
 
108
 * Compare two user identifiers for equality.
 
109
 * @param left One uid to test
 
110
 * @param right Another uid to test
 
111
 * @return APR_SUCCESS if the apr_uid_t strutures identify the same user,
 
112
 * APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.
 
113
 * @remark This function is available only if APR_HAS_USER is defined.
 
114
 }
 
115
{$ifdef WINDOWS}
 
116
//APR_DECLARE(apr_status_t) apr_uid_compare(apr_uid_t left, apr_uid_t right);
 
117
 
 
118
{$else}
 
119
//#define apr_uid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)
 
120
{$endif}
 
121
 
 
122
{
 
123
 * Get the group name for a specified groupid
 
124
 * @param groupname Pointer to new string containing group name (on output)
 
125
 * @param groupid The groupid
 
126
 * @param p The pool from which to allocate the string
 
127
 * @remark This function is available only if APR_HAS_USER is defined.
 
128
 }
 
129
function apr_gid_name_get(groupname: PPChar; groupid: apr_gid_t;
 
130
 p: Papr_pool_t): apr_status_t;
 
131
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
132
 external LibAPR name LibNamePrefix + 'apr_gid_name_get' + LibSuff12;
 
133
 
 
134
{
 
135
 * Get the groupid for a specified group name
 
136
 * @param groupid Pointer to the group id (on output)
 
137
 * @param groupname The group name to look up
 
138
 * @param p The pool from which to allocate the string
 
139
 * @remark This function is available only if APR_HAS_USER is defined.
 
140
 }
 
141
function apr_gid_get(groupid: Papr_gid_t; const groupname: PChar;
 
142
 p: Papr_pool_t): apr_status_t;
 
143
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
144
 external LibAPR name LibNamePrefix + 'apr_gid_get' + LibSuff12;
 
145
 
 
146
{
 
147
 * Compare two group identifiers for equality.
 
148
 * @param left One gid to test
 
149
 * @param right Another gid to test
 
150
 * @return APR_SUCCESS if the apr_gid_t strutures identify the same group,
 
151
 * APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.
 
152
 * @remark This function is available only if APR_HAS_USER is defined.
 
153
 }
 
154
{$ifdef WINDOWS}
 
155
//APR_DECLARE(apr_status_t) apr_gid_compare(apr_gid_t left, apr_gid_t right);
 
156
{$else}
 
157
//#define apr_gid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)
 
158
{$endif}
 
159
 
 
160
{$endif}  { ! APR_HAS_USER }
 
161