| 1 | GLEP: 27 |
1 | GLEP: 27 |
| 2 | Title: Portage Management of UIDs/GIDs |
2 | Title: Portage Management of UIDs/GIDs |
| 3 | Version: $Revision: 1.2 $ |
3 | Version: $Revision: 1.5 $ |
| 4 | Last-Modified: $Date: 2004/05/29 14:48:18 $ |
4 | Last-Modified: $Date: 2005/09/18 20:48:23 $ |
| 5 | Author: Mike Frysinger <vapier@gentoo.org> |
5 | Author: Mike Frysinger <vapier@gentoo.org> |
| 6 | Status: Draft |
6 | Status: Approved |
| 7 | Type: Standards Track |
7 | Type: Standards Track |
| 8 | Content-Type: text/x-rst |
8 | Content-Type: text/x-rst |
| 9 | Created: 29 May 2004 |
9 | Created: 29 May 2004 |
| 10 | Post-History: 29-May-2004 |
10 | Post-History: 29-May-2004, 20-Jul-2004 |
| 11 | |
11 | |
|
|
12 | |
|
|
13 | Status |
|
|
14 | ====== |
|
|
15 | |
|
|
16 | This GLEP was approved as-is on 14-Jun-2004. |
| 12 | |
17 | |
| 13 | Abstract |
18 | Abstract |
| 14 | ======== |
19 | ======== |
| 15 | |
20 | |
| 16 | The current handling of users and groups in the portage system lacks |
21 | The current handling of users and groups in the portage system lacks |
| … | |
… | |
| 45 | |
50 | |
| 46 | Defining Accounts |
51 | Defining Accounts |
| 47 | ''''''''''''''''' |
52 | ''''''''''''''''' |
| 48 | |
53 | |
| 49 | |
54 | |
| 50 | A new directory will need to be added to the rsync tree to store the |
55 | New directories will need to be added to the rsync tree to store the files |
| 51 | files that define the default values for new accounts. |
56 | that define the default values for new accounts. They will be stored on a |
|
|
57 | per-profile basis, that way sub-profiles may easily override parent profiles. |
|
|
58 | The default location will be the base profile since all other profiles inherit |
|
|
59 | from there. |
| 52 | |
60 | |
| 53 | :: |
61 | :: |
| 54 | |
62 | |
| 55 | portage/profiles/accounts/ |
63 | portage/profiles/base/accounts/ |
| 56 | user/<username>.xml |
64 | user/<username> |
| 57 | group/<groupname>.xml |
65 | group/<groupname> |
| 58 | accounts.xml |
66 | accounts |
| 59 | |
67 | |
| 60 | The files are named with the respective user/group name since they need |
68 | The files are named with the respective user/group name since they need |
| 61 | to be unique in their respective domains. For example, the file |
69 | to be unique in their respective domains. For example, the file |
| 62 | detailing the ntp user would be located accounts/user/ntp.xml. Each |
70 | detailing the ntp user would be located accounts/user/ntp. Each |
| 63 | username.xml file will detail the required information about each user. |
71 | username file will detail the required information about each user. |
| 64 | Certain account features that exist on one class of systems (Linux) but |
72 | Certain account features that exist on one class of systems (Linux) but |
| 65 | not on others (\*BSD) can be tagged as such. Each groupname.xml will |
73 | not on others (\*BSD) can be redefined in their respective subprofiles. Each |
| 66 | follow similar guidelines. The accounts.xml will be used to describe |
74 | groupname will follow similar guidelines. The accounts file will be used to |
| 67 | global account defaults such as the default range of 'valid system' ids. |
75 | describe global account defaults such as the default range of 'valid system' |
| 68 | For example, if the UID 123 is already used on a system, but the ntp |
76 | ids. For example, if the UID 123 is already used on a system, but the ntp |
| 69 | user defaults to '123', we obviously cannot just duplicate it. So we |
77 | user defaults to '123', we obviously cannot just duplicate it. So we |
| 70 | would select the next available UID on the system based upon the range |
78 | would select the next available UID on the system based upon the range |
| 71 | defined here. |
79 | defined here. |
| 72 | |
80 | |
| 73 | |
81 | |
| 74 | Local Overrides |
82 | Local Overrides |
| 75 | ''''''''''''''' |
83 | ''''''''''''''' |
| 76 | |
84 | |
| 77 | Following the tried and true style of custom local portage files being |
85 | Following the tried and true style of custom local portage files being |
| 78 | found in /etc/portage, this new system will follow the same. Users can |
86 | found in /etc/portage, this new system will follow the same. Users can |
| 79 | setup their own directory heirarchy in /etc/portage/accounts/ that mimics |
87 | setup their own directory heirarchy in /etc/portage/profile/accounts/ that |
| 80 | the heirarchy found in the portage tree. When portage attempts to add a |
88 | mimics the heirarchy found in the portage tree. When portage attempts to add |
| 81 | new user, it will first check /etc/portage/accounts/user/<username>.xml. |
89 | a new user, it will first check /etc/portage/profile/accounts/user/<username>. |
| 82 | If it does not exist, it will simply use the default definition in the |
90 | If it does not exist, it will simply use the default definition in the |
| 83 | portage tree. |
91 | portage tree. |
| 84 | |
92 | |
| 85 | |
93 | |
| 86 | Developer Interface |
94 | Developer Interface |