Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New system user needed in ebuild script
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bettercom
n00b
n00b


Joined: 30 May 2003
Posts: 3
Location: Hamburg, Germany

PostPosted: Fri May 30, 2003 11:26 am    Post subject: New system user needed in ebuild script Reply with quote

Working on an ebuild for nullmailer I would like to know how to determine an unique uid/gid which I need in the script.

Who assigns these ids used in several other ebuild's where system users are needed?
How can I prevent id collisions without grepping through other ebuild-files?
Back to top
View user's profile Send private message
duff
Guru
Guru


Joined: 19 Jun 2002
Posts: 466
Location: Clemson, SC

PostPosted: Sat May 31, 2003 2:29 am    Post subject: Reply with quote

In /usr/lib/portage/bin/extra_functions.sh there are functions for adding users/groups it that what you're looking for?


Code:
# Simplify/standardize adding users to the system
# vapier@gentoo.org
#
# enewuser(username, uid, shell, homedir, groups, extra options)
#
# Default values if you do not specify any:
# username:     REQUIRED !
# uid:          next available (see useradd(8))
#               note: pass -1 to get default behavior
# shell:        /bin/false
# homedir:      /dev/null
# groups:       none
# extra:        comment of 'added by portage for ${PN}'
Back to top
View user's profile Send private message
bettercom
n00b
n00b


Joined: 30 May 2003
Posts: 3
Location: Hamburg, Germany

PostPosted: Sat May 31, 2003 8:35 am    Post subject: Reply with quote

Not really.

The problem goes a little deeper: Creating a new user/group in an ebuild without assigning a fixed uid/gid may collide with other ebuilds (installed in future) which make use of a fixed uid/gid.

Assigning a fixed uid/gid requires a central instance which keeps track of these ids.

This topic is now discussed on the gentoo-dev mailing list.

BTW: Is there webinterface to former postings on the several lists?


Last edited by bettercom on Tue Jun 03, 2003 5:40 am; edited 1 time in total
Back to top
View user's profile Send private message
duff
Guru
Guru


Joined: 19 Jun 2002
Posts: 466
Location: Clemson, SC

PostPosted: Sat May 31, 2003 4:02 pm    Post subject: Reply with quote

bettercom wrote:
BTW: Is there webinterface to former postings on the several lists?
here's the dev-list...not sure about the others
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum