Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#11596 closed defect (fixed)

BUG: nextuid creates GUI users (uid >= 500) rather than "hidden" users (<500)

Reported by: matt@… Owned by: macports-tickets@…
Priority: Low Milestone:
Component: base Version:
Keywords: Cc:
Port:

Description

When a port such as dbus creates a user using the adduser function, the user will be visible in the Accounts Preference pane etc. This is because Mac OS X treats uids >= 500 as login users, and pextlib's nextuid function just takes maxuid+1 for the userid.

A better approach in NextuidCmd() in Pextlib.c would be to do something like

int uid = 100; while (getpwuid(uid)) {

uid++;

} tcl_result = Tcl_NewIntObj(uid);

or similar (I haven't tested this code).

Change History (8)

comment:1 Changed 18 years ago by pipping@…

Milestone: MacPorts 1.4

comment:2 Changed 18 years ago by jmpalacios (Juan Manuel Palacios)

Milestone: MacPorts 1.4Needs developer review
Type: defectenhancement

Good suggestion, but I cannot tell on my own what implications it might have. Setting it to "Needs developer review" for now. Thanks for the report!

-jmpp

comment:3 Changed 18 years ago by kballard (Lily Ballard)

Resolution: fixed
Status: newclosed

I just fixed this in r23720 without being aware of the existence of the ticket :)

Anyway, nextuid and nextgid both pick up the first uid/gid >= 100, using basically the same code you pasted.

comment:4 Changed 18 years ago by jmpalacios (Juan Manuel Palacios)

This was reverted by Landon because users with uid's < 500 are reserved for system usage. I'll keep the ticket closed since the original suggestion is not entirely applicable, but I'll leave the ticket in this milestone and wont mark it as "invalid" in case someone wants to work on it to find a better solution (hidden users with uids > 500? I think Landon said there is a way to accomplish that, though he didn't remember it at the moment).

-jmpp

comment:5 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Milestone: Needs developer reviewMacPorts base bugs

Milestone Needs developer review deleted

comment:6 Changed 17 years ago by nox@…

Priority: Nice to haveLow
Type: enhancementdefect

comment:7 Changed 16 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:8 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Note: See TracTickets for help on using tickets.